eson's picture
fix gemma_7b
7011963
raw history blame
No virus
410 Bytes
import os
import config
from transformers import AutoTokenizer
if config.USE_REMOTE:
tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b", trust_remote_code=True)
else:
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
TOKENIZER_DIR = os.path.join(CURRENT_DIR, "gemma-7b")
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_DIR, trust_remote_code=True)
tokenizer.comments = ""