Are you sure it was properly saved?
#1
by
nobitha
- opened
i am getting an error while downloading the model .
ValueError: The state dictionary of the model you are trying to load is corrupted. Are you sure it was properly
saved?
tokenizer = LlamaTokenizer.from_pretrained("NousResearch/Redmond-Hermes-Coder")
it's not a llama model
do this:
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "bigcode/starcoder"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
karan4d
changed discussion status to
closed