Skip to content

Kimi-K3.1: exceed the B300 C12 performance point #1

Open
6 of 12 issues completed
Open

Description

@whx-sjtu

Integration branch: k31-perf-opt

Parent: LLM-Booster#437.

Ready for measured optimization. Improve Kimi-K3.1 on one eight-GPU MI355X node until it meets the B300 C12 performance point. Development and independent review happen in this fork; required AITER changes belong in whx-sjtu/aiter.

Owner-confirmed requirement and operating agreement

Goals

  1. Reach at least 8003 total tokens/s/chip and 128.5 tokens/s/user P90 full-response interactivity in the same valid official 3600-second AgentX measurement.
  2. Preserve quality and the existing precision policy. Report P90 TTFT and E2E-normalized interactivity, including their changes against comparable controls, for the final acceptance judgement.
  3. Continue this conversation's optimization work. Select other work linked from the parent only when evidence supports substantial performance value; do not duplicate completed upstream work or pursue unrelated cleanup.

Acceptance

  • Performance: run the reviewed single-node AgentX recipe with its frozen scenario, dataset, client, draft revision and golden-acceptance policy. Use canonical bundle fields summary.request_metrics.throughput.per_gpu.total_tput_tps and summary.request_metrics.latency.full_response_intvty.p90. Throughput uses successful profiling input plus output tokens over the actual first-start to last-end span per GPU. Interactivity is 1000 divided by P90 full-response inter-token latency in milliseconds; the legacy dashboard native-ITL field is not this metric. The same result must satisfy both target numbers, disclose actual GPU count/concurrency, and pass the official protocol's validity checks. A short run, changed workload, layer-duration sum or alternative timing window is not target proof.
  • Evidence: python -m atom.benchmarks.results verify "$RUN_BUNDLE" --require-full must report a complete bundle. Preserve actual commands, runtime/source versions, eligible request data and measurement boundaries. This completeness check alone establishes neither measurement validity nor the performance thresholds. Verify the actual 3600-second client command, frozen configuration, request and cancellation ledger, server stability and cleanup separately. Preserve forced-acceptance synthetic markers and generic publication eligibility; the design must specify the approved golden-protocol comparison without relabeling it as natural acceptance.
  • Quality: run the full GSM8K 5-shot recipe with natural acceptance, 1319 examples, generation cap256 and fixed seeds. Its command is lm_eval --model local-completions --tasks gsm8k --num_fewshot 5 --model_args "model=kimi-k3.1-pro,base_url=http://127.0.0.1:$PORT/v1/completions,num_concurrent=8,max_retries=3,tokenized_requests=False,tokenizer=$MODEL_ROOT,trust_remote_code=True,max_gen_toks=256,timeout=300" --log_samples --output_path "$QUALITY_RESULTS" --seed 0,1234,1234,1234. Flexible-extract accuracy must be at least96%, with no significant paired degradation against a matching baseline; publish discordant counts and the statistical result, without calling a nonsignificant result equivalence.
  • Stability and guardrails: the accepted service run must have no server failures or stalls, retain valid cleanup evidence, and report TTFT/E2E guardrails and protocol-defined cancellations explicitly. E2E-normalized interactivity is 1 / P90(request_latency_s / actual_output_tokens). Final acceptance cannot be inferred from CPU tests, placeholder CI, an unverified runtime path or a microbenchmark alone.

Owner priority: model performance first

Prioritize fixed-configuration model/operator performance toward measured hardware limits before serving-configuration tuning. Use the verified ROCm#519 recipe/source record as a historical stable reference, with unrecovered runtime artifacts disclosed. Keep C12 final acceptance and all existing precision/quality requirements. Initial model/operator design does not wait for the deferred save-diagnostic line. Decision: #1 (comment)

Owner requirement: daily combined measurements

