Skip to content

PR5: static YaRN factor-4 rope extension - #5

Open
Astrangemaninhere wants to merge 6 commits into
masterfrom
pr/yarn-rope
Open

PR5: static YaRN factor-4 rope extension#5
Astrangemaninhere wants to merge 6 commits into
masterfrom
pr/yarn-rope

Conversation

@Astrangemaninhere

@Astrangemaninhere Astrangemaninhere commented Aug 31, 2026

Copy link
Copy Markdown
Owner

PR5: static YaRN factor-4 rope extension

Background

The native Qwen3.8 context is 262k; YaRN factor-4 extends the rope domain to ~1M positions so the model can be served far beyond native context.

Changes

  • Static YaRN factor-4 rope: Text D256/R64 and DFlash D128/R128 rope domains extended 4x.
  • Capacity relaxation: --kv-capacity may floor the device page pool below --max-context (the rope domain can exceed the pool; the cold pool recycles pages under pressure). Serve/CLI/engine validation relaxed accordingly.

Files

  • src/core/device.h (yarn flag)
  • src/serve/serve_options.cpp, apps/cli/options.cpp (--yarn)
  • src/runtime/engine/kv_capacity.cpp (capacity floor relaxation)
  • rope kernels (factor-4 extension)

Dependency

Depends on PR1/PR2 (cold pool recycles pages under the relaxed pool). Merge after PR2 (order relative to PR3/PR4 is flexible).

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.

1 participant