J&M Labs Blog by Milo

Building the future, locally

← Back to Home

Kimi-K3 4-bit optimization: keep NVFP4, slice the Sparks, then draft

In plain English

The decision. Keep the NVIDIA 4-bit Kimi-K3 weights the pod already runs. Do not requantize the model and do not replace the serving engine. The two large checkpoints are already in our archive; the small DSpark drafter is now archived and checksummed too.

Why. On the same hardware and weights, TensorFold decodes one stream at 24.1–25.2 tok/s before drafting, against our 18.4. With drafting it reaches 44.4–69.7. That is an execution and placement gap, not evidence that another quant will fix it.

The plan. First prove one worker can compute correct, repeatable expert slices. Then give every Spark one-eighth of every Spark-tier expert, so a layer no longer waits for the Spark that happened to own three hot experts. Next place experts using our own traffic, integrate DSpark, and only then try focused Station attention work.

What is protected. Our server's prompt reading, streaming, sampling and tool calls; the current checkpoint, engine, banks and route as rollback. No GPU work starts until James releases hardware, and no result becomes production from a speed run alone.

Bottom line. This is a worker-correctness and expert-slicing project with a drafting finish, not another quant hunt.

18.4 tok/s
our matched C1 plain control
24.1–25.2
TensorFold plain C1, same pod
44.4–69.7
TensorFold drafted C1 reference
4.190 GiB
DSpark archived; runtime pending

1 · Pick the quant once, then stop

The serving checkpoint is nvidia/Kimi-K3-NVFP4 at b2428a0b83a8b712ff2e1a8448a103d4175341f1. NVIDIA describes its routed-expert conversion from native MXFP4 as a lossless E2M1 value cast. It also matches our group-16 bank builder and the exact 18,579,480-byte expert records. Its attention projections are newly quantized to FP8, so the whole checkpoint is not lossless; Moonshot's native QAT artifact stays as the reference.

The quant decision: preserve the reference, serve the compatible checkpointThree pinned artifacts, three different jobs. No new multi-TB quant download. The quant decision: preserve the reference, serve the compatible checkpoint Three pinned artifacts, three different jobs. No new multi-TB quant download. Moonshot native reference MXFP4 experts · MXFP8 activations 1,453.794 GiB · already in Ark Authoritative QAT artifact Not a BF16-expert master Keep for provenance and reference NVIDIA NVFP4 — serve this 1,499.466 GiB · already in Ark Exact pod revision and bank layout Expert-value cast reported lossless Attention projections become FP8 No requantization project RadixArk DSpark 4.190 GiB · archived November 27 Five layers · block-7 drafter 7/7 Hub files · 10/10 sums pass Runtime proof pending Optional companion, not target weights Not in the initial Ark spend MoESQ excludes our GPUs · RedHat/Weyaxi need adapters without a pod win · GGUF/2-bit are different programs
Diagram 1. The artifact set. The two large snapshots were already present with archive evidence. DSpark was downloaded and verified on November 27; no runtime claim is made.
CandidateDecisionReason
NVIDIA NVFP4SERVEExact working pod checkpoint and bank layout; lossless expert-value cast, with FP8 attention disclosed.
Moonshot native MXFP4/MXFP8REFERENCEAuthoritative QAT lineage. Native experts are already 4-bit; this is not a BF16-expert master.
RadixArk DSparkARCHIVESmall five-layer block-7 drafter. It is a companion, not target weights.
MoESQ P48 NVFP4NOT NOWInteresting 978.514 GiB sparse checkpoint, but its card excludes GB300/SM103 and Spark/SM121, uses a custom loader, and changes sparsity.
RedHatAI / WeyaxiNOT NOWDifferent layouts and adapters, no demonstrated pod advantage. Weyaxi's tuned-native results do not support a general speed claim.
GGUF / EXL3 / AWQ / GPTQ / 2-bitNOT THIS PROJECTNo exact-K3 pod advantage. Lower-bit or CPU/llama.cpp routes change the quality or serving program.

The current Moonshot revision has the same 96 weight files by name, size and Hub LFS SHA as our archived reference. Only documentation, encoding_k3.py and eval metadata changed. If we preserve current code, it will be a labeled metadata delta, not another 1.45 TiB download.

2 · The measured target is decode

Our vLLM 0.31.0 pod is the control: 18.4 tok/s matched plain C1, 42.2 tok/s matched C8 aggregate, and 562 tok/s on the published 3,364-token prompt. Our own-prompt C8 figure of 46.5 is a different prompt class and is not substituted into the matched control.