Owner update (2026-11-22, Asia/Shanghai): produce one daily complete 3600-second C12 end-to-end result combining the day's runnable model optimizations, so progress is visible. The daily lane proceeds alongside operator optimization and does not wait for #3/#15/#19 to close.

  • Cadence: default 20:07 Asia/Shanghai daily; prepare the first complete baseline immediately. Queue for verified available GPUs without preemption. Deduplicate by date/candidate and preserve every failed or blocked attempt.
  • Candidate: freeze an isolated reproducible combination of compatible implemented changes. Record exact ATOM/AITER commits, flags and included/excluded candidates with reasons. Experimental unmerged changes need source review, relevant numerical correctness and bounded model smoke; pending quality/performance status is explicit. Keep production landing gates unchanged.
  • Comparison: retain the established C12 recipe, dataset, client, precision and speculative/golden policy. Run the full 3600-second client profiling window; record startup/warmup/drain separately. Compare with the previous valid daily run and a fixed comparable baseline. Mark unchanged days and start a labeled new series for essential recipe changes.
  • Report: provide a dated row with total tok/s/chip, P90 full-response interactivity, P90 TTFT, E2E-normalized interactivity, requests/errors/cancellations, actual span, deltas, source/configuration, change roster, quality status and cleanup evidence.
  • Priority and limits: reserve the daily GPU measurement opportunity and re-enable only the minimum baseline/stability work necessary for valid completion. This supersedes milestone-only long runs and prior indefinite stability deferral for this lane. Reuse existing AgentX/results/ownership tools; no generic framework or unannounced serving sweep. Daily evidence does not waive final C12, natural GSM8K, precision, stability or merge/review gates.

Scope and non-goals

  • Start from this fork's main@cbf1617468110a81e720a00021c5d3c5e14ce232. Land reviewed work on k31-perf-opt; preserve old experimental revisions and results as historical controls, never relabel them as current-main results.
  • This milestone targets C12. Other concurrency points are a later milestone. Keep the existing distinction between the target B300 point and the actual ATOM concurrency tested.
  • Native BF16 linear/shared/combine/collective policy, permitted Mono latent dispatch, A4W4 experts, FP8 KV, FP4 indexer, FP32 KDA state and BF16 convolution state remain binding. No FP4 KV, static EPLB, silent protocol changes or unreviewed numerical relaxation.
  • Prefer engine improvements. Scheduling delay/admission tradeoffs remain last-resort work and must be reported separately.
  • No writes to ROCm/ATOM or ROCm/aiter. Parent reporting and cross-repository issue links are authorized. Do not close or rewrite unrelated upstream PRs merely because this work moved to a fork.

Team and validation policy

  • Use a total pool of eight subagents, all GPT-6.1 Sol/xhigh. Author, reviewer and orchestrator are distinct. Review capacity and GPU ownership determine active assignments.
  • Measurement tooling that preserves default inference may land after CPU checks and independent review. Optimizations changing inference or numerical paths require the corresponding GPU correctness, performance and established quality evidence before landing.
  • CPU tests and Black remain required. Record the existing Ruff findings at the baseline and reject new findings; do not turn unrelated lint cleanup into performance scope or silently expand the allowance.
  • GPU runs on g24 use the existing ownership lock, idle/pause checks, private compatible caches, bounded supervision and verified cleanup. CPU work remains isolated from GPU measurements. Large artifacts stay outside Git; GitHub records carry their locations, hashes and conclusions.
  • The owner will be away and authorizes recommended subsequent decisions without waiting. Use independent automatic rulings for ordinary technical choices within this agreement. Keep the agreed targets and validation boundaries; report only important progress and material risks.

Sub-issues

Sub-issues

6 of 12 Issues completed
Loading 12 sub-issues

