Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
janelu9 committed Jan 26, 2025
1 parent 2cc6c2a commit 015b155
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions jllm/cat2hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def func(meta_data):
model_file =f"model-{pipe_rank:05d}-of-"+f"{num_stages:05d}.safetensors"

for k in tqdm.tqdm(keys):
if "o_proj" in k or "down_proj" in k in k:
if "o_proj" in k or "down_proj" in k or 'attn.proj.weight' in k or 'mlp.fc2.weight' in k or 'mlp.2.weight' in k :
state_dict[k] = torch.cat([p[1].pop(k) for p in pts],1)
elif "lm_head" in k or "gate_proj" in k or "up_proj" in k or "embed_tokens" in k\
or "q_proj" in k or "k_proj" in k or "v_proj" in k:
elif "lm_head" in k or "gate_proj" in k or "up_proj" in k or "embed_tokens" in k or "q_proj" in k \
or "k_proj" in k or "v_proj" in k or 'attn.qkv' in k or 'mlp.fc1' in k or 'mlp.0' in k:
state_dict[k] = torch.cat([p[1].pop(k) for p in pts])
else:
state_dict[k] = pts[0][1].pop(k)
Expand Down
Binary file modified jllm/data/utils.cpython-311-x86_64-linux-gnu.so
Binary file not shown.
Binary file modified jllm/data/utils.cpython-39-aarch64-linux-gnu.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import io

project_name = "jllm"
version = "4.0.2"
version = "4.0.3"

setuptools.setup(
name=project_name,
Expand Down

0 comments on commit 015b155

Please sign in to comment.