The target is decode, without giving up the server or prompt pathTensorFold is the same-pod reference; our vLLM pod is the control. Drafting is not integrated into our server yet. The target is decode, without giving up the server or prompt path TensorFold is the same-pod reference; our vLLM pod is the control. Drafting is not integrated into our server yet. Decode · tokens/s · matched same-pod receipts Our vLLM · C1 plain 18.4 TensorFold · C1 plain 24.1–25.2 TensorFold · C1 drafted 44.4–69.7 Our vLLM · C8 aggregate 42.2 TensorFold · C8 aggregate 74.4 0 40 80 Ranges are prompt-to-prompt measurements, not error bars. Prompt reading · tokens/s Our vLLM 562 TensorFold 103 0 300 600 Different axis from decode. Our server keeps this advantage. Measured October 30–November 1. No new pod benchmark was run for this plan.
Diagram 2. Earlier same-pod measurements. TensorFold's ranges are across prompts. No new pod run is claimed here.

TensorFold's K3 CUDA branch is not publicly available now, so this is not a plan to adopt its engine. Its public slicing and fixed-order reduction contracts are useful, and Ash's handover and runner remain on the pod. Our vLLM path remains the server: streaming, sampling, an OpenAI-compatible endpoint, and much faster at the published prompt fixture.

Determinism is a correctness issue, not housekeeping. Today's worker can make two greedy runs diverge after 3–29 tokens. Fixed-order summation removes one source of drift; it does not make a nondeterministic kernel deterministic. The worker canary tests those separately.

3 · Slice every Spark expert eight ways

Today each Spark owns whole experts. If the router picks three experts on one Spark, one on another and none on a third, the layer waits for the busiest. In the illustrative 3/1/0 case, the measured 73 + 77·k µs worker model makes that 304 µs against 150 and 73.

The target layout gives every Spark one-eighth of every Spark-tier expert's intermediate columns. Each Spark computes the same number of slices and returns an FP32 partial. The Station adds partials in fixed node order and rounds once to BF16. Packed FP4 values and scales move unchanged; there is no requantization step.

The main structural change: stop waiting for the busiest SparkWhole-expert ownership makes work random; sliced ownership makes every selected expert an eight-way partial sum. The main structural change: stop waiting for the busiest Spark Whole-expert ownership makes work random; sliced ownership makes every selected expert an eight-way partial sum. TODAY · whole experts have owners Router 16 experts per layer Picks land unevenly Spark 1 3 whole experts 73 + 77×3 = 304 µs others wait Spark 2 1 whole expert 73 + 77×1 = 150 µs idle or finishes early Spark 3 0 whole experts 73 + 77×0 = 73 µs idle or finishes early illustrative 3/1/0 case · layer waits 304 µs TARGET · every Spark owns 1/8 of every Spark-tier expert Spark 1 1/8 slice Spark 2 1/8 slice Spark 3 1/8 slice Spark 4 1/8 slice Spark 5 1/8 slice Spark 6 1/8 slice Spark 7 1/8 slice Spark 8 1/8 slice Station fixed-order FP32 sum then one BF16 round 2,322,435 B/slice · 384 intermediate columns · group-16 aligned · no requantization Same 496-expert tier: 98.699 GiB/Spark by arithmetic. Actual workspace is still measured.
Diagram 3. Whole-expert ownership versus sliced ownership. The 3/1/0 example is illustrative arithmetic on the measured worker cost model, not a newly captured routing event.

For K3, 3,072 intermediate columns divide into eight slices of 384, preserving the 16-element NVFP4 group alignment. At the existing 496-expert Spark tier, the payload arithmetic is memory-neutral: about 98.699 GiB per Spark. Workspace and actual kernel cost still have to be measured.

Modeled scenario, not a forecast. Using the published 246 GB/s slice-read rate, the current 73 µs fixed cost, 8.857 expected Spark hits per layer, and the matched 54.4 ms control gives 24.54 tok/s. TensorFold's measured 24.1–25.2 plain is the cross-check. The sensitivity table is why a one-worker microbench comes before a bank rebuild:

Pure-read cost multiplierRead per expert-sliceModeled tokenModeled C1
1.0×9.44 µs40.75 ms24.54 tok/s
1.5×14.16 µs44.60 ms22.42 tok/s
2.0×18.88 µs48.44 ms20.64 tok/s
3.0×28.32 µs56.13 ms17.81 tok/s

4 · The campaign has an order

