8000 Feature: support baichuan serial models, by now, including Baichuan-7… by jameswu2014 · Pull Request #3009 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

Feature: support baichuan serial models, by now, including Baichuan-7… #3009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 14, 2023
Prev Previous commit
Next Next commit
fix W_pack for-loop
  • Loading branch information
jameswu2014 committed Sep 11, 2023
commit 306d71be42f5cbac0208d17720b8161a90d7f836
2 changes: 1 addition & 1 deletion convert-baichuan-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def parse_args() -> argparse.Namespace:
model_part = torch.load(f"{dir_model}/{part_name}", map_location="cpu")

tmp=model_part
for i in itertools.count():
for i in range(block_count):
if f"model.layers.{i}.self_attn.W_pack.weight" in model_part:
print(f"Unpacking and permuting layer {i}")
tmp[f"model.layers.{i}.self_attn.q_proj.weight"]=reverse_hf_permute_part(model_part[f"model.layers.{i}.self_attn.W_pack.weight"],0,head_count,head_count)
Expand Down
0