Skip to content

pplx-decider: reference worker and Public231 C1 procedure - #166

Merged
hsliuustc0106 merged 37 commits into
mainfrom
cursor/pplx-decider-27b-8ee9
Oct 25, 2026
Merged

hsliuustc0106 merged 37 commits into
mainfrom
cursor/pplx-decider-27b-8ee9

Conversation

@hsliuustc0106

@hsliuustc0106 hsliuustc0106 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Metrics

Item Value
Kept primary fcf5e2bef916da81180ac8f1570dff338e8a049d
Primary result 231/231, p50 87.782 ms, p95 291.183 ms
Rejected tip 801ef7b103c9285bef749d54af6cea6f4472088b
Rejected result 231/231, p50 89.172 ms (+1.58% / +1.390 ms), p95 274.790 ms (−5.63% / −16.393 ms)
Gate both percentiles strictly under → HOLD_PRIMARY at fcf5e2be 87.782 / 291.183
SwiGLU tip 2bbbe4eda71bb745c3b87a1f06c4a23eae68db4d rejected in the owner closeout at p50 97.613 ms, p95 292.795 ms. Not installed
Branch head 509bdd2161ca5bef8f5e158d466514862fac7c9e
Running path kept primary behavior. mlp=default, fused_swiglu_layers=0, gated_norm=eager

Draft stays open. Do not merge without a separate owner yes. No new latency win is claimed.

Tracks #161.

Required human contributor answers

  1. What outcome are you trying to achieve?

    Answer: Reject 801ef7b, keep fcf5e2be, drop always-on FLA fused gated_norm, and push one tip that beats both 87.782 and 291.183 without sacrificing p50. Draft pplx-decider: reference worker and Public231 C1 procedure #166 stays open. No merge. Source: "Decision: reject this tip. ... Protect p50. Drop always-on FLA fused gated_norm ×48 on this path (or any tip that trades p50 for p95). Keep primary GVA+contiguous. Next tip must beat both 87.782 and 291.183 without sacrificing p50. Draft pplx-decider: reference worker and Public231 C1 procedure #166 stays open on fcf5e2be. No merge." The later owner closeout records 2bbbe4ed as rejected and closes the latency story at fcf5e2be.

  2. What is the highest-leverage variable for that outcome?

    Answer: Both p50 and p95 strictly under 87.782 / 291.183, protecting p50. Source: "Gate: both must be strictly under → HOLD_PRIMARY" and "Same pattern as prior FLA residual RMSNorm tips — p95 win, p50 lose. Protect p50."

  3. How will this work move that variable rather than create busywork?

    Answer: Protect p50. Drop always-on FLA fused gated_norm. Do not trade p50 for p95. The owner did not name the next kernel. Source: "Protect p50. Drop always-on FLA fused gated_norm ×48 on this path (or any tip that trades p50 for p95)."

  4. Who is the customer or user, and what do they actually need?

    Answer: The owner of draft pplx-decider: reference worker and Public231 C1 procedure #166. The draft stays open and this tip is not merged. Source: "Draft pplx-decider: reference worker and Public231 C1 procedure #166 stays open on fcf5e2be. No merge." This turn also follows the owner request to address the review on pplx-decider: reference worker and Public231 C1 procedure #166 without merging.

After answering the four questions: is a PR needed at all to achieve this outcome?

Human decision and rationale (or explicit source reference): Yes. Continue draft #166. Do not merge. Source: "Draft #166 stays open on fcf5e2be. No merge." and the owner closeout "Do not merge without a separate yes."

For a bug fix: link actual observed failure evidence.

Evidence: Not a bugfix of the kept primary. 801ef7b ran and missed the gate: 231/231, p50 89.172 ms, p95 274.790 ms. The owner closeout records 2bbbe4ed at p50 97.613 ms, p95 292.795 ms and rejects it. The review comments are code-correctness items, not a new latency result.

Purpose

Serve perplexity-ai/pplx-decider-v1.1-27b at 14c9d90137962d300f3de95633f7b6535e80c5ce.

The kept primary is fcf5e2bef916da81180ac8f1570dff338e8a049d: 231/231, p50 87.782 ms, p95 291.183 ms. 801ef7b and 2bbbe4e are rejected. 509bdd2 does not install either kernel. Startup again matches the packed GVA primary.