Activity

  1. self-assigned this
    on Nov 20, 2026
  2. added
    agent-team/auto
    k31-performance
    on Nov 20, 2026
  3. whx-sjtu commented on Nov 21, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: the natural quality baseline is qualified; C12 performance remains open.

    The #10 handoff fixes canonical A0 and its independent comparison. PR #11 closed unmerged after APPROVE; integration source is unchanged.

    The latest diagnostic hit an earlier req9 native failure outside its req130 selection. Failed evidence is preserved. Prospective selection and failure-notification work awaits the internal technical decision; no new run or cause claim follows.

  4. whx-sjtu commented on Nov 21, 2026

    @whx-sjtu
    OwnerAuthor

    Ruling: prioritize model/kernel performance at fixed configuration before serving-configuration tuning. Ready to revise #3 and start the model-first work plan.

    This records the owner's direction: bring the model itself toward hardware limits first, then tune configuration. #519 is the primary historical stable reference. The C12 targets, quality/precision contract, fork ownership and integration branch remain unchanged.

    Priority, baseline and current diagnostic disposition

    Lock the tested source, precision, representative shapes and serving recipe for each comparison. Optimize the model compute path: operators, memory movement, fusion, launch overhead and required communication. Measure target-part compute, memory and communication limits and use focused profiling/ablation to bound remaining opportunity; report untested axes instead of asserting an absolute ceiling. Ablations with invalid outputs are diagnostic floors only. Production candidates still need numerical correctness, performance and the agreed full quality evidence.

    Do not pursue concurrency, MTP-width/acceptance, cache-sizing, timeout or admission-delay searches as the first optimization wave. Restoring and documenting the known-good control is baseline recovery, with every departure explicit. Keep ROCm#519's C16 metrics separate from C12 acceptance, and distinguish independently reviewed historical evidence from raw artifacts that have not been recovered. Develop on the existing fork-main-derived integration branch; do not silently reset it to the historical tree.

    Revise #3's model-first design and dependency order so #6's serving/save diagnostic no longer blocks initial model/operator work. Retain end-to-end stability and the full official C12 run as later acceptance gates. Preserve #6 and its unmet original-exposure criteria as deferred work; its latest leased run has already ended naturally. Finish only passive outcome/release sealing and handoff, then stop new save-observer implementation/experiments until the model-first plan reactivates that work.

    The first wave should reuse existing model/operator benchmarks, prior trace evidence and useful Inferact/amd-kernels implementations. The planner must provide small claimable tasks, isolated source ownership, separate author/reviewer roles and qualified GPU commands before new leases. Reuse the existing eight GPT-6.1 Sol/xhigh agents; no additional agents or unreviewed GPU work is authorized by this priority record.

    Also: #1 priority updated; #3 brief/dependency updated; #6 deferred after evidence duty; #12 notified.

  5. whx-sjtu commented on Nov 21, 2026

    @whx-sjtu
    OwnerAuthor

    Ruling on #14 affects this: Ready to prepare #19 as a separately gated actual-native-input qualification. The ruling concludes the original spike as INCONCLUSIVE_OUTSIDE_FROZEN_RANGES, unmerged and without APPROVE.

    Keep the fixture ratios as research evidence, with the failed absolute intervals visible. Reuse valid capture machinery without equating #15 K2 core to raw MLA inputs or delaying #15. Parent production, quality and C12 gates are unchanged.

  6. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: owner-approved daily combined 3600-second C12 measurements.

    The owner requests one daily full-model result containing that day's runnable optimizations, so progress is visible.

    Use 20:07 Asia/Shanghai as the default daily slot, with the first complete baseline prepared now. Queue for verified free GPUs without preempting another job.

    This adds a daily end-to-end lane alongside model/operator optimization. It supersedes milestone-only long runs and the stability deferral where they prevent daily measurement. It does not wait for #3/#15/#19 to close.

    Daily measurement agreement

    Freeze a reproducible isolated candidate from the fork baseline and compatible implemented changes. Preserve the current C12 recipe, dataset, precision, client, speculative/golden policy and metric definitions. List included commits/flags and excluded candidates with reasons. Unmerged candidates may be measured after source review, relevant numerical checks and a bounded model smoke; pending quality or performance qualification stays explicit. Do not promote standalone-kernel figures into integrated model gains.

    Run a full 3600-second client profiling window, with startup/warmup/drain and owned cleanup recorded separately. Compare with the previous valid daily result and a fixed comparable baseline. An unchanged candidate gets an unchanged-candidate record; a recipe change starts a clearly labeled series. Preserve failures and blocked attempts, then repair a concrete cause before a separately qualified replacement.

    Report total tokens/s/chip, P90 full-response interactivity, P90 TTFT, E2E-normalized interactivity, successful requests/errors/cancellations, actual span, both deltas, source/configuration, inclusion/omission roster, quality status and release evidence. Use a dated tracking issue under #1; #1 remains under LLM-Booster#437.

    Reuse AgentX, result-bundle and ownership tools. The planner will identify the minimum readiness/stability work without reviving unrelated observer or serving-configuration sweeps. Keep all final natural GSM8K, precision, stability, review/landing and C12 acceptance gates unchanged. A daily experimental result is not release approval.

  7. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: plan published: #21, #22, #23.

    Checked: independent preparation, immediate baseline/report, daily composition, deduplication/comparability and unchanged acceptance gates.

    #21 and #22 are claimable now; #23 depends on both. None waits for #3/#15/#19. Plan review passed; exact implementation/run qualification and Root's GPU lease remain separate.

    Independent plan review1: REVISE

    Reviewed draft SHA256 d24674c41b6f7ddd12dcdda15222567d2476fed8e151d33154d0a4debab55e7f. Review record: /share_nfs/whx/work/k31_perf_opt/.opt-team/agent-team/work/daily-plan-1/review-v1.md, SHA256 c937d9512ead2d7cea42373aa249f60fa6a1e2d68de825ef33a87131896606ae.

    Three blocking findings: the baseline must publish its own immediate dated report; the adapter must exclude the historical finalizer that closes ownership on unverified release; the baseline must use ordinary measurement-tool gates rather than a spike workflow that could require a duplicate long run. The nonblocking note distinguishes immutable runnable identity from mutable evidence/status and requires explicit comparison controls beyond the canonical fingerprint.

    The review accepted the independent baseline/composition preparation and downstream reporting decomposition, exact-source isolation, complete client window/ledger/report requirements, experimental unmerged admission with explicit quality status, and preservation of final precision/quality/stability/landing gates. It performed no implementation qualification or GPU action.

    Independent plan review2: PASS for publication

    Reviewed final draft: /share_nfs/whx/work/k31_perf_opt/.opt-team/agent-team/work/daily-plan-1/plan-1-v2.md, SHA256 0ac804fdc1d76c6976197898a0355a0db04c93c149807506c0a66db7cbb0d93f. Review record SHA256 3b92ab45235c456a41083710aab406770a7430c97b8123c20b1eb6d0c2222aa7 at the adjacent review-v2.md.

    All blocking findings are resolved; no remaining plan blocker or required revision. Code/test estimates are650/180 for #21,250/180 for #22,350/180 for #23. Each is a separate module with existing-interface tests, below the1000-line split threshold. Standard CPU gates apply; no task receives a GPU lease from this plan.

    #21 produces the first valid full C12 baseline and minimum dated row immediately, using explicit current1.0.13/C12/K3/AL2.88 controls and qualified ownership components. #22 freezes compatible implemented changes and an honest inclusion/exclusion/quality roster. #23 adds reusable daily20:07 Asia/Shanghai reservation/comparison/reporting, consuming the existing first row. The initial inference-change roster may be empty; standalone kernels, diagnostic floors and measurement tools are not model optimizations.

    Same-date/candidate duplicates are prevented; queued ownership is not preempted; failed/blocked attempts remain and replacements need qualified repair. Candidate identity excludes mutable status and tool-only updates. Full canonical fingerprints remain intact while fixed comparison controls distinguish intended ATOM/AITER source treatments from essential recipe/runtime changes. The baseline's first report does not wait for reporting convenience tooling.

    This new daily lane follows the owner update. Existing #6/#12 failures and deferred observer work remain preserved; ROCm#519 stays historical C16 evidence. No design dependency or existing operator result was changed. The three tasks are linked as native sub-issues of #1.

  8. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: the owner directs immediate model-performance work and removes peripheral process from the experimental critical path.

    Prioritize the compatible ROCm#3327 recovery on current source, necessary numerical/source checks, GPU A/B and C12 behavior. General roadmap documents, report/composition tooling and repeated whole-repository CPU gates must not delay a qualified experiment. Historical runtime reconstruction is deferred.

    Final precision, quality, truthful measurement, ownership and landing requirements remain. The failed full-01 result is unchanged; no gain is accepted by this priority decision.

    Concrete operating change

    The owner explicitly said to stop spending time on peripheral work and make performance improvement the only important deliverable. Root has assigned MLA to the current-source model change, Moe to focused independent review, Next to its minimal implementation record, and Mono to the smallest existing-runner integration required to measure the changed source accurately.

    Use existing interfaces and runtime; preserve current OPUS/layout/padding/ownership/stream contracts. Do not add a communication backend, generic measurement framework or historical rebuild prerequisite. Keep each experiment's exact source, flags, outputs, numerical validity and bounded cleanup reviewable. GPU leases remain explicit Root actions; final adoption still needs its agreed evidence.

    Already-approved CPU isolation PR26 landed as 791da5d and #25 is closed. It removes the known fixture obstacle and is not counted as an inference optimization. Other tooling/documentation work can finish later when it does not consume the model experiment's critical resources.

  9. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: plan published: #35. Mono authors and History reviews; the task serves #21 without changing #30.

    Checked: the two-file fatal-only witness preserves the existing exception, deadline, completion and lease behavior. Unknown/concurrent post-query state is not an atomic RPC/GPU cause verdict.

    Independent plan review

    History found no blocking scope, claim or exit issue. Its factual class-name correction was applied and verified against integration 4d0904c: NativeStateLMCacheMPConnector._poll_native_save. No further review round was requested.

    The real-API CPU receipt hash was independently matched. Source/CPU implementation checks remain required; any later GPU action needs a separate root lease after qualified performance work.

  10. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: plan published: #37. AMD authors and Source reviews; implementation can proceed independently of the model HSA diagnosis.

    Checked: fixed S64 q1/q4, existing global state-slot validity shared by MLA/KDA, slot 0/-1, bitmap/order filtering, empty-union safety and zero routed contributions with all downstream completion tags. The graph ladder, GEMM, concurrency and precision remain fixed.

    Independent plan review

    Source independently traced the current producer/consumer on integration 4d0904c and found no blocking scope, semantic or exit issue. Its per-lane predicate requirement was added: K1's uniform slot read cannot be reused in K2's mixed live/padded wave.

    AMD confirmed the first-slot request mapping, exact file set and code 700/tests 300 estimate, including necessary qualification maintenance. Actual picks/union/tiles and whole-K2 timing decide the result; row percentages and donor attribution do not establish gain.

  11. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: plan published: #38. Moe authors and History reviews; independent implementation starts at clean integration 4d0904c.

    Checked: reuse the existing workspace before profiling, charge it once, preserve exact bands/FP32/budget and DCP Mono decode behavior, and retain unsupported-topology fallback.

    Independent plan review

    History found no blocking scope, claim or exit issue. Full effective-cap sizing avoids max-context tile rounding changing Q bands; PP1/PCP1/no-TBO and same-stream ownership are explicit. The 5a/c9 closure is runtime evidence only.

    The 16 MiB warmup figure is only a shape bound because dummy execution may return early. HSA causality remains unclassified. Source/CPU evidence comes first; any GPU check has its own root lease.

  12. whx-sjtu commented on Nov 22, 2026

    @whx-sjtu
    OwnerAuthor

    Ready: plan published: #39. Mono authors and Benchmark reviews; independent of #38 and based on clean integration 4d0904c.

    Checked: only validated native BF16 model storage may alias; is_set_to requires identical storage/offset/shape/stride. Converted or shifted temporaries keep compact band ownership and existing refusal checks.

    Independent plan review

    Benchmark read exact brief fed04e36546d735f055e2e22dcae71770ff6ae337a92e285ed2835dd42c08971 and found no blocking scope, contract or exit issue. The intentional native-copy assertion update, preserved temporary-ownership regression, TP offsets/bytes and lifetime controls are explicit.

    Source/CPU evidence precedes any separately leased GPU validation. The 563.5 MiB per-rank duplicate payload is source accounting, not a measured reservation saving or HSA-cause diagnosis.

  13. whx-sjtu commented on Nov 23, 2026

    @whx-sjtu
    OwnerAuthor

    Operating change (2026-11-23 03:40 UTC, owner-confirmed): the workstream moves to a lighter lead/worker process to get measured performance faster.

    • Target unchanged: B300 C12 point, 8003 tok/s/chip and P90 full-response interactivity 128.5 in one valid 3600-second run. Precision, quality and protocol agreements unchanged.
    • Validated changes will be pushed by the lead directly to k31-perf-opt (and whx-sjtu/aiter k31-perf-opt when needed), without per-task PRs. Open issues and PRs Design the evidence-driven K3.1 C12 optimization roadmap #3-Reserve DCP FP4 prefill logits before KV memory profiling #42 stay open as reference material; their code may be re-validated and carried over.
    • First valid baseline is being measured now: current k31-perf-opt head with Mono off and native state save off (the configuration that previously completed long runs), C12, full 3600 s. Daily 3600 s measurements resume after it.
    • In parallel: Mono long-run stall fix (the K2 kernel's 256-CTA cross-block barrier deadlock), prefill communication, BF16 GEMM selection, DSA prefill attention path, and porting the earlier long-context prefill host-side fix.

    Only key results will be posted here.

  14. whx-sjtu commented on Nov 23, 2026

    @whx-sjtu
    OwnerAuthor

    2026-11-23 daily C12 row (first valid full run of this series).

    Field Value
    Source k31-perf-opt 4d0904c (no inference changes), AITER 572232d2
    Recipe TP8/DCP8, FP8 KV, FP4 index cache, block 64, prefix caching, DSpark K7 (golden AL 3.69), Mono off, native state save off, max-num-seqs 16, mbt 16384, memory 0.88, LMCache MP L1 1799 GB; AgentX 1.0.13, concurrency 12
    Throughput 6066.1 tok/s/chip (total_tput_tps)
    P90 full-response interactivity 50.21 tok/s/user
    P90 TTFT 2.395 s (mean 1.306 s)
    P90 E2E-normalized interactivity 35.21
    Requests / errors / cancellations 1298 / 0 / 0 (2 grace-time cancellations reported by the client log)
    Profiling span 3621.1 s
    Bundle verify --require-full: complete (19 files)
    Quality Not re-run for this unchanged source; natural GSM8K baseline from #10 applies

    Gap to the B300 C12 point: throughput +31.9%, interactivity x2.56.

    Main finding from a same-client paired replay: the old whx/k31-perf stack is 30.3% faster per request than this head. The head splits most prefills at the last 64-token block before the prompt end, so the 83-417-token remainder runs as an extra prefill step that interrupts every decode. Removing that split (old-line 4c95436, upstream port ROCm#3501, blocked on resume correctness) is now the top item, together with porting the other old-line optimizations through their upstream port PRs.

  15. whx-sjtu commented on Nov 23, 2026

    @whx-sjtu
    OwnerAuthor

    2026-11-23 17:25 UTC: k31-perf-opt advanced 4d0904c → 7bfa08c (merged stack INT1, 89 commits, fast-forward).

    Contents. Upstream ports (PRs ROCm#3311 chain, ROCm#3577 chain, ROCm#3614 chain, ROCm#3636, ROCm#3637/ROCm#3638, ROCm#3501), plus the following fixes:

    The production config used for validation is Mono on, K4, with the gate.

    Validation

    Check B0 (4d0904c) INT1
    C12 replay, 250 requests: total request latency — −34.6% (SE 2.0 pp)
    P90 full-response interactivity 42.42 59.40
    P90 TTFT 2.68 s 1.70 s
    Throughput (official formula, replay) 6154 6612
    GSM8K 5-shot, 1319 questions, vs same-config base 97.50% 96.66% (McNemar p 0.09, pass)
    • Logprob A/B: the 49K × 8 set passes. In the 147K × 2 set, one position is flat in head itself (top-2 margin 0.12) and moves by 0.13. Head-vs-head reruns move it by 0.03–0.07, and removing single ported points does not bring it back.
    • Decode A/B with a pre-registered permutation rule: INT1 is detectably different from head (P 0.008), but no farther from head than a benign same-code reference (head with different batched tokens, P 0.057). Verdict: no excess.
    • Open item: 10 GPU unit tests fail only on INT1 and are being triaged.

    Next. INT2 (INT1 plus Mono coverage of 5/7/9/11-request widths and bitwise kernel switches) is in validation. Its replay gives P90 interactivity 66.87, P90 TTFT 1.31 s and throughput 6763, with 8.8% lower latency than INT1. If INT2 passes, it will be the stack for the 2026-11-24 daily 3600 s C12 run.

  16. whx-sjtu commented on Nov 23, 2026

    @whx-sjtu
    OwnerAuthor

    2026-11-23 21:40 UTC: k31-perf-opt advanced 7bfa08c → 049d2aa (merged stack INT2, 28 commits, fast-forward).

    Contents on top of INT1. INT2 adds Mono coverage for 5/7/9/11-request decode widths. It also turns on bit-exact kernel switches:

    • K1 weight prefetch at width 20.
    • Four K2 hand-off switches.
    • DSA prefill filter, q tail and step-level work plan.
    • Prefill MoE zero-fill elision.
    • Drafter fused block metadata.

    The latent-down row shard is merged but off by default.

    Validation (production config: Mono on, K4, producer-ready gate)

    Check B0 INT1 INT2
    C12 replay, 250 requests: total request latency vs B0 — −34.6% −40.4%
    P90 full-response interactivity 42.42 59.40 66.87
    P90 TTFT 2.68 s 1.70 s 1.31 s
    Throughput (official formula, replay) 6154 6612 6763
    GSM8K 5-shot, 1319 questions — 96.66% 97.88% (vs INT1: McNemar p 0.005, higher)
    • Decode A/B INT1 → INT2 (Mono K4, prompts crossing all widths, 4 + 4 runs plus a 3-run benign reference, pre-registered permutation rule): INT2 is not detectably different from INT1 (P 0.26) and no farther than the reference (P 0.83). Verdict: no excess.
    • GPU unit tests: the 13 failures on INT2 are triaged as stale test expectations or GPU-less-host assumptions, with no production impact. Test-only fixes are queued for the next stack.

    Next. INT3 adds DSA decode attention, KDA prefill, indexer, drafter, KDA tail and token-graph bucket work, plus a bundled numerics A/B. It is in GPU validation overnight. The 2026-11-24 daily 3600 s C12 run will use the best stack validated by 11:00 UTC.

  17. whx-sjtu commented on Nov 24, 2026

    @whx-sjtu
    OwnerAuthor

    2026-11-24 13:27 UTC: k31-perf-opt advanced 049d2aa → a70ba4d (merged stack INT3b plus 2 test-only commits, 38 commits, fast-forward).

    Contents on top of INT2. INT3 merges eight points. Bit-exact switches are on by default from INT3a; the numerics-changing ones are on from INT3b. Every switch turns off with =0.

    • DSA decode MLA (DMLA):
      • Bit-exact: no-reduce, W_V bmm tile.
      • Numerics-changing: head split, decode q tail (plus its plan patch), attn_res tile.
    • Drafter and spec-verify (DDR):
      • Bit-exact: skip of the unread dense plan, BF16 absorb bmm config, verify host rows / one gather / one broadcast, fused GDN spec tail.
      • Numerics-changing: the drafter's stacked ctx-KV GEMM.
    • KDA prefill (PKDA):
      • Bit-exact: tiled conv1d, paged state, wide K2AB schedule.
      • Numerics-changing: segment balance and scan prefetch.
    • Bit-exact only:
      • Mono DSA indexer (DC1).
      • Mono K1 own-QK / early-in / CS-late (DK1).
      • Attention-residual zero-addend skip (PAR).
    • Prefill token graphs (PT5-N2): 15 buckets (256, 512, then 1024–4096 every 256) instead of 5.
    • Latent-down row shard (PF1-lat): merged in INT2, now on by default.
    • Test-only fixes (UT1): the 13 INT2 unit-test failures and the 5 new INT3 ones were stale test stubs.

    Validation (production config: Mono on, K4, producer-ready gate; C12 replay of 250 requests)

    Check B0 INT2 INT3a INT3b
    Total request latency vs B0 — −40.4% −42.6% −44.4%
    Total request latency vs INT2 — — −4.2% −7.1%
    Throughput (official formula, replay) 6154 6763 6797 6836
    P90 full-response interactivity 42.42 66.87 74.90 75.13
    P90 TTFT 2.68 s 1.31 s 1.71 s 1.62 s
    P90 E2E-normalised interactivity 28.64 49.73 43.36 49.60
    GSM8K 5-shot, 1319 questions — 97.88% / 97.12% — 96.59% / 97.19%

    Each replay figure is one run. P90 TTFT is 0.3 s worse than INT2's, and P90 E2E-normalised interactivity is level with it.

    • Prefill, INT2 → INT3a: first-token logprobs are bit-identical on 2 × 147456-token and 8 × 12000-token prompts, with prefix caching on.
    • Logprob A/B, INT3a → INT3b: no excess. The largest |Δp| per prompt is 0.071 against a band of 0.112 from runs without INT3b's switches (long set), and at most 0.0066 on the mixed set.
    • Decode (Mono K4, prompts crossing every width, pre-registered permutation rule):
      • INT3a vs INT2: not detectably different (P 0.39).
      • INT3b vs INT3a: detectably different (P 0.008), as expected for numerics-changing switches. It is no farther from INT3a than the benign packing reference is (P 0.14). Verdict: no excess.
    • GSM8K:
      • The first INT3b run read as a paired drop against INT2's run (24 vs 7, McNemar p 0.003). Repeats on another node show this is run-to-run variation.
      • INT2 against itself differs by 10 questions (19 vs 9). On the same node, INT3b vs INT2 is 14 vs 13 (p 1.0).
      • INT3b's mean drop over two runs each is 8 questions, inside INT2's own band (p 0.45 with McNemar's variance inflated by the same-code spread).
      • Only about 39% of answers are textually identical between two runs of the same code.
    • GPU unit tests: the 5 new INT3 failures are stale stubs with no production impact. The 2 test-only commits in this push fix them, verified on GPU on this exact tree.

    Next. INT4 is being trial-merged on this head. Candidates:

    • Row-parallel DSA prefill: replay prefill steps −8.7% to −10.0% at 16K; its 8-card numerics check is being fixed.
    • Latent row tail below 8192 rows: 3K–8K prefill steps −4% to −8%.
    • Small-prefill copy cleanup (bit-exact).
    • Small-prefill BF16 GEMM tuning in aiter.
    • Two bit-exact Mono decode changes.

    INT4 will be validated as one bundle: T2 paired with INT3b, logprob/decode checks for the numerics-changing part, and GSM8K with a same-code INT3b reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-team/autok31-performance

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions