[5305318] fix: Fix the accuracy issue when reduce_fusion is enabled for GEMMA model. (#5801)

Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com>
This commit is contained in:
Yukun He 2025-07-08 19:51:05 +08:00 committed by GitHub
parent b01d1c28f7
commit e104f8bbb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -157,10 +157,10 @@ class GemmaDecoderLayer(Module):
if default_net().plugin_config.reduce_fusion else if default_net().plugin_config.reduce_fusion else
AllReduceFusionOp.NONE, AllReduceFusionOp.NONE,
residual=residual, residual=residual,
norm_weight=self.post_layernorm.weight.value, norm_weight=self.pre_feedforward_layernorm.weight.value,
norm_pre_residual_weight=self.pre_feedforward_layernorm.weight. norm_pre_residual_weight=self.post_layernorm.weight.value
value if self.config.inter_layernorms else None, if self.config.inter_layernorms else None,
eps=self.post_layernorm.eps)) eps=self.pre_feedforward_layernorm.eps))
if use_cache: if use_cache:
attention_output, presents = attention_output attention_output, presents = attention_output