add support for python3.8 3.9
This commit is contained in:
4
backend-python/rwkv_pip/rwkv_tokenizer.py
vendored
4
backend-python/rwkv_pip/rwkv_tokenizer.py
vendored
@@ -72,9 +72,9 @@ class TRIE_TOKENIZER:
|
||||
for t, i in self.token2idx.items():
|
||||
_ = self.root.add(t, val=(t, i))
|
||||
|
||||
def encodeBytes(self, src: bytes) -> list[int]:
|
||||
def encodeBytes(self, src: bytes):
|
||||
idx: int = 0
|
||||
tokens: list[int] = []
|
||||
tokens = []
|
||||
while idx < len(src):
|
||||
_idx: int = idx
|
||||
idx, _, values = self.root.find_longest(src, idx)
|
||||
|
||||
Reference in New Issue
Block a user