Skip to content

Conversation

@65a
Copy link
Contributor

@65a 65a commented Jan 17, 2026

During initial fitting, if the n_ctx is 0, try to fit using n_ctx_train.
If initial fitting was successful, make sure to set n_ctx to n_ctx_train instead of leaving it at zero.

This could be done differently, but this approach avoids making cparams mutable deeper in the stack, and then having to clean it back to 0 if we aren't going to early return.

Fixes #18889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eval bug: llama_model_fit results in zero context size

1 participant