mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-15 14:50:51 +01:00
fix lint error
Signed-off-by: XingXing Qiao <qiaoxx@dingdao.com>
This commit is contained in:
parent
5a914ffce0
commit
f626b7175c
@ -2726,8 +2726,6 @@ class ChatGLMModel(Model):
|
|||||||
vocab_size = hparams.get("padded_vocab_size", len(tokenizer.get_vocab()))
|
vocab_size = hparams.get("padded_vocab_size", len(tokenizer.get_vocab()))
|
||||||
assert max(tokenizer.get_vocab().values()) < vocab_size
|
assert max(tokenizer.get_vocab().values()) < vocab_size
|
||||||
|
|
||||||
reverse_vocab = {id_: encoded_tok for encoded_tok, id_ in tokenizer.get_vocab().items()}
|
|
||||||
|
|
||||||
for token_id in range(vocab_size):
|
for token_id in range(vocab_size):
|
||||||
piece = tokenizer._convert_id_to_token(token_id)
|
piece = tokenizer._convert_id_to_token(token_id)
|
||||||
if token_id == 0:
|
if token_id == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user