Fix bug in world tokenizer (#93)
This commit is contained in:
parent
82c4ac78f4
commit
b88ae59604
|
@ -106,7 +106,8 @@ class TRIE_TOKENIZER():
|
|||
def get_tokenizer(tokenizer="20B"):
|
||||
if tokenizer == "world":
|
||||
print('Loading world tokenizer')
|
||||
tokenizer = TRIE_TOKENIZER('rwkv_vocab_v20230424.txt')
|
||||
tokenizer_path = pathlib.Path(os.path.abspath(__file__)).parent / 'rwkv_vocab_v20230424.txt'
|
||||
tokenizer = TRIE_TOKENIZER(tokenizer_path)
|
||||
tokenizer_encode = lambda prompt: tokenizer.encode(prompt)
|
||||
elif tokenizer == "20B":
|
||||
print('Loading 20B tokenizer')
|
||||
|
|
Loading…
Reference in New Issue