mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 17:31:18 +08:00
fix yi (#852)
This commit is contained in:
parent
7979b84a9e
commit
9f10728145
@ -120,7 +120,7 @@ class SPMStreamingDetokenizer(StreamingDetokenizer):
|
||||
self.trim_space = trim_space
|
||||
|
||||
# Extract the tokens in a list from id to text
|
||||
self.tokenmap = [None] * len(tokenizer.vocab)
|
||||
self.tokenmap = [""] * (max(tokenizer.vocab.values()) + 1)
|
||||
for value, tokenid in tokenizer.vocab.items():
|
||||
self.tokenmap[tokenid] = value
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user