Review comments from #166 (comment):

  • Unknown PPLX_GDN_PREFILL raises before the capability check, including on CPU and capability 8.9.
  • decide() maps only Question branch exceeds the 8192-token limit; no input was truncated. to HTTP 422. Any other ValueError from evaluate stays a 500.
  • verify_checkpoint failure paths have weight-free tmp_path tests: missing file, hash mismatch, decision_config field mismatch.
  • Falsy admitted prompts ("", [], {}) are pinned by noul-falsy-fallbacks in tests/pplx_decider/fixtures/reference_cases.json, which check_contract.py already walks, plus a unit test.
  • tarfile.extractall(..., filter="data") in install_causal_conv1d.py.
  • The 12,000,000-character image rejection no longer says "8 MB before base64". The decoded 8 MB limit keeps its own sentence.

origin/main moved to 8228551. git merge-tree --write-tree against that main exited 0, so no conflict commit was made.

Test Plan

  • PYTHONPATH=src python3 -m pytest tests/pplx_decider -q
  • PYTHONPATH=src python3 -m compileall -q src/models/pplx_decider src/frontend/pplx_decider.py tests/pplx_decider recipe/pplx_decider/install_causal_conv1d.py
  • No new Public231 C1. The running path is the kept primary, not a new tip.

System1-Omni Version / Commit: kept primary fcf5e2bef916da81180ac8f1570dff338e8a049d. Head 509bdd2161ca5bef8f5e158d466514862fac7c9e on cursor/pplx-decider-27b-8ee9. Merge base cd302b6e3d7723ebfc33bba9698da2c1e881f203.

Test Result

CPU checks on 509bdd2: pytest 115 passed, compileall success. No NVIDIA device here, so the CUDA forward was not executed.

The falsy-fallback fixture was compared locally to an AST extract of the pinned model.py (describe, options, decision_messages, answer). Messages and the noul answer matched. check_contract.py against a checkpoint directory was not run. mkdocs build --strict was not run.

Diff size and review map

Against merge base cd302b6e, including this head:

Bucket Changed lines (add + delete)
src/ Python 2602
tests/ Python 1694
recipe/ Python 167
Authored Python 4463
Docs and recipe Markdown 957
Other (fixtures, config) 1073
Total 6493

The diff is one worker, its tests, and its recipe. Splitting it would separate the contract from the checks that pin it. Read in this order:

  1. src/models/pplx_decider/contract.py and tests/pplx_decider/test_contract.py — admission, prompts, image limits.
  2. src/models/pplx_decider/engine.py and tests/pplx_decider/test_checkpoint.py — pin and startup, including unconditional PPLX_GDN_PREFILL.
  3. src/frontend/pplx_decider.py and tests/pplx_decider/test_worker.py — 422 only for the token-limit sentence; other ValueError is 500.
  4. gdn.py, attention.py, conv.py, mlp.py, rmsnorm.py, gated_norm.py, swiglu.py, compile_forward.py — kernel binds. swiglu.py and gated_norm.py remain as rejected implementations and are not installed.
  5. recipe/pplx_decider/ and the status docs — measured primary fcf5e2b; rejected tips stay rejected.

Demo / evidence

N/A for a video. Latency evidence is the owner pastes and the owner closeout already in this description. Raw responses.jsonl was not attached. This commit has no new latency sample.

Self-review

  • I have reviewed the full diff and addressed the issues I found.
  • I have checked that the change follows the project's architecture and stays focused on the stated purpose.
  • I have run the checks appropriate to this change and reported commands, results, and anything I could not verify above.
  • I have checked that the PR description, documentation, and any accuracy or performance claims match the implementation and available evidence.

The PR stays draft. Do not merge.

Optimization closeout (2026-10-25)

Status: ready for owner review — no merge
Close at best-so-far primary: fcf5e2bef916da81180ac8f1570dff338e8a049d
Protocol: Public231 C1, warmup 5, concurrency 1, metric successful_latency
Gain chart: shared in system1 room

Goal

Serve perplexity-ai/pplx-decider-v1.1-27b with a measured Public231 C1 primary, advancing only when both p50 and p95 beat the kept primary (231/231, quality not regress).

Current primary (best so far)

