Apply logit softcapping in Transformers modelling backend (#52173)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Aug 13, 2026 at 17:21 UTC
b245d8e73f67f1fffed3b46b6152078dc1683fe6
1 file changed
+3
-2
vllm/model_executor/models/transformers/causal.py
+3
-2
@@ -59,9 +59,10 @@ class CausalMixin(VllmModelForTextGeneration):
59
self.lm_head = self.lm_head.tie_weights(module)
60
break
61
62
- logit_scale = getattr(self.text_config, "logit_scale", 1.0)
62
self.logits_processor = LogitsProcessor(
64
- self.text_config.vocab_size, scale=logit_scale
63
+ self.text_config.vocab_size,
64
+ scale=getattr(self.text_config, "logit_scale", 1.0),
65
+ soft_cap=getattr(self.text_config, "final_logit_softcapping", None),
66
)
67
else:
68
self.lm_head = PPMissingLayer()