Skip to content

context : autoscale n_ctx_train when yarn scaling is specified - #28030

Merged
ggerganov merged 1 commit into
masterfrom
cisc/yarn-auto-scale-training-context
Sep 1, 2026
Merged

context : autoscale n_ctx_train when yarn scaling is specified#28030
ggerganov merged 1 commit into
masterfrom
cisc/yarn-auto-scale-training-context

Conversation

@CISC

@CISC CISC commented Aug 30, 2026

Copy link
Copy Markdown
Member

Overview

Fixes #17459

Additional information

When manually applying YaRN (or changing the scaling) n_ctx_train is left in original state, causing server to cap context to old size.

To work around this you previously had to do fiddly things like --override-kv <insert architecture here>.context_length=int:<new context length>.

Now you can simply specify f.ex. --rope-scaling yarn --rope-scale 4 and n_ctx_train will be automatically re-adjusted and YaRN then works as expected.

Requirements

@CISC
CISC requested a review from ggerganov as a code owner August 30, 2026 14:51
@CISC CISC added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Sep 1, 2026
@ggerganov
ggerganov merged commit dfc29b6 into master Sep 1, 2026
22 of 27 checks passed
@ggerganov
ggerganov deleted the cisc/yarn-auto-scale-training-context branch September 1, 2026 16:59
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: Can't use longer context than model via RoPE due to server-imposed restrictions

2 participants