mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 16:49:27 +00:00
Python - Fix example.py for GPT-2
cc @mfuntowicz `from_pretrained` takes only on argument. Do you know if we can make this compatible otherwise?
This commit is contained in:
@ -53,7 +53,7 @@ Namespaces are one honking great idea -- let's do more of those!
|
||||
|
||||
if args.type == "gpt2":
|
||||
print("Running GPT-2 tokenizer")
|
||||
tok_p = GPT2Tokenizer.from_pretrained(args.vocab, args.merges)
|
||||
tok_p = GPT2Tokenizer.from_pretrained('gpt2')
|
||||
|
||||
# Create a Tokenizer using BPE
|
||||
tok_r = Tokenizer(BPE.from_files(args.vocab, args.merges))
|
||||
|
Reference in New Issue
Block a user