mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-20 13:17:22 +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,6 +241,9 @@ 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:
|
||||||
|
if orig_dtype == torch.float16:
|
||||||
|
x = x + residual.float()
|
||||||
|
else:
|
||||||
x = x + residual
|
x = x + residual
|
||||||
residual = x
|
residual = x
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user