Skip to content

Commit

Permalink
Merge pull request #92 from BlackSamorez/falcon
Browse files Browse the repository at this point in the history
Falcon lm_head split hotfix
  • Loading branch information
Andrei Panferov authored Jun 23, 2023
2 parents f8475bc + db8da5a commit 9e8ced1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = tensor_parallel
version = 1.2.7
version = 1.2.8
author = Andrei Panferov and Yaroslav Lisnyak
author_email = [email protected]
description = Automatically shard your large model between multiple GPUs, works without torch.distributed
Expand Down
2 changes: 2 additions & 0 deletions src/tensor_parallel/slicing_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ def get_refined_web_config(model_config: PretrainedConfig, devices: Sequence[tor
r".*mlp\.dense_4h_to_h\.weight$": Split(world_size=world_size, dim=1),
# RWModel
r".*word_embeddings\.weight$": Split(world_size=world_size, dim=1),
# RWForCausalLM
r".*lm_head\.weight$": Split(world_size=world_size, dim=1),
},
input_rules={
r".*self_attention$": {"layer_past": select_kv_for_rank},
Expand Down

0 comments on commit 9e8ced1

Please sign in to comment.