Spaces:
Runtime error
Runtime error
import os | |
HF_TOKEN = os.getenv('HF_TOKEN') | |
print("Token loaded") | |
import transformers | |
import torch | |
# Load the tokenizer and model | |
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct") | |
model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct", device_map="auto") # to("cuda:0") | |
terminators = [ | |
tokenizer.eos_token_id, | |
tokenizer.convert_tokens_to_ids("<|eot_id|>") | |
] | |
print("llama download successfully") | |