Item Value
SHA fcf5e2bef916da81180ac8f1570dff338e8a049d
Success 231/231
p50 / p95 87.782 ms / 291.183 ms
Quality choice_acc 0.9065 (139), noul_acc 0.8784 (74), score_mae 0.2035 (18)
Lever FlashInfer GVA (gdn_layout=gva, 48 layers) + contiguous q/k before FLA l2norm; eager residual RMSNorm; 48-slot cu_seqlens ring; compile off
Branch tip head 509bdd2 review fixes. Historical 2bbbe4ed (FLA swiglu) stays REJECT and is not installed

收益 (gains) vs campaign start

Campaign start = earliest remesure baseline 1ba07d15 98.777 / 341.202.

Start 1ba07d15 Final fcf5e2be Δ absolute Δ % Speedup
p50 98.777 ms 87.782 ms −10.995 ms −11.13% 1.13x
p95 341.202 ms 291.183 ms −50.019 ms −14.66% 1.17x

Vs immediate prior primary 4b99b73 (88.942 / 295.797): p50 −1.30%, p95 −1.56% (the KEEP that set fcf5e2be).

搜索过程 (search process)

Best-so-far rises only on KEEP . Selected ledger (disk GATE/REPORT where available):

Step SHA Lever / hypothesis p50 / p95 (or fail) Gate
T+0 1ba07d15 Campaign start baseline 98.777 / 341.202 start
T+1 f968e576 fla-chunk remesure (kept primary for early tips) 94.077 / 300.200† KEEP
T+2 3c72f02 All-sequence FlashInfer 88.808 / 300.751 (p50↓ p95↑) REJECT
T+3 a50b9aaa Short FI / hold path 95.446 / 300.871 REJECT
T+4 0dcaa0ac cuDNN-first SDPA 138.501 / 332.859 REJECT
T+5 8b4ee326 Fused gate-up MLP ×64 102.437 / 304.970 REJECT
T+6 e36b32ed torch.compile dynamic 97.751 / 263.124 (p95↓ p50↑) REJECT
T+7 7e3b1be1 Dynamic-tail compile 100.037 / 257.084 REJECT
T+8 34ba5de Compile median probe 97.084 / 256.679 REJECT
T+9 ffae182c Shared cu_seqlens per device+length 92.844 / 296.458 KEEP
T+10 4b99b73 48-slot cu_seqlens ring + all-seq FI 88.942 / 295.797 KEEP
T+11 17a7b120 GDN recurrent-state ring 89.165 / 295.723 REJECT
T+12 3afb472 FLA residual RMSNorm always-on 93.935 / 274.902 (p95↓ p50↑) REJECT
T+13 705ae089 FLA RMSNorm only ≥512 tok 94.604 / 274.835 REJECT
T+14 a6f4d9a GDN use_cp heuristic 112.294 / 299.419 REJECT
T+15 3ecdf5ad GVA layout (no contiguous yet) warmup fail l2norm non-contiguous, 0/231 REJECT
T+16 fcf5e2be GVA + contiguous q/k 87.782 / 291.183 KEEP
T+17 801ef7b1 FLA gated_norm ×48 89.172 / 274.790 (p95↓ p50↑) REJECT
T+18 2bbbe4ed FLA swiglu_fwd ×64 97.613 / 292.795 REJECT

† First disk remesure of f968e576 was 98.037/302.569 vs 1ba07d15; subsequent tips gated against the settled primary paste 94.077/300.200 recorded in the PR tip chain.

What worked vs rejected (lessons)

  • Worked (KEEP chain): fla-chunk bring-up → shared / 48-slot cu_seqlens + FlashInfer → GVA + contiguous q/k (layout beat raw kernel swaps).
  • Rejected pattern: many tips improved only p95 (compile, FLA RMSNorm, gated_norm) or only p50 (3c72f02) — dual gate correctly HOLDs. Blind FLA kernel swaps (swiglu, always-on gated_norm) hurt p50.
  • Lesson: layout/contiguity > “swap FLA kernel”; smoke before C1 (3ecdf5ad warmup crash); next tips need profile / length buckets, not more unattributed kernel tries.

Closeout

Draft for owner review. Close latency story at fcf5e2be. Head 509bdd2 does not install rejected 2bbbe4ed. Do not merge without a separate yes.

Optimization closeout (2026-10-25)

Status: ready for owner review — no merge
Close at best-so-far primary: fcf5e2bef916da81180ac8f1570dff338e8a049d
Protocol: Public231 C1, warmup 5, concurrency 1, metric successful_latency
Gain chart: shared in system1 room

Goal

