Merge pull request #315 from davidar/vocab_source
Fix vocab_source in sample.py
This commit is contained in:
@@ -52,7 +52,7 @@ if compile:
|
|||||||
model = torch.compile(model) # requires PyTorch 2.0 (optional)
|
model = torch.compile(model) # requires PyTorch 2.0 (optional)
|
||||||
|
|
||||||
# load the tokenizer
|
# load the tokenizer
|
||||||
vocab_source = checkpoint_dict.get("vocab_source", "llama2")
|
vocab_source = checkpoint_dict["config"].get("vocab_source", "llama2")
|
||||||
vocab_size = gptconf.vocab_size
|
vocab_size = gptconf.vocab_size
|
||||||
if tokenizer:
|
if tokenizer:
|
||||||
# a specific tokenizer is provided, use it
|
# a specific tokenizer is provided, use it
|
||||||
|
|||||||
Reference in New Issue
Block a user