transformers icon indicating copy to clipboard operation
transformers copied to clipboard

meta-llama/Llama-2-7b-chat-hf tokenizer `model_max_length` attribute needs to be fixed.

Open rohitdwivedula opened this issue 1 year ago • 0 comments

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 examples folder (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.

rohitdwivedula avatar Jun 28 '24 22:06 rohitdwivedula