Serve perplexity-ai/pplx-decider-v1.1-27b with a measured Public231 C1 primary, advancing only when both p50 and p95 beat the kept primary (231/231, quality not regress).

Current primary (best so far)

Item Value
SHA fcf5e2bef916da81180ac8f1570dff338e8a049d
Success 231/231
p50 / p95 87.782 ms / 291.183 ms
Quality choice_acc 0.9065 (139), noul_acc 0.8784 (74), score_mae 0.2035 (18)
Lever FlashInfer GVA (gdn_layout=gva, 48 layers) + contiguous q/k before FLA l2norm; eager residual RMSNorm; 48-slot cu_seqlens ring; compile off
Branch tip head (not kept) 2bbbe4ed (FLA swiglu) — measured, REJECT

收益 (gains) vs campaign start

Campaign start = earliest remesure baseline 1ba07d15 98.777 / 341.202.

Start 1ba07d15 Final fcf5e2be Δ absolute Δ % Speedup
p50 98.777 ms 87.782 ms −10.995 ms −11.13% 1.13x
p95 341.202 ms 291.183 ms −50.019 ms −14.66% 1.17x

Vs immediate prior primary 4b99b73 (88.942 / 295.797): p50 −1.30%, p95 −1.56% (the KEEP that set fcf5e2be).

搜索过程 (search process)

Best-so-far rises only on KEEP . Selected ledger (disk GATE/REPORT where available):

Step SHA Lever / hypothesis p50 / p95 (or fail) Gate
T+0 1ba07d15 Campaign start baseline 98.777 / 341.202 start
T+1 f968e576 fla-chunk remesure (kept primary for early tips) 94.077 / 300.200† KEEP
T+2 3c72f02 All-sequence FlashInfer 88.808 / 300.751 (p50↓ p95↑) REJECT
T+3 a50b9aaa Short FI / hold path 95.446 / 300.871 REJECT
T+4 0dcaa0ac cuDNN-first SDPA 138.501 / 332.859 REJECT
T+5 8b4ee326 Fused gate-up MLP ×64 102.437 / 304.970 REJECT
T+6 e36b32ed torch.compile dynamic 97.751 / 263.124 (p95↓ p50↑) REJECT
T+7 7e3b1be1 Dynamic-tail compile 100.037 / 257.084 REJECT
T+8 34ba5de Compile median probe 97.084 / 256.679 REJECT
T+9 ffae182c Shared cu_seqlens per device+length 92.844 / 296.458 KEEP
T+10 4b99b73 48-slot cu_seqlens ring + all-seq FI 88.942 / 295.797 KEEP
T+11 17a7b120 GDN recurrent-state ring 89.165 / 295.723 REJECT
T+12 3afb472 FLA residual RMSNorm always-on 93.935 / 274.902 (p95↓ p50↑) REJECT
T+13 705ae089 FLA RMSNorm only ≥512 tok 94.604 / 274.835 REJECT
T+14 a6f4d9a GDN use_cp heuristic 112.294 / 299.419 REJECT
T+15 3ecdf5ad GVA layout (no contiguous yet) warmup fail l2norm non-contiguous, 0/231 REJECT
T+16 fcf5e2be GVA + contiguous q/k 87.782 / 291.183 KEEP
T+17 801ef7b1 FLA gated_norm ×48 89.172 / 274.790 (p95↓ p50↑) REJECT
T+18 2bbbe4ed FLA swiglu_fwd ×64 97.613 / 292.795 REJECT

† First disk remesure of f968e576 was 98.037/302.569 vs 1ba07d15; subsequent tips gated against the settled primary paste 94.077/300.200 recorded in the PR tip chain.

What worked vs rejected (lessons)

  • Worked (KEEP chain): fla-chunk bring-up → shared / 48-slot cu_seqlens + FlashInfer → GVA + contiguous q/k (layout beat raw kernel swaps).
  • Rejected pattern: many tips improved only p95 (compile, FLA RMSNorm, gated_norm) or only p50 (3c72f02) — dual gate correctly HOLDs. Blind FLA kernel swaps (swiglu, always-on gated_norm) hurt p50.
  • Lesson: layout/contiguity > “swap FLA kernel”; smoke before C1 (3ecdf5ad warmup crash); next tips need profile / length buckets, not more unattributed kernel tries.

Closeout

