Skip to content

Commit

Permalink
convert : fix Qwen/Qwen-7b conversion (#7308)
Browse files Browse the repository at this point in the history
  • Loading branch information
amd-lalithnc authored May 17, 2024
1 parent ee94172 commit e18bc6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def _set_vocab_qwen(self):

# for this kind of tokenizer, added_vocab is not a subset of vocab, so they need to be combined
added_vocab = tokenizer.special_tokens
reverse_vocab = {id_ : encoded_tok for encoded_tok, id_ in (vocab | added_vocab).items()}
reverse_vocab = {id_ : encoded_tok for encoded_tok, id_ in {**vocab, **added_vocab}.items()}

for i in range(vocab_size):
if i not in reverse_vocab:
Expand Down

0 comments on commit e18bc6a

Please sign in to comment.