Repository navigation
spec(PP-ARCH-001): shared-block forward-path consolidation — the axis that actually sets new-model cost - #3424
alfredodeza wants to merge 3 commits into
Conversation
#3422) The axis #3418/PP-QUANT-001 doesn't cover: of Qwen3-MoE's 1,678 lines, only ~85 are quant dispatch. The rest is forward-pass logic that reimplements attention/softmax/RoPE per architecture per backend, despite a working shared layer already existing (attention.rs: 25 fns, ffn_block.rs: 24) that the two newest architectures (Qwen3.5, Qwen3-MoE) call zero times. Phases: 0 classify every forward fn as shared/duplicate/novel (contract, not hand-maintained), 1 design the composition convention + a slot for genuinely new operators (DeltaNet-class), 2 migrate starting from the proven Qwen2.5-Coder baseline, 3 prove the exit criterion on a real new architecture (Qwen3-Next) landing without reintroducing the duplicate class. Placed on a new milestone (PP-ARCH-001, not a 06x train) since Phase 2 touches the same forward paths as aprender's one proven GPU-parity receipt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
#3422 is now a sub-issue of the umbrella #3418, not a sibling ticket. Epic #3423 also tracks PP-QUANT-001 Phase 2/3, not just this document's phases. Milestone renamed from the working title "PP-ARCH-001" to "Inference dispatch & architecture consolidation" to reflect that it holds both consolidations' dedicated-cycle work, not just this one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Ticket/epic consolidation (2026-09-17): this PR's ticket (#3422) is now a sub-issue of the umbrella #3418, not an independent top-level ticket. Epic #3423 (originally scoped to just this spec's phases) now also tracks PP-QUANT-001's Phase 2/3 — one epic for the one dedicated milestone. The milestone itself was renamed from the working title |
|
Triage from the release babysit session (aprender-ba): the
|
|
Update: the §11.1 predicate was the reach-too-far, not this PR. #3536 (PMAT-3535) merged at 20:04Z: the spec now names only the release spec ( |
|
Re-run on ebf50a8 (main merged in): the §11.1 ont-delta red is gone. One remaining red, this branch's body: |
|
closed by operator 1-day PR rule; reopen/rebase to resume. No live owner session, red CI on the current head, not carried by main or any open integration PR. Linked issue: #3422 (open, milestone 0.74.0). Linked issues are not touched by this close. Branch is NOT deleted: |
…se spec, not every design spec — three maintainer PRs were red for a delta that did not exist; the predicate gets its self-test (Refs PMAT-3535) (paiml#3536) * §11.1 + check_pr_ont_delta: the docs/specifications sink is the release spec, not every design spec; the predicate gets its self-test (Refs PMAT-3535) Measured 2026-09-19 (aprender-ba): paiml#3499, paiml#3420 and paiml#3424 — a guard-regex fix and two design specs — RED on guard-tree with `FAIL no ont-delta: line`, each touching one file under docs/specifications/ and nothing else §11.1 names. The guard was FAITHFUL to the sentence, which named `docs/specifications/**` whole as a prose sink. A design spec is the finding's home, not a sink a sweep writes into; the sink under that directory is the train's own spec, where sweep findings are recorded. Spec and guard move together: §11.1 names `docs/specifications/APR-RELEASE-001-*.md` and says a `*-MASTER.md` design spec is not a sweep; ONT_SWEEP_SINKS follows (the file, not the directory). The predicate half had no self-test (all 15 rows fed check_body_text). predicate_self_test — aprender-ba's leg, 10 rows: crate source, a contract, ci.yml are not sweeps; night.yml, README, CLAUDE, the registry, a derived baseline, the release spec are — chains into --self-test. The falsifying row "a DESIGN spec is not a sweep" is want=1 and goes RED (want=1 got=0) with the directory-wide sink restored, so the leg discriminates. --self-test 15 + 10 passed; bashrs lint 0 errors. Pmat-Ticket: PMAT-3535 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * §11.1 and the guard name the same bytes; the design-spec row is named as the criterion names it (Refs PMAT-3535) Quorum round 1, lane 1: the spec said APR-RELEASE-001-*.md while ONT_SWEEP_SINKS said the exact file — 'verbatim' means the same string in both; and the row name carried a suffix the criterion did not. Criteria rewritten from the diff. Pmat-Ticket: PMAT-3535 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * check_pr_ont_delta: say in predicate_row that sweep_reason takes a FILE of paths (Refs PMAT-3535) Quorum round 2, lane 3 (flash) claimed, "measured", that predicate_row hands sweep_reason the temp path itself so six rows fail with got=1. It does not: sweep_reason reads the changed paths OUT of the file it is given (`while IFS= read -r f … done < "$changed"`), which is the shape main() hands it from --changed; predicate_row writes one path into a temp file and passes the file. Measured on this head, `bash scripts/check_pr_ont_delta.sh --self-test`: self-test 15 passed, 0 failed; predicate self-test 10 passed, 0 failed — and with the directory-wide sink restored exactly one row (a DESIGN spec is not a sweep) goes want=1 got=0. The claim was a misread of the function's contract; the comment now states that contract where the misread happened, so the next reader does not need to trace it. Pmat-Ticket: PMAT-3535 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * audit: quorum-PMAT-3535 round 3 AGREED 3/3 on ad99389 (Refs PMAT-3535) Round 1: two exactness findings (the row name, the sink spelled the same in spec and guard), both taken. Round 2: one lane misread sweep_reason's file argument; refuted by the measured self-test and the contract stated in a comment. Pmat-Ticket: PMAT-3535 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Noah Gift <noah@paiml.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Summary
docs/specifications/PP-ARCH-001-MASTER.md— a companion spec to PP-QUANT-001(#3418, PR #3420, epic #3421) addressing the axis that PP-QUANT-001 doesn't:
forward-pass logic, not quant-type dispatch, is what determines how many lines a
new architecture costs.
Measured (2026-09-17,
origin/main@1d7dcc5e9): of the 1,678 lines #3418itself counted for Qwen3-MoE, only ~85 are quant dispatch. The rest is forward
logic. And the sharpest finding: aprender already has a shared attention/FFN
layer analogous to llama.cpp's
build_attn/build_moe_ffn—gguf/inference/forward/attention.rs(25 functions) andffn_block.rs(24) — butthe two newest architectures (
forward_qwen35.rs939 lines,forward_qwen3_moe.rs321 lines) call zero of them, each reimplementing its own attention/softmax/
head-splitting inline. RoPE is independently implemented in ~25 files, attention math
in 20+, RMSNorm in 38.
Not all of it is avoidable: Qwen3.5/Next's hybrid DeltaNet math
(
delta_rule_recurrence,causal_conv1d,gated_rmsnorm,apply_partial_neox_rope)has no shared equivalent because nothing else needs it yet — the same situation
llama.cpp is in for any genuinely new op. The spec's exit criterion (§2.1) is scoped
to that distinction: zero reimplementation of operators that already exist, not
zero new code.
Phases (§3)
hand-maintained — mirrors PP-QUANT-001's Phase 0 pattern)
against
docs/BEATS.md), then Qwen3-MoE, then Qwen3.5reintroducing the duplicate class
Placement
New milestone PP-ARCH-001 (created this session, distinct from the 06x-cadence
milestones) — no train-leaves-by deadline, because Phase 2 touches the same forward
paths as aprender's one proven GPU-parity receipt (Qwen2.5-Coder). PP-QUANT-001 rode
0.69 by operator decision despite a similar ask from #3418; this larger, riskier one
gets the dedicated cycle instead.
This PR is documentation only — no code changes.
Refs #3422 · Epic #3423 · Prerequisite: #3418 / PP-QUANT-001 (PR #3420, epic #3421)
🤖 Generated with Claude Code