Skip to content

[Feat] [GB300] kimi-k3: TP8 DSpark, long contexts and optional runtime APIs - #25

Merged
YAMY1234 merged 39 commits into
sgl-project:mainfrom
leejnau:feat/kimi-k3-dspark
Nov 5, 2026
Merged

YAMY1234 merged 39 commits into
sgl-project:mainfrom
leejnau:feat/kimi-k3-dspark

Conversation

@leejnau

@leejnau leejnau commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This consolidates Kimi K3 TP8 target verification, bounded long-context support
and optional providers behind the hybrid runtime/API-v2 interfaces merged in
SGLang #45406. Enabling the
plugin does not enable speculation. Ordinary decode remains ordinary decode;
when DSpark is explicitly configured, the qualified serving configuration is
five-draft/q6 with stock draft execution and native acceptance. TRTLLM MLA and
DCP off remain the registered defaults. Ordinary decode and q6 have matched real-weight
functional evidence through a 262,144-token deployment context, including a
262,000-input/128-output edge case, mixed lengths, request retirement/reuse,
hidden-state handoff and graph replay. These are bounded numerical/functional
results, not global bitwise equivalence or task-quality qualification. AgentX-derived
performance on the published plugin and merged framework is reported below.

API docstrings describe defaults, opt-ins and framework requirements. Admitted
shapes and implemented APIs are not blanket GPU qualification:

Capability Default and validated boundary
Ordinary TP8 decode, q6 and long contexts Qualified in bounded configurations through 262,144 context; other admitted q4–q8 widths have component coverage, not equivalent full-model qualification
Experts launch optimization On the normal prepared path; component and matched-serving evidence, no isolated speedup claim
Cross-layer weight prefetch OFF; bounded short ordinary/q6 serving, ownership and resource-absence checks
Specialized embedding gather OFF; bounded short ordinary/q6 checks; native embedding/fallback retained
Selected capture-width preparation Dormant adapter API with CPU wiring checks and bounded subset GPU evidence; not arbitrary-width qualification
TokenSpeed MLA Dormant alternative; matched TP8 ordinary/q6 at 8K; TRTLLM remains default
DCP8 ordinary decode and fixed-q6 Dormant resource/execution APIs; matched bounded 8K evidence on the required framework extensions, not registered stock-framework support
Broader configured ordinary widths Numerically unqualified; five failures at B17/B33/B64 retained, no new registered admission

The broad configured-width experiment retains five numerical failures under
unchanged thresholds. Those configurations are not newly qualified by this PR.
A separate registered-default width-64 published/candidate control matched
64 sequences and 4,096 selected-token log probabilities exactly; that is not a
native-stock accuracy proof or a waiver of the broader failures. Legacy B64
admission is unchanged; a public default-path regression has not been established. Optional-ON
combinations, DCP long contexts and TP16 are not claimed.

Public tests are redesigned around essential admission, DSpark state/metadata
and optional-resource regressions, retaining the existing merged contracts.
PR test additions are reduced 81% (7,351 → 1,373 lines); extensive qualification
suites are maintained separately. Native Linux ARM64 CPU validation passed
594 tests and 185 subtests with zero failures, errors or skips across 21
plugin files and four framework suites in one process, using plugin
47b71a8fece935de57585b1e4a235e0954532cb6 and merged SGLang
aa3e34aaebf880d72482cea74dbbfef54da728e2. Production code and kernel payload
are unchanged. Earlier GPU correctness and AgentX evidence retain their exact
tested revisions; this test-only redesign does not change numerical standards.
The pinned lint hooks pass.
Validation includes native CPU imports, registration and API contracts,
optional-dependency rejection, ownership/layout guards, wheel/source integrity
and frozen-payload checks. The payload checksum reflects the actual included
KDA/AttnRes and subsequent intentional adaptations; unrelated model and shared
CI changes are preserved. CPU contracts and test-local mocks are not GPU
qualification. Historical matched GSM8K evidence remains 1,283/1,314 specialized
versus 1,284/1,314 stock on its recorded q6/8K pair; the separate 0.5588 logprob
canary FAIL is preserved. No new GSM8K accuracy result is claimed.

