Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
fix qwen convert error
Browse files Browse the repository at this point in the history
Signed-off-by: intellinjun <[email protected]>
  • Loading branch information
intellinjun committed Jun 11, 2024
1 parent c57d25f commit c6ce4e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion neural_speed/convert/convert_quantized_qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main(args_in: Optional[List[str]] = None) -> None:
f.write(struct.pack("i", hparams["intermediate_size"])) # dummy data
f.write(struct.pack("i", hparams["num_attention_heads"]))
f.write(struct.pack("i", hparams["num_key_value_heads"] if "num_key_value_heads" in hparams
else ["num_attention_heads"])) # multi-query attention
else hparams["num_attention_heads"])) # multi-query attention
f.write(struct.pack("i", hparams["num_hidden_layers"]))
f.write(
struct.pack(
Expand Down
2 changes: 1 addition & 1 deletion neural_speed/convert/convert_qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main(args_in: Optional[List[str]] = None) -> None:
fout.write(struct.pack("i", hparams["intermediate_size"])) # dummy data
fout.write(struct.pack("i", hparams["num_attention_heads"]))
fout.write(struct.pack("i", hparams["num_key_value_heads"] if "num_key_value_heads" in hparams
else ["num_attention_heads"])) # multi-query attention
else hparams["num_attention_heads"])) # multi-query attention
fout.write(struct.pack("i", hparams["num_hidden_layers"]))
fout.write(
struct.pack(
Expand Down

0 comments on commit c6ce4e7

Please sign in to comment.