You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NameError: name 'model' is not defined - when max_new_tokens exceeds model.config.max_position_embeddings #2034
When calling model generate and max_new_tokens exceeds
Traceback (most recent call last):
File "model_evaluator.py", line 63, in generate_answer
outputs = model.generate(
File "/home/miniconda3/envs/arc24_fixed_03_2025/lib/python3.10/site-packages/unsloth/models/llama.py", line 1551, in unsloth_fast_generate
f'Unsloth: input length {kwargs["input_ids"].shape[-1]} + max_new_tokens {kwargs["max_new_tokens"]} exceeds the maximum sequence length of {model.config.max_position_embeddings}!\n'\
NameError: name 'model' is not defined
Activity
KareemMusleh commentedon Mar 17, 2025
this should be fixed