Skip to content

Commit

Permalink
Fix starcoder2 fused norm (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechxGenus authored Apr 12, 2024
1 parent e9f6269 commit 0e52a5c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions awq/models/starcoder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,9 @@ def fuse_transformer(self):
module.self_attn.k_proj,
module.self_attn.v_proj,
)
norm_1 = FasterTransformerRMSNorm(
module.input_layernorm.weight, module.input_layernorm.eps
)
norm_2 = FasterTransformerRMSNorm(
module.post_attention_layernorm.weight,
module.post_attention_layernorm.eps,
)
# SC2 use normal LayerNorm
norm_1 = module.input_layernorm
norm_2 = module.post_attention_layernorm
blocks.append(
LlamaLikeBlock(
hidden_size=self.model.config.hidden_size,
Expand Down

0 comments on commit 0e52a5c

Please sign in to comment.