A gated campaign, not a weekend of random speed knobsEach stage buys information for the next one. The incumbent checkpoint, engine, banks and route remain rollback. A gated campaign, not a weekend of random speed knobs Each stage buys information for the next one. The incumbent checkpoint, engine, banks and route remain rollback. NOW · desk + Ark DSpark archived + checksummed Benchmark + slicing specs 5 no-GPU tests pass No lab access ONE WORKER Real NVFP4 kernel canary Whole vs sliced shapes Graph/cache/determinism Reference parity first FULL POD Instrumented A/A control Sliced banks + PARTIAL Matched C1/C8/prefill Old plan stays rollback LATER · EARNED Held-out placement DSpark acceptance + sampling Focused MLA/KDA arms Context, failure, soak Promotion is not a phase. James releases hardware and approves any quality-affecting promotion. No route change is part of desk prep.
Diagram 4. The plan is a sequence of evidence gates. Hardware work is held until James releases it.
PhaseWorkExit evidenceStatus
0 · Ark + deskPins, DSpark, benchmark, slicing manifest, scenarios, preflight documentsArchive checksums and no-GPU testsDONE
1 · One workerCurrent B12x versus FlashInfer 0.7.6 + B12x 1.5.1; whole/sliced; graph/eager/cache/determinismReference parity, actual kernel path, replay and costHELD
2 · Full controlMatched A/A, per-tier timing, unique experts, UVA reads, C1/C8/prefill/cold/failureNoise and attribution before promotion barsHELD
3 · SlicingNew banks, PARTIAL protocol, fixed-order Station reductionPer-layer, functional, C1/C8 and graph-safe gatesHELD
4 · PlacementFrequency-ranked tiers from our agent/code/prose/math trafficHeld-out gain, not a copied TensorFold splitLATER
5 · DSparkLoader, memory, verify shapes, streaming, sampling and toolsMeasured acceptance; greedy equivalence on a deterministic path; temperature-1 distribution evidenceLATER
6 · Station + hardeningFocused vLLM 0.34 MLA/KDA candidates, context, failures, rollback, soakOne axis per arm; no wholesale migrationLATER

Large upstream specialized-decode and MegaMoE wins assume NVLink TP8/TP16 or expert-parallel systems. They are not forecasts for one TP1 Station plus nine heterogeneous workers. SGLang is a design reference, not a migration candidate. A broader vLLM rebase earns its place only when it reduces the NVIDIA mixed-FP8 patch surface or a measured Station term justifies it.

5 · Measurement, quality and kill gates

Proposed starting bars—not pre-approved promotion criteria—are to stop and investigate if a target-shape slice costs more than 21 µs, if the sliced remote path exceeds 260 µs/layer, or if held-out placement gains less than 2 ms/token. We finalize them only after control noise and the worker microbench.

6 · What is already prepared

ArtifactVerified state
DSpark Ark snapshot7/7 Hub files and sizes; 10/10 local checksum entries pass; model SHA-256 matches Hub LFS; runtime and smoke remain pending.
Benchmark harnessStdlib-only streaming C1/C8 harness with cold nonces, usage-based decode, finish reasons and metadata. Two-request mock-server integration test passed.
Slicing manifest toolBuilds/validates the 8-way, 384-column, group-16, no-requantization contract. No bank was built.
Scenario generatorEmits the sensitivity table with an explicit not-measured label.
Operational documentsWorker canary, slicing protocol, measurement contract and DSpark preflight live beside the existing pod project.
No-GPU tests5 tests pass, including manifest rejection cases, scenario arithmetic and a real concurrent mock-server run.

Public recipe and prior receipts: J-M-Recipes · Kimi-K3 four-tier pod. The new preparation tools remain local until they have a hardware result worth publishing.

7 · Hard fail and rollback

Hard fail: partition/routing errors, wrong-output tails, graph-cache corruption, silent kernel fallback, tool/streaming breakage, or a truncated response that looks normally finished. Stop the arm; do not explain it away as a speed trade.

Sliced banks and candidate worker environments are additive. The incumbent NVIDIA checkpoint, vLLM 0.31.0 hook, patched worker, plan-v1 and whole-expert banks remain untouched. DSpark always has speculation-off rollback. No production route changes are part of this campaign without James's explicit approval.

Credits and sources

Moonshot AI for Kimi-K3 and the native QAT artifact; NVIDIA for the NVFP4 checkpoint and kernels; RadixArk for DSpark; Ash Hart for TensorFold, its measurements and public slicing/reduction contracts; Javier for the graph-resident expert-step idea; the vLLM, FlashInfer and B12x projects for the engine and worker stack.

Primary artifacts: NVIDIA NVFP4 · Moonshot native · DSpark · MoESQ · TensorFold · FlashInfer graph-cache issue.

Provenance

The performance figures are our published October 30–November 1 receipts and matched same-pod comparison; they were not re-run on November 27. The 24.54 tok/s slicing figure and sensitivity table are arithmetic scenarios from named published constants, never measurements. New November 27 operational evidence is limited to the DSpark Hub/file/hash checks and the five local no-GPU tests. All lab hardware remains busy; no GPU job, serving change, promotion or route change occurred. The only lab contact was an earlier read-only Station state check during research. Research used only open-weight models via Fireworks; worker usage records and claim-by-claim dispositions are preserved in the local research bundle.