mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
Fix Python README example
This commit is contained in:
@ -145,11 +145,15 @@ tokenizer.decoder = decoders.ByteLevel()
|
||||
tokenizer.post_processor = processors.ByteLevel(trim_offsets=True)
|
||||
|
||||
# And then train
|
||||
trainer = trainers.BpeTrainer(vocab_size=20000, min_frequency=2)
|
||||
trainer = trainers.BpeTrainer(
|
||||
vocab_size=20000,
|
||||
min_frequency=2,
|
||||
initial_alphabet=pre_tokenizers.ByteLevel.alphabet()
|
||||
)
|
||||
tokenizer.train([
|
||||
"./path/to/dataset/1.txt",
|
||||
"./path/to/dataset/2.txt",
|
||||
"./path/to/dataset/3.txt"
|
||||
"./path/to/dataset/1.txt",
|
||||
"./path/to/dataset/2.txt",
|
||||
"./path/to/dataset/3.txt"
|
||||
], trainer=trainer)
|
||||
|
||||
# And Save it
|
||||
|
Reference in New Issue
Block a user