Spaces:
Running
Running
File size: 421 Bytes
751936e f4973d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import os
from transformers import AutoTokenizer, BloomTokenizerFast
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
TOKENIZER_DIR = os.path.join(CURRENT_DIR, "moss-moon-003-sft")
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_DIR, trust_remote_code=True)
# vocab_size = len(tokenizer.get_vocab())
# vocab_size = tokenizer.vocab_size
tokenizer.comments = "在gpt2词典基础上,扩充了5万中文"
|