Draft for owner review. Close latency story at fcf5e2be. Branch head may still be 2bbbe4ed (rejected) — prefer tip head reset to primary before merge review. Do not merge without a separate yes.

Open in Web Open in Cursor 

Pin perplexity-ai/pplx-decider-v1.1-27b at 14c9d901 and serve choice,
noul and score through the checkpoint's own DecisionModel. CPU fixtures
lock prompt text, answer order and the rejection boundary. No CUDA
device was available, so the recipe records the sm_89 measurement steps
and leaves p50/p95 unset.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>

psv666 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

The next step at head 1ba07d15b11a8c0796657e4a10b7ba3e62354421 should start with load feasibility on the actual operator hardware. The recorded shards + readout total 52,173,413,928 bytes, before runtime/workspace overhead; the body correctly avoids assuming a 48 GB device can load the BF16 resident set. Please record available memory and the actual placement/precision used, including a load failure if that is the result. A different placement/precision must be labeled separately from the intended baseline.

After successful load/warmup, capture one real choice, noul and score request through the worker and Rust frontend, then pinned-reference parity, including images if image support is claimed ready. Preserve the exact-integer and overlength contract checks. Only then run the documented three Public231 C1 traversals, retaining all 693 planned outcomes, raw failures, head/manifest/checkpoint hashes, actual hardware, p50 and p95.

A small reporting clarification would help now: mark the current 0/693 as not run (0 attempted; 693 planned) so it cannot be read as 693 attempted failures. The body already discloses no CUDA inference, and the metrics should convey the same status.

Please also record the scope relationship with #140 (reference-worker initial serving milestone versus any retained Rust processor work), as raised there. Keep this draft and the explicit optimization hold until real measurements arrive. This comment does not claim new model execution or lift that hold.

Agent-assisted readiness follow-up using the repository review skill pinned at trusted main cd302b6e3d7723ebfc33bba9698da2c1e881f203 (SHA-256 ae2dfac116376ae2ec41f65122cc1bf5aea10751b8b907198a56154e5d67230e). This comment reconciles current main and the existing discussion; it is not a new full code-review approval or a claim of newly executed model tests.