AgentX-derived C1 performance

Tested the published plugin 82a0e49218c7e855bafb43285e3a3f7e1787899e with
merged SGLang aa3e34aaebf880d72482cea74dbbfef54da728e2 (including the final
SGLang #45406 KDA state-routing correction). Each arm completed a full one-hour
measurement on eight GB300 GPUs: TP8, C1, five draft proposals/q6, stock
RadixArk draft execution, and AgentX's acceptance setting of 3.53 including
the bonus token
. Both runs met the harness validity requirements and exercised
inputs exceeding 250K tokens.

Metric Stock Specialized Change
Output throughput 111.97 tok/s 150.92 tok/s +34.8%
P90 E2E normalized interactivity 52.46 tok/s/user 66.37 tok/s/user +26.5%

The RadixArk draft replaces AgentX's prescribed draft, so these are
AgentX-derived results. Four stock and three specialized empty-response errors
remain counted. Aggregate p90 TTFT was 2.483 s versus 2.705 s; across 463 shared
successful trace turns it was 2.495 s versus 2.469 s, with the faster run reaching
additional workload. See the performance update
for the comparison and retained limitations.

@leejnau

leejnau commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Matched TP8/q6 validation

Tested SGLang 02406d4ef05680cbf3d77287354d887b039141d9 with this plugin at 194d693d15a51f74a727889531fd6d9cd01bf355: eight GB300 GPUs, TP8, five draft proposals plus one anchor, stock draft execution, DCP off, and an 8,192-token context limit. Checkpoints: moonshotai/Kimi-K3@9f62e4e9fffbd0a83ddd60e1c209d828994b3569 and RadixArk/Kimi-K3-DSpark@3c5bac301d9cf392706189d82ed947feca6c2f0f.

  • Native preflight: eight suites on each of two hosts, 140 tests + 105 subtests per host, no failures or skips.
  • GSM8K: 1,284/1,314 stock (97.72%), 1,283/1,314 specialized (97.64%). Paired outcomes: 1,281 both correct, three stock-only, two specialized-only, 28 both wrong. No failed requests or retries; length-limited answers remained scored.
  • GSM8K accepted draft tokens per verification, excluding the bonus token: 3.8264 stock / 3.7966 specialized.

End-to-end output throughput, with 1,024 forced output tokens per request:

Batch Input tokens Stock output tok/s Specialized output tok/s Ratio
1 128 226.63 470.28 2.08x
4 128 552.29 1,056.91 1.91x
1 6,144 176.88 369.78 2.09x
4 6,144 421.21 603.81 1.43x

Each cell uses two warmup waves and five measured waves; throughput is batch output tokens divided by median client-observed makespan. Both arms use greedy generation and fresh servers, in a fixed stock-then-specialized sequence. These are descriptive full-request workload measurements, not isolated kernel speedups or decode-step latency. Generated histories differ in 39/50 measured request pairs; accepted drafts/verification on this timing workload are 3.5261 stock / 3.4553 specialized. The five rounds are not independent server launches.

Numerical scope: the previously observed canary difference recurred exactly in two repeats (same-token absolute log-probability difference 0.5588 against tolerance 0.5) and remains recorded as FAIL. Task-quality and timing results were collected separately; no new numerical failure was observed. These results do not establish bitwise equivalence or an all-numerical-checks-pass result.

@leejnau
leejnau force-pushed the feat/kimi-k3-dspark branch from 194d693 to e64e4d0 Compare October 26, 2026 06:08
@leejnau leejnau changed the title [Feat] [GB300] Kimi K3: Add fixed-window DSpark target verification [Feat] [GB300] Kimi-K3: Add fixed-window DSpark target verification Oct 26, 2026
@leejnau leejnau changed the title [Feat] [GB300] Kimi-K3: Add fixed-window DSpark target verification [Feat] [GB300] Kimi-K3: Add DSpark and long-context support Oct 27, 2026
Comment thread sgl_nvidia_mega/kimi_k3/spec.py Resolved
Prefer the new spec and binding namespaces, falling back only when the requested namespace is absent. Keep missing symbols and dependency errors visible, and exercise both import layouts without changing execution semantics.
Bind separate KDA verification checkpoints and leave acceptance and persistent-state commits to SGLang. Publish the configured auxiliary mixtures, prepare uniform q4-8 token-row policies, and normalize inactive MLA metadata in owned graph-safe storage. Preserve ordinary one-token decode and the native draft path.
@leejnau
leejnau force-pushed the feat/kimi-k3-dspark branch from c780462 to 90e1b1b Compare October 30, 2026 02:52
Combine the requested-width preparation from 8400331cb989de840d55f6fd33cf2d1068f0dbb5 with default-off prefetch and the experts refresh. Attach prefetch to the single-row chain only when that chain was prepared.

Exercise omitted and explicit OFF, ON with and without a single-row owner, q6 preparation, and controller table/resource reuse. Host qualification only; combined native GPU and serving validation remain pending. Defaults, kernel arithmetic, attention backend and public framework behavior are unchanged.
…mi payload

Merge upstream f0f7bf1 (sgl-project#36) in an isolated private candidate. Preserve the complete Kimi production/test tree at d3b1ba4, including API v2, strict import guards, DSpark, long context, dormant capabilities and its verified 43-file payload digest. Preserve upstream DeepSeek, Qwen and CPU CI changes exactly. No GPU qualification or public activation is conferred.
Carry the exact one-line correction from upstream sgl-nvidia-mega sgl-project#37 (c396f2a). The framework CI pin and all runtime, test, and packaging files are unchanged; this is a private CI-only follow-up, not a runtime rebase.
Record the upstream ancestry of the already-applied CI collection correction. Preserve the complete tested candidate tree and reviewable feature commits. No runtime, payload, public exposure, or qualification change.
@leejnau leejnau changed the title [Feat] [GB300] Kimi-K3: Add DSpark and long-context support [Feat] [GB300] Kimi K3: consolidate TP8 DSpark, long-context and optional runtime support Nov 5, 2026
@leejnau leejnau changed the title [Feat] [GB300] Kimi K3: consolidate TP8 DSpark, long-context and optional runtime support [Feat] [GB300] Kimi K3: TP8 DSpark, long contexts and optional runtime APIs Nov 5, 2026
@leejnau leejnau changed the title [Feat] [GB300] Kimi K3: TP8 DSpark, long contexts and optional runtime APIs [Feat] [GB300] kimi-k3: TP8 DSpark, long contexts and optional runtime APIs Nov 5, 2026
@leejnau
leejnau force-pushed the feat/kimi-k3-dspark branch from 8cb6386 to 82a0e49 Compare November 5, 2026 03:54
@leejnau

leejnau commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

AgentX-derived C1 performance

Compared stock and specialized execution on eight GB300 GPUs: TP8, five draft proposals/q6, stock RadixArk draft execution, and AgentX’s acceptance setting of 3.53 including the bonus token. Each arm completed a full one-hour measurement.

Metric Stock Specialized Change
Output throughput 111.97 tok/s 150.92 tok/s +34.8%
P90 E2E normalized interactivity 52.46 tok/s/user 66.37 tok/s/user +26.5%

Both runs met the harness validity requirements and exercised inputs exceeding 250K tokens. This uses the AgentX protocol with the RadixArk draft substituted for its prescribed draft.

Aggregate p90 TTFT was 2.483 s versus 2.705 s; the specialized run progressed farther into the workload. Across 463 shared successful trace turns, p90 TTFT was 2.495 s versus 2.469 s. Four stock and three specialized empty-response errors remain included in the results; their exact cause is unresolved.

@YAMY1234
YAMY1234 merged commit 703e41c into sgl-project:main Nov 5, 2026
4 checks passed
@leejnau
leejnau deleted the feat/kimi-k3-dspark branch November 5, 2026 22:15
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.

2 participants