mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2957] [Engine] a WARNING when --max-context is past the model's trained context and no rope scaling is active #4360
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4360
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2957
Author: @sergqwer
Created: 10/17/2026
Status: 🔄 Open
Base:
main← Head:pr/ctx-warning📝 Commits (1)
469b176engine: a WARNING when --max-context is past the model's trained context and no rope scaling is active📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
src/program/generate.cpp(+9 -0)📄 Description
Problem and result
A config written by hand with
--max-context 524288and no--rope-scalingstarts without a word. Positions past 262,144 then rotate by angles the model never saw. Setup adds yarn above the trained context, but a hand-written config does not go through setup.Related discussion
None needed: a focused diagnostic, no behaviour change. It was #2957 before the 0.2.0-beta tracker reset, unchanged except for the rebase.
Approach
Where
generate.cppresolves the rope config tonone, it compares--max-contextwith the trained context (the model's, or--yarn-orig-ctx) and prints the line once, before the experts load. The suggested--rope-scaleis--max-context/ trained context. 9 lines insrc/program/generate.cpp, no new flag.Validation
Revision: this branch, one commit
469b1760onmaine88ee39d(v0.2.0-beta + 12 commits), against a build ofmaine88ee39d. RTX 5090, Ryzen 9 9950X3D, 128 GB, Windows 11; MSVC 2022 17.14, CUDA 13.3, release configure (-DSTRATA_PORTABLE=ON,75-real;86-real;89-real;120-real, ggml at the pinned 3cf03257). Model: the NVFP4 GPTQ pack (Maximilian228/Qwen3.8-Flash-Next-NVFP4-GPTQ-Strata, upstream setup's--family nvfp4 --model NVFP4files). Each start isstrata --servewith setup's model files plus--expert-cache 3000 --prefill auto --spec 6 --spec-min-p 0.7 --kv int8 --gpu 0 --pcie-frac 0 --adapt-every 1000000, envSTRATA_PREFILL_CPU_SHARE=0 STRATA_PCIE_BALANCE=0 STRATA_IQ_MT_MIN=1.Passed:
maine88ee39d--max-context 524288, no--rope-scaling--max-context 524288 --rope-scaling yarn --rope-scale 2rope scaling yarn, factor 2 (freq_scale 0.5, base 1e+07, mscale 1.069315) ...line--max-context 262144STRATA_DUMP_FIRST_LOGITS, a 2,100-token and a 32,037-token prompt, 32 greedy tokens each, both stop at the end of turn): first-token logits and tokens byte-identical tomain's. 2K1e9c612c2e6c7a32..., 4 tokens; 32Kf5b2872c7ac30b17..., 20 tokens.Failed: none observed.
Not run:
generate.cpp; no ROCm or Mac here. The change is a plainfprintf.sycl/src/program/generate.cppis not changed, so a SYCL start stays silent.Limits
A warning only: the start goes on as before. It does not look at a context the client asks for per request, only at
--max-context.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.