import os import config from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b", trust_remote_code=True) 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 = ""