Repository navigation
kimi: recognise K3.1 and bound its all-visible attention - #2208
Merged
Merged
Conversation
This was referenced Nov 5, 2026
ashhart
force-pushed
the
lead/k31-config
branch
from
November 5, 2026 03:59
31256c8 to
4cc027d
Compare
Parse the supplied DSA declaration, validate its supported geometry, and refuse evaluated positions beyond 2047. The all-visible equivalence is an inference from our GLM DSA, not a known K3.1 reference result. Load and prepare all five indexer tensors without changing K3 kernels. Add real-config admission regressions and the synthetic K3.1 fixture path. No real weights, no K3.1 reference, no full-model run. Host and synthetic device gates are queued separately under #2192.
ashhart
force-pushed
the
lead/k31-config
branch
from
November 5, 2026 07:00
4cc027d to
f8d17a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of #2192. Kimi K3.1 Pro's
text_config.model_typeis stillkimi_linear, so main's K3 family took its config as K3 and ignoreddsa_config, which would run full attention past the top-k with no warning. This makes K3.1 explicit:dsa_config's geometry, cadence and exact 24-layer set are checked before anything else reads the config, and values the kernels don't take refuse.error.K31ContextLimitrather than truncating; the serving PR maps that to its plain message.This is an inference, not a known fact about K3.1. Below the top-k, a Gated DSA layer should read like MLA over every position, as our GLM's does, and the 2,047 cap is chosen to be safe under any reading of
index_skip_topk_offsetandindex_topk_freq. K3.1's release has no modelling code, so nothing confirms it yet.Not run: no real weights, no K3.1 reference and no full-model run. The whole native build and complete host suite are CI's. K3 isn't served from main yet, so nobody can serve K3.1 from this alone; that's the next PR. Written from our own K3 and GLM families and the checkpoint's config and tensor list; no other engine's source was read.