Tokenizer model_max_length is inconsistent with the documented 4096-token context

#9
by sulaimanalshammari - opened

AutoTokenizer reports model_max_length=1000000000000000019884624838656, while config.max_position_embeddings=4096 and the model card documents a 4096-token context. Is this sentinel intentional, or should tokenizer_config.json expose 4096?

A proposed fix is now available in PR #10 and was verified on refs/pr/10: AutoTokenizer reports model_max_length=4096.

Additional behavioral proof: with a 6001-token Arabic input and truncation=True, main keeps all 6001 tokens, while refs/pr/10 truncates to 4096. This confirms the metadata difference changes AutoTokenizer truncation behavior. Proposed fix: PR #10.

Sign up or log in to comment