Skip to content

Commit

Permalink
Merge pull request #12 from RWKV/main-dev-infctx
Browse files Browse the repository at this point in the history
fixing vocab size mismatch
  • Loading branch information
PicoCreator authored Aug 21, 2023
2 parents fd6bbfb + d5356bc commit 505622b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RWKV-v4neo/init_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def main():
if vocab_size == "neox":
vocab_size = 50277
elif vocab_size == "world":
vocab_size = 65529
vocab_size = 65536
else:
vocab_size = int(vocab_size)

Expand Down
2 changes: 1 addition & 1 deletion RWKV-v4neo/src/dataflow/trie_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def find_longest(self, key:bytes, idx:int=0):

class TRIE_TOKENIZER():
def __init__(self, file_name):
self.vocab_size = 65529
self.vocab_size = 65536
self.idx2token = {}
sorted = [] # must be already sorted
with open(file_name, "r", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion RWKV-v5/init_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def main():
if vocab_size == "neox":
vocab_size = 50277
elif vocab_size == "world":
vocab_size = 65529
vocab_size = 65536
else:
vocab_size = int(vocab_size)

Expand Down
2 changes: 1 addition & 1 deletion RWKV-v5/src/dataflow/trie_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def find_longest(self, key:bytes, idx:int=0):

class TRIE_TOKENIZER():
def __init__(self, file_name):
self.vocab_size = 65529
self.vocab_size = 65536
self.idx2token = {}
sorted = [] # must be already sorted
with open(file_name, "r", encoding="utf-8") as f:
Expand Down

0 comments on commit 505622b

Please sign in to comment.