mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-18 10:16:58 +08:00
fix gemma3 results all zero (#17364)
Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
This commit is contained in:
parent
a39203f99e
commit
d3cf61b89b
@ -241,7 +241,10 @@ class GemmaRMSNorm(CustomOp):
|
|||||||
"""PyTorch-native implementation equivalent to forward()."""
|
"""PyTorch-native implementation equivalent to forward()."""
|
||||||
orig_dtype = x.dtype
|
orig_dtype = x.dtype
|
||||||
if residual is not None:
|
if residual is not None:
|
||||||
x = x + residual
|
if orig_dtype == torch.float16:
|
||||||
|
x = x + residual.float()
|
||||||
|
else:
|
||||||
|
x = x + residual
|
||||||
residual = x
|
residual = x
|
||||||
|
|
||||||
x = x.float()
|
x = x.float()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user