Skip to content

Commit

Permalink
[LLM] Add tensor parallel for chatglmv2 (#9014)
Browse files Browse the repository at this point in the history
* fix_chatglmv2_8k
  • Loading branch information
SevenSamon authored Sep 5, 2024
1 parent 1ef3ec2 commit f4cff96
Show file tree
Hide file tree
Showing 2 changed files with 467 additions and 65 deletions.
2 changes: 1 addition & 1 deletion paddlenlp/experimental/transformers/chatglm_v2/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def __init__(self, config: ChatGLMv2Config, empty_init=True):
if self.post_layer_norm:
LayerNormFunc = RMSNorm if config.rmsnorm else nn.LayerNorm
# Final layer norm before output.
self.final_layernorm = LayerNormFunc(config.hidden_size, epsilon=config.layernorm_epsilon)
self.final_layernorm = LayerNormFunc(config.hidden_size, epsilon=config.layernorm_epsilon, config=config)

def get_input_embeddings(self):
return self.embedding.word_embeddings
Expand Down
Loading

0 comments on commit f4cff96

Please sign in to comment.