cursoragent and others added 3 commits October 25, 2026 00:28
Record the lab L20X Public231 C1 baseline at 1ba07d1 and skip the explicit
SDPA mask when every padding bit is true. The latency delta is not measured.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Accept stock Public231 only when thinking is {"enabled": false} and ignore
that object. No kernel change. Latency of this head is not measured.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Install causal-conv1d 1.7.0 with an sm_89 cubin and refuse CUDA startup
when Transformers would still call F.conv1d. Latency of this head is not
measured.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
cursoragent and others added 7 commits October 25, 2026 01:28
H200 is sm_90. Upstream 1.7.0 already emits that cubin when nvcc is 11.8
or newer; the installer inserts it only if a sdist dropped the line.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
CUDA startup imports flash-linear-attention 0.5.2 before Qwen modeling
and refuses the PyTorch chunk fallback. On SM90 with linear head dim 128,
the chunk call is flashinfer.gdn_prefill, matching vLLM auto and SGLang's
validated Hopper default. Otherwise health stays gdn=fla-chunk with
flashinfer null. No CuteDSL and no CUDA graph.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Upstream causal-conv1d 1.7.0 skips sm_89, so an L20X load would refuse
the binary. The installer now adds that cubin and still refuses a build
that lacks it. Ready continues to fail when Qwen would bind F.conv1d.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
sm_89 classification prefill stays on flash-linear-attention's Triton
chunk kernel plus causal_conv1d. /health shows linear_attention=fla-chunk.
FlashInfer, CuteDSL, and CUDA graphs are not selected.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Lab GPUs labeled L20X are the H200 target and may report either
capability. The causal-conv1d build inserts a missing sm_90 line and an
sm_89 line, and refuses to build when either cubin is absent.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Capability 9.0 replaces the Qwen chunk global with FlashInfer GDN
prefill when flashinfer-python 0.6.16.post3 imports. Capability 8.9, and
capability 9.0 without that package, stay ready on fla-chunk plus
causal_conv1d. The device name is not a gate. /health reports both binds.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Record that the lab L20X-labeled GPU stays the measurement host and that
this head has no Public231 sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
cursoragent and others added 13 commits October 25, 2026 02:19
The lab L20X-labeled host measured 231/231, p50 98.037 ms, p95 302.569 ms
on fla-chunk with flashinfer null. Against 1ba07d1 run1 that is p50
-0.74 ms (-0.75%) and p95 -38.6 ms (-11.32%). Keep that tip. This commit
only records the paste.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
The kept remeasure was ready with flashinfer null. Absence and an import
failure both stay on fla-chunk. The install script is the next candidate
and is not part of that primary.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Warmup 5, concurrency 1, stock Public231 with thinking.enabled=false,
metric successful_latency: 231/231, p50 94.077 ms, p95 300.200 ms,
compute capability 9.0, fla-chunk, flashinfer null. Versus 1ba07d1 run1
that is p50 -4.700 ms (-4.76%) and p95 -41.002 ms (-12.02%). The
FlashInfer candidate stays inconclusive.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
The all-sequence bind improved p50 and missed p95. A forward stays on
FLA chunk when it has more than one sequence or more than 256 tokens.
PPLX_GDN_PREFILL=fla holds the pin and reproduces the primary chunk.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
3c72f02 measured p50 88.808 ms and p95 300.751 ms. p95 did not improve,
so the primary stays f968e57 at 94.077 / 300.200. The short-sequence
candidate has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Capability 9.0 no longer binds FlashInfer for every sequence. The kept
primary remains the FLA chunk.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
The ≤256 FlashInfer cutoff missed the gate. Startup stays on FLA chunk
unless PPLX_GDN_PREFILL=short. CUDA forwards prefer cuDNN SDPA unless
PPLX_SDPA=default.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 was 231/231, p50 95.446 ms, p95 300.871 ms. Primary stays
f968e57. The cuDNN-first candidate has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
cuDNN-first SDPA missed the gate and is no longer selectable. Startup
keeps the checkpoint SDPA order and FLA chunk, and on CUDA replaces each
text MLP gate and up projection with one GEMM. PPLX_MLP=default keeps
the checkpoint modules.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 0dcaa0a was 231/231, p50 138.501 ms, p95 332.859 ms.
Primary stays f968e57. The fused gate-up candidate has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Fused gate-up missed the gate and is not selectable. CUDA compiles the
language-model forward with a dynamic sequence length and warms it
before /health. GEMM shapes, SDPA order, and FLA chunk stay put.
PPLX_COMPILE=default leaves the forward eager.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 8b4ee32 was 231/231, p50 102.437 ms, p95 304.970 ms.
Primary stays f968e57. The dynamic-compile candidate has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Always-on dynamic compile on e36b32e cut p95 by 37.076 ms and raised p50 by 3.674 ms, so the primary stays f968e57. Sequences of 512 tokens or fewer stay on the eager forward. Longer sequences use the compiled forward.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
cursoragent and others added 4 commits October 25, 2026 03:41
The 512-token split on 7e3b1be cut p95 to 257.084 ms and raised p50 to 100.037 ms, so the primary stays f968e57. Shorter sequences now call the original forward with Dynamo suspended and the pre-compile CUDA flags restored. Startup requires a 136-token forward to take that eager route.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
CPU startup leaves the forward eager, so health names that median path.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
34ba5de proved the 136-token route was eager and still raised p50 to 97.084 ms, so compile stays off. All-sequence FlashInfer keeps the measured p50 win and reuses one cu_seqlens per device and length instead of allocating one on every linear layer.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
ffae182 passed Public231 C1 at 92.844 / 296.458 and is the new primary. The next tip still uses all-sequence FlashInfer and rotates 48 distinct cu_seqlens tensors per device and length so one forward does not share a single buffer. That ring has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
@MrDongsls

Copy link
Copy Markdown
Collaborator

Thanks for this. No correctness findings on the main contract path; re-verified locally: 86 passed, compileall clean, CI (incl. strict docs build) green, and the leaderboard / PR-body deltas recompute correctly.

P2 The template self-review checklist is still unchecked and the body does not yet report authored-vs-total diff counts (authored Python ≈3.2k lines, total ≈4.8k). Per CONTRIBUTING.md#self-review-before-requesting-review, a diff above 3,000 lines needs the completed checklist plus split rationale / component map.

P2 On capability 8.9 an unknown PPLX_GDN_PREFILL value is silently ignored: gdn_prefill_mode() is only called inside the capability-9.0 branch (src/models/pplx_decider/engine.py), while the recipe documents that startup raises on unknown values. Would you consider validating it unconditionally so a typo fails closed on 8.9 as well?

P2 decide() maps every ValueError from executor.evaluate to HTTP 422, so a server-side fault inside the checkpoint forward would surface as a client error, and the bench client would book it as a rejected request instead of a failure. Suggest mapping only the known checkpoint sentence (the token-limit ValueError) and letting anything unexpected surface as 500.

P3 verify_checkpoint looks like the only public function in engine.py without a weight-free test; its failure paths (missing file / hash mismatch / decision_config field mismatch) should be straightforward to cover with tmp_path.

P3 The or fallbacks in options() / decision_messages() replace admitted-but-falsy values ("", {}, [] criteria or instructions) with the default prompt text. Probably matches the checkpoint, but untested; one fixture case checked via check_contract.py would pin it either way.

P3 (nits) tarfile.extractall in install_causal_conv1d.py without filter="data" (3.12 deprecation, 3.14 behavior change); the >12,000,000-char image rejection message says "8 MB before base64", which describes the separate decoded-bytes limit.

Provenance: skill .agents/skills/system1-omni-review/SKILL.md @ trusted main cd302b6e (SHA-256 ae2dfac1…). Full diff read at both heads (7e3b1be, 34ba5de); personally run at 34ba5de8: PYTHONPATH=src python3 -m pytest tests/pplx_decider -q (86 passed) and compileall. Not run: local mkdocs build --strict (no mkdocs; CI docs job passed), check_contract.py (no checkpoint), CUDA paths (no GPU).

cursoragent and others added 9 commits October 25, 2026 04:17
4b99b73 passed Public231 C1 at 88.942 / 295.797 and is the new primary. The next tip keeps 48 float32 state workspaces so FlashInfer does not allocate one on every linear layer. That ring has no sample.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 17a7b12 was 231/231, p50 89.165 ms, p95 295.723 ms.
That missed the median, so the primary stays 4b99b73. The next lever
replaces the eager zero-centered residual RMSNorms with one FLA kernel
whose autotune key does not depend on sequence length.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 3afb472 was 231/231, p50 93.935 ms, p95 274.902 ms.
That missed the median, so the primary stays 4b99b73. Sequences of
512 tokens or fewer keep the original eager norm. Longer sequences
keep the FLA kernel that cut the tail.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 705ae08 was 231/231, p50 94.604 ms, p95 274.835 ms.
The 512-token RMSNorm gate missed the median, so the primary stays
4b99b73 and residual RMSNorm stays eager. The next lever passes
use_cp=auto. Forty-eight value heads on one sequence are under the
H200 threshold that FlashInfer uses for that kernel.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for a6f4d9a was 231/231, p50 112.294 ms, p95 299.419 ms.
use_cp=auto engaged and missed both percentiles, so the primary stays
4b99b73 and use_cp stays false. The next lever leaves q and k at 16
heads and lets FlashInfer's grouped-value path own the 48 value heads.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 3ecdf5a was 0/231, stop_reason=warmup_failed, with no
p50 or p95. FLA l2norm_fwd views q before it is contiguous. The primary
stays 4b99b73. This tip packs q and k before that view.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for fcf5e2b was 231/231, p50 87.782 ms, p95 291.183 ms.
Both percentiles beat 4b99b73, so that packed GVA path is the primary.
The next lever replaces the 48 eager gated output norms with one FLA
kernel. Residual RMSNorm stays eager. No latency claim for this tip.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Public231 C1 for 801ef7b was 231/231, p50 89.172 ms, p95 274.790 ms.
The gated RMSNorm cut the tail and missed the median, so the primary
stays fcf5e2b and that kernel stays off. This tip replaces
silu(gate)*up on the 64 text MLPs with swiglu_fwd. The GEMMs stay
separate. No latency claim for this tip.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Unknown PPLX_GDN_PREFILL now raises on every device, including
capability 8.9. decide() maps only the token-limit sentence to HTTP
422. Checkpoint pin failures, falsy prompt fallbacks, the sdist
extract filter, and the image character-limit message are covered.
2bbbe4e missed both percentiles, so swiglu_fwd stays unwired and the
running path matches fcf5e2b. No new latency claim.

Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
@hsliuustc0106
hsliuustc0106 marked this pull request as ready for review October 25, 2026 07:10
@hsliuustc0106
hsliuustc0106 merged commit f18b8a6 into main Oct 25, 2026
6 checks passed
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.

4 participants