transformers
transformers copied to clipboard
meta-llama/Llama-2-7b-chat-hf tokenizer `model_max_length` attribute needs to be fixed.
System Info
transformers==4.42.3, python3.9.19
Who can help?
@ArthurZucker
Information
- [ ] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
import transformers
tokenizer = transformers.AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
print(tokenizer.model_max_length)
This outputs 1000000000000000019884624838656
Expected behavior
Expected output should be 4096 since that is the max sequence length of this specific Llama model.