OSError: Can't load tokenizer for 'meta-llama/CodeLlama-7b-hf'
I’m following the official doc forcodeLlama in hfto do code infilling task. I have tried to log in via:>  huggingface-cli loginAnd here is my code:from transformers import LlamaForCausalLM, CodeLlamaTokenizer

tokenizer = CodeLlamaTokenizer.from_pretrained("meta-llama/CodeLlama-7b-hf")
model = LlamaForCausalLM.from_pretrained("meta-llama/CodeLlama-7b-hf")
PROMPT = '''def remove_non_ascii(s: str) -> str:
    """ <FILL_ME>
    return result
'''
input_ids = tokenizer(PROMPT, return_tensors="pt")["input_ids"]
generated_ids = model.generate(input_ids, max_new_tokens=128)

filling = tokenizer.batch_decode(generated_ids[:, input_ids.shape[1]:], skip_special_tokens = True)[0]
print(PROMPT.replace("<FILL_ME>", filling))But I have the following error. Can anyone see what’s wrong here?OSError: Can't load tokenizer for 'meta-llama/CodeLlama-7b-hf'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'meta-llama/CodeLlama-7b-hf' is the correct path to a directory containing all relevant files for a CodeLlamaTokenizer tokenizer.
2024-12-25T03:53:50Z
The model is a gated model. The document may be out of date.huggingface.cometa-llama/CodeLlama-7b-hf · Hugging FaceWe’re on a journey to advance and democratize artificial intelligence through open source and open science.huggingface.coGated modelsWe’re on a journey to advance and democratize artificial intelligence through open source and open science.