xu-song's picture
update
da93e39
raw
history blame
No virus
515 Bytes
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)
# tokenizer = AutoTokenizer.from_pretrained("fnlp/moss-moon-003-sft", trust_remote_code=True)
# vocab_size = len(tokenizer.get_vocab())
# vocab_size = tokenizer.vocab_size
tokenizer.comments = "在gpt2词典基础上,扩充了5万中文"