PR #518 — Add recipe-declared --target-head-quantization preparation flag
Author nero- ("Nero" / "Jonathan Gutierrez", GitHub association CONTRIBUTOR, Discord nero). Open, "ready for review", opened 2026-11-25 14:52, head f54928b, base main. 10 files, +126 / −10. No labels, no CI checks, no reviews, no comments.
Key findings
- Nothing in this repository consumes or verifies the setting. An exhaustive grep of
target_head_quantizationatpr/518shows the only production readers ofplan.target_head_quantizationare the startup status string (ignition/cli/serve.py:314) and the two manifest writers (ignition/preparation/rebuild_manifest.py:302-303,:363-364).ignition/preparation/bootstrap.py'sBasePreparationConfig/common_preparation_kwargs(:24-65, the mechanism by which recipes receive plan intent) does not carry it, and no in-tree recipe declarestarget_head_quantizations—ignition/recipes/no longer exists in this repo (repository split;docs/design-review.md:33-37). The flag therefore can only ever be rejected here; it becomes usable only with the externallocal-inference-lab/hyperflare-recipesPR #40, which is not readable from this repository. - The flag bypasses memory planning. Unlike
row_shard_prefill,online_mxfp8,expert_scale_compression,mla_compute_mode,language_model_only, it is not a parameter ofplanning.fit(...)(ignition/planning.py:445-453) orplanning.plan(...)(:581-589). It is applied bydataclasses.replace(...)after planning returns (ignition/cli/preparation.py:70-75;ignition/cli/serve.py:206-211,:475-480).Plan.__post_init__computesweights_bytesviaRecipe.weights_bytes(...)(:524-533) before the replace, andRecipe.weights_bytes(ignition/declaration.py:363-374) has no head parameter — so the ~600 MiB TP1 saving the description attributes to the stack is not reflected in the weights estimate, GPU auto-selection orfit/_shortfallcapacity errors. Every other compression flag is inside that estimate. - It silently introduces a new hard compatibility gate.
target_head_quantizationis recorded underSCOPE_TARGET_WEIGHT, andcompatible_for_combine(helios/src/runtime_core/preparation.rs:310-321) requires exact parameter-slice equality for every non-deployment scope;compatible_for_weight_reuse(:330-347) does the same. Two cores of the same recipe+revision prepared with and without the flag can therefore no longer be combined byflare combine, and--reuse-weightsagainst a cached default-precision version fails. The docs row states the "requires re-export" half; the combine refusal between two logs of the same recipe is not stated anywhere. - Three same-shape PRs are racing on the same eight-to-ten files, and #518 repeats the blocker Autobot raised on a sibling. #516 (
--kv-cache-format, open, 12 files, +369/−18) and #508 (--row-shard-attention, open, 11 files, +281/−21) are concurrent same-day PRs adding recipe-declared preparation flags to the same files. Autobot requested changes on #516 because "nothing in the repository consumes or verifies the selection"; #516's author fixed that by adding aBasePreparationConfig.kv_cache_formatfield, a documented recipe-side contract and help/docs updates. #518 shares the unaddressed half: no bootstrap field, no documented recipe-side contract, no consumer. - All performance and quality numbers are deferred to the paired stack and have no in-repo evidence. The body states that
+7.5–9.0%C1 decode,~600 MiBsaved on TP1,44/44quality gate PASS, and TP2 RoCE116.0 / 164.2 / 230.5 / 332.4 tok/s"belong to the paired core + recipe stack, not this core flag alone", giving no baseline tok/s, package identities, exact commands or link to the recipe-side evidence. Principle 12 ofdocs/design-review.md:97-105requires equivalent baselines and actual Helios service measurements; the description is careful not to claim them for this PR. - The zero-change and recipe-free claims hold. All new emissions guard on
is not None(ignition/planning.py:411-412,rebuild_manifest.py:302,:363), the recipe tuple defaults to(), and the CLI default is None. Nohelios/,heliopause/,.proto,ignition/components/or Rust file is in the diff;tests/preparation/test_core_boundary.py:11-26pins the 13 Helios-ABI modules and none is touched. - Docs: one table row only, and no prior demand found. Only
docs/cli-design.md:454was added.ignition/cli/help.py(per-modelMODEL --help, which lists--expert-scale-compression,--mla-compute-mode,--speculative-*) was not touched, soignition export MODEL --helpwill never advertise the flag.docs/runtime-core-design.md:374-375lists which keys belong toSCOPE_TARGET_WEIGHTand was not updated.search_itemsfinds no issue or prior user request proposing a target-head conversion flag.
1. The change, in plain terms
The PR adds one opt-in knob. Recipe gains target_head_quantizations: tuple[str, ...] = () (ignition/declaration.py:277-278), validated in __post_init__ to accept only "mxfp8" (:328-329); the neighbouring comment changed from "used only by proposals" to "vocabulary and transition projections". The CLI gains --target-head-quantization with choices=("mxfp8",) in the advanced argument group, model-agnostic help text, default None (ignition/cli/__init__.py:212-214 — contrast the neighbouring --draft-head-quantization help at :207-211, which names DeepSeek/Qwen/Kimi). derive(...) gains a keyword and forwards it (ignition/cli/preparation.py:57, :73); serve.py forwards it at three sites (:210 multi-host/--ranks>1 path, :278 single-host path, :479 debug_serve) and adds · target head mxfp8 to the startup summary (:314); bench.py:170 forwards it and :243-252 rewrites the configuration.preparation dict comprehension to include the key only when present. Plan.target_head_quantization: str | None = None (ignition/planning.py:199) is validated in __post_init__ with UsageError("--target-head-quantization {fmt}: {alias} does not prepare this target head format") (:289-292) and appears in to_dict() only when set (:411-412). rebuild_manifest.py appends ['--target-head-quantization', value] in reproduction_arguments (:302-303) and add('target_head_quantization', SCOPE_TARGET_WEIGHT, value) in from_plan (:363-364), both only when set. docs/cli-design.md:454 adds one table row.
Tests (+88/−2): tests/cli/test_commands.py gains the target_head_quantizations=() fixture kwarg, test_target_head_quantization_flag_is_model_agnostic parametrized over export/debug-serve/bench (default None, accepts mxfp8, --help exits 0, and the help section between --target-head-quantization and --markov-head-quantization contains no "Qwen"), and test_derive_forwards_and_validates_target_head_quantization. tests/cli/test_planning.py gains test_target_head_quantization_validation_and_preparation_manifest, asserting Recipe rejects nvfp4, the base plan omits the key, replace(...) sets it, reproduction_args carries the flag iff set, and a json_format.ParseDict → PreparationManifest round-trip places the parameter in PREPARATION_PARAMETER_SCOPE_TARGET_WEIGHT with sorted unique keys.
What the description does not say: (a) that the value is applied after planning via dataclasses.replace, bypassing fit/weights_bytes (finding 2); (b) that the new parameter becomes a combine/reuse equality gate (finding 3); (c) that no bootstrap field or documented recipe-side contract exists (finding 1). What the description says that the code does not do: "freeing the temporary BF16 vocabulary weight after conversion" is a recipe-side behaviour; nothing under ignition/preparation/ can free or convert a head. A recipe can only see the choice as plan.target_head_quantization on the Plan handed to prepare(snapshot, plan, ...) (ignition/declaration.py:212-213, ignition/cli/serve.py:231) — that route works but is documented nowhere, and the Recipe docstring (:209-243) was not extended with a sentence for the new field, unlike online_mxfp8*, language_model_only and row_shard_prefill_world_sizes.
Minor: derive()'s new kwarg is not forwarded into planning.plan, so derive and plan disagree on where the flag enters. serve.py:210/278/479 and bench.py:170 use getattr(args, "target_head_quantization", None) although _preparation_arguments always defines the flag (ignition/cli/__init__.py:50/53/60); a reviewer on #516 asked for exactly this kind of defensive getattr redundancy to be removed. rebuild_manifest.py:302 uses getattr(plan, ...) while :363 uses the direct attribute.
2. The why
Existing conversion paths deliberately exclude the target vocabulary head, so this is the first core flag that lets target-head precision leave the checkpoint: docs/cli-design.md:474 (--online-mxfp8) says "Existing packed weights, normalization, convolutions, selectors and target vocabulary weights retain their precision"; :453 (--draft-head-quantization) says "Prepare a separate proposal vocabulary head while retaining target-head precision"; docs/mtp-design.md:64 (not opened) notes the MTP payload is "Shared target weights; no separate stored MTP payload". Until now target-head precision was an invariant of every conversion option.
Related earlier merged core PRs in the same machinery, all draft-side: #65 (NVFP4 draft/Markov head flags, a773e688), #98 (MXFP8 DeepSeek draft vocab head, 9e35eeb2), #121 (FP8 DeepSeek draft transition head), and #291 (independent DFlash2 body quantization, 91b2e858, which added draft_body_quantizations + --draft-body-quantization — the pattern #518 copies verbatim). Recipe-side precedent for keeping the target head BF16 while quantizing proposals: #312 (Inkling) and #229 (Muse Glimmer, where lm_head quantization is a checkpoint property — "213 NVFP4 W4A16 targets, including lm_head" — rather than a preparation flag).
How long and how widely wanted: no positive evidence. search_items found no issue or PR proposing a target-head conversion flag; the closest user wants are #20/#44 (Qwen proposals) and #229's checkpoint-level head quantization. The motivation is first stated in this PR body and measured only in the external recipe stack. The problem is real in principle — the PR body quantifies the 248,320 x 2,560 BF16 head at 1.21 GiB on a 273 GB/s LPDDR5X DGX Spark GB10 — but that figure is derived in the description, not linked to a measurement artifact here.
3. Related work
- #516 "ignition: add --kv-cache-format declaration, planning, help, and manifest support" (open, loud1990, 12 files, +369/−18): the same design — recipe declaration tuple, CLI flag,
Planfield,Plan.to_dict,reproduction_arguments,PreparationManifestscope — for KV cache format, recorded underSCOPE_DEPLOYMENT. It additionally editsignition/cli/help.py,ignition/preparation/bootstrap.pyanddocs/runtime-core-design.md, and adds a dedicated test file. Autobot requested changes the same day on the ground that nothing consumed or verified the selection and that a default"fp8"wrote into every manifest; the author answered by adding aBasePreparationConfig.kv_cache_formatfield plus a documented recipe-side contract and linking the recipe PR. #518 has not adopted either half of that remedy. - #508 "Add recipe-declared row-sharded attention planning and PreparationManifest metadata" (open, FujitsuPolycom, 11 files, +281/−21): same-shape, shares all 10 files with #518, charge to
Recipe.weights_bytes, typedReplicatedAttentionBytesprotocol, editsdocs/TODO.txt. Autobot's blocker there was different: the metadata half was built on the retiredRebuildManifestschema. #518 avoided that pitfall — it targetsfrom_plan/reproduction_argumentswithSCOPE_TARGET_WEIGHTand carries no.proto/pb2 churn, consistent with its claimed rebase onto2771618. - #499 "feat(ignition): add recipe-declared row-sharded prefill planning and PCIe DMA / RoCE row-shard collectives" (merged 2026-11-24,
d0adb958): landed the exact parameter/Recipe-tuple pattern #518 copies. On it Autobot wrote that "the cross-repository split is maintainer-directed … so 'no in-tree consumer' is context, not a finding" — relevant mitigation for finding 1, but #516's reviewer still required a documented contract. - #291 "Add independent DFlash2 body quantization" (merged,
91b2e858, merged by priority contributor voipmonitor): the direct pattern source for*_quantizations+ validation +--draft-body-quantization; it also added explicit effective-precision resolution for the old/new metadata asymmetry, which #518 does not do for legacy cores. - Textual conflicts: all three of #508/#516/#518 rewrite the
bench.py_measureconfiguration dict and therebuild_manifest.from_planparameter list, so a merge will conflict regardless of review order. - Not relevant, checked: #283/#284/#282/#330 (DeepSeek row-shard family — same files, unrelated topic, superseded in core by #499/#508), #404 (activation steering), #122 (compiler headroom), #212 (YaRN — shares
test_commands.pyonly), #386/#433/#229 (model-recipe PRs that merely touch planning/tests).
4. Recent activity in the touched areas
main's relevant latest commits are 2771618 (Luke Alonso, 2026-11-24, "Deprecate RebuildManifest and replace with PreparationManifest" — the base commit #518 claims to be rebased onto), 84ac035c (Luke Alonso, 2026-11-24, "Remove --collective-tuning, offline ladders, and collective startup-tuner emission") and d0adb958 (#499, row-sharded prefill). #518 builds on 2771618 (it writes PreparationManifest via from_plan, not the retired RebuildManifest) and follows #499's pattern; it reverses nothing. No commit on main removes or deprecates head-quantization flags: --draft-head-quantization, --draft-body-quantization and --markov-head-quantization all survive (ignition/cli/__init__.py:204-217), and --online-mxfp8 still excludes target vocabulary weights (docs/cli-design.md:474). The one reconciliation left undone: that :474 sentence ("target vocabulary weights retain their precision") is still true but now incomplete without a cross-reference to the new flag, and neither document was reconciled.
5. People
nero- is a CONTRIBUTOR with a consistent record of exactly this pattern: #433 "Add Inkling 2 Mini text, vision, DSpark preparation, and fused loop kernels" (merged 2026-11-21, e9d509d6), where the author wrote "Proposal-head options declared & validated: Added draft_head_quantizations=("nvfp4", "mxfp8") and markov_head_quantizations=("nvfp4",) to MINI_RECIPE" — the target_head_quantizations field is the target-side sibling. Also #220 (DeepSeek V4.1 TP6 preparation, merged), #219 (Helios partitioned Engram tables, merged), #161 (closed), and #467 "Enable TP2 and TP4 expert-sharded preparation for Inkling 2 Mini", closed with "Moved to local-inference-lab/hyperflare-recipes PR #17 following the repository split" — i.e. the author has already been steered to the external recipe repo once, which is the same split logic this PR relies on. Open issues #119 (orbit evicts flare download's package cache) and #118 (DeepSeek V4.1 positions before 128).
Who else works here: ignition/cli 77 (Luke Alonso) / 24 (Martin Vit) / 14 (jasonc); ignition 255 / 112 / 70; ignition/preparation 149 (Luke Alonso) / 48 (Martin Vit) / 36 (Eugene Rakhmatulin). Luke Alonso authored the PreparationManifest deprecation and the scope design in docs/runtime-core-design.md, so he is the most likely decider on the SCOPE_TARGET_WEIGHT placement. #291, the pattern source, was merged by voipmonitor.
Engagement so far: none — 0 comments, 0 reviews, 0 reactions, no linked issue, no linked recipe PR in GitHub's link metadata.
6. Community
No comments, no reviews, no inline review comments, no reactions (pr_comments → "No comments"; read_item 518 shows "Discussion (0)"). The only engagement is the opening itself, at 14:52 on 2026-11-25, updated at 14:56. No one has been added as reviewer.
7. Project fit
Aligned:
docs/design-review.md:80-83(principle 10, explicit configuration; environment-variable behaviour switches prohibited) anddocs/cli-design.md:42-47— the PR's stated motivation matches these verbatim.docs/design-review.md:76-79(principle 9, preserve checkpoint precision; never silently requantize) — the flag is opt-in, default-off, and requires a recipe that declares support.docs/cli-design.md:17-22("Intent, not mechanism… The command line never needs to know which model it runs") — the flag's--helptext names no model; the tests enforce that (test_commands.py:110-114).docs/design-review.md:33-37+tests/preparation/test_core_boundary.py:40-48put model recipes inlocal-inference-lab/hyperflare-recipes, so "no in-tree consumer" is an expected consequence of the split, not proof of a broken change (Autobot said exactly this on #499).docs/design-review.md:106-113(principle 13, preserve model core compatibility) — no schema change; the new key is an optional manifest parameter, andvalidate_preparation_manifest(helios/src/runtime_core/preparation.rs:82-138) accepts arbitrary strictly-ascending keys without matching them to a known set, so an older Helios build still loads a core carrying it.
Not aligned / contested:
docs/design-review.md:125-136(principle 15: "Reject per-model boolean policy flags … Enums, callbacks, schema names, and metadata fields cannot serve as alternative model allowlists. Review each member and its consumers for a concrete meaning independent of model identity.")target_head_quantizationsis a default-empty tuple acting as a model allow-list for a flag whose only demonstrated consumer is one external Qwen recipe, and there is no in-repo consumer to inspect — the central judgement a reviewer has to make.docs/cli-design.md:439-441"Recipe values apply when flags are omitted; explicit flags take precedence" is only half true here: the recipe declaration is an allow-list, and there is no recipe-supplied default value for this setting (unlikeexpert_scale_compression,mla_compute_mode,online_mxfp8_scope, which resolve from the recipe inPlan.__post_init__).- Charter "What gets merged" requires "a measured performance/memory issue"; the measurement lives only in the external recipe PR. Charter line 12 (keep the runtime small and model-agnostic; recipes handle model computation) is respected — the change adds no per-model branch.
docs/design-review.md:97-105(principle 12) — no in-repo performance claim is made, and the description discloses the unruncargo test. Diligence is fine; the evidence for the benefit simply is not in this repo.
8. Claims and evidence
| Claim (PR body) | Evidence in the repo | Verdict |
|---|---|---|
Omitting the flag leaves plans, Plan.to_dict(), PreparationManifest, exports and checkpoint precision unchanged |
All emissions guard on is not None (planning.py:411, rebuild_manifest.py:302, :363); Recipe tuple defaults to (); CLI default None |
Supported. Only unconditional diffs are the docs row and the semantically identical bench.py dict rewrite |
Core ignition stays recipe-free; ignition/components/ keeps its 13 Helios-ABI modules; Helios runtime policy and PreparedContract untouched |
No helios/, heliopause/, ignition/components/ or .proto file in the 10-file diff; tests/preparation/test_core_boundary.py:11-26 pins the module list |
Supported |
"Automatic TARGET_WEIGHT scope validation in flare combine and --reuse-weights" |
helios/src/runtime_core/preparation.rs:286-347 compares all non-deployment parameters generically |
Mechanically true but it is an equality gate, not validation of the value: flagged and unflagged cores cannot be combined/reused. The consequence for two logs of the same recipe is stated nowhere |
+7.5–9.0% C1 decode, ~600 MiB on TP1, 44/44 gate, TP2 RoCE 116.0/164.2/230.5/332.4 tok/s, 100% gate |
None in this repo; the description attributes them to "the paired core + recipe stack, not this core flag alone"; hyperflare-recipes#40 is another repository and unreachable |
Claimed, not evidenced within the repo; explicitly not claimed for this PR alone. No baseline tok/s, package identities or commands given |
| Memory saving | Recipe.weights_bytes (declaration.py:363-374) has no head parameter, and plan() computes it before the replace |
Contradicted as a planning claim: the saving is not visible to weights_bytes, GPU selection, or fit shortfall errors |
144 passed, 0 failed in 4.35s; cargo test not run because no Rust changed |
Reproducible command, host (DGX Spark GB10 ARM64), base commit 2771618 and the reason for the single deselection are given; the deselected test is test_preparation_manifest_resolves_scopes_and_dflash2_inheritance, skipped because the host's prebuilt flare_heliopause wheel predates 2771618 |
Not reproducible here; no CI log exists to corroborate (no checks on the head commit) |
| "freeing the temporary BF16 vocabulary weight after conversion" | Recipe-side behaviour; bootstrap.py:24-65 does not carry the flag |
Not verifiable here; the only route is reading plan.target_head_quantization inside Recipe.prepare |
| Flag is model-agnostic | cli/__init__.py:212-214 names no model; test_commands.py:110-114 asserts "Qwen" absent from that help section |
Supported, though the docs row and PR body themselves name Qwen3.8 Flash Next |
9. Reach
Affected: ignition export, ignition debug-serve, ignition bench (all three define the flag via _preparation_arguments, cli/__init__.py:50/53/60); the preparation startup status line (serve.py:314); the bench JSON configuration.preparation block (bench.py:243-252); Plan.to_dict() (JSON on stderr); PreparationManifest.reproduction_args and parameters; and — through the new parameter — flare combine and --reuse-weights compatibility. flare inspect renders parameters generically (helios/src/runtime_core/preparation.rs:351-383), so the new key appears with no Rust change.
Not affected: flare run/Helios serving (serving ignores preparation metadata, preparation.rs:10-12), config.toml (not opened) (ignition/cli/config.py has no preparation entry for it — consistent with the row's "Command line only"), Protobuf schemas and helios/src/runtime_core/protobuf.rs:27-28 (not opened), and any dependency or pin. Legacy cores simply lack the key, which makes them incompatible for combine/reuse against new flagged cores — the asymmetry #291 handled by adding explicit effective-precision resolution.
Documentation gap: ignition/cli/help.py's recipe_help (the per-model MODEL --help) was not touched, so ignition export MODEL --help will not advertise the flag even for a recipe that supports it, although the same function lists --expert-scale-compression, --mla-compute-mode, --speculative-method and --speculative-token-capacity (contrast #516, +18 lines to help.py). docs/runtime-core-design.md:374-375 enumerates the SCOPE_TARGET_WEIGHT keys and was not updated. The Select GPUs. startup line is described at docs/cli-design.md:481-485, which does not mention the new · target head mxfp8 token. docs/TODO.txt was not touched, so there is no tracked follow-up for the recipe-side contract (the #508 review asked for exactly such TODO entries for its unrun checks).
10. Process
Ready for review, not draft. Head commit f54928b9, authored by "Jonathan Gutierrez", subject "Add recipe-declared --target-head-quantization preparation flag" — a single squashed commit while the PR body is written in the third person about tooling. No labels (not even the model:* / triage:design-review labels seen on #212). No CI checks on the head commit and no attached CI log. Zero reviews. Age: opened today. Unverifiable from here: docs/design-review.md:161-208 and .githooks/commit-msg require a Design-Signed-Off-By: ...; design-review=xxxx trailer on every commit; only the commit subject is visible in the local copy, so whether this commit carries a valid trailer cannot be confirmed — worth checking, since the PR lists tests/test_design_review_hook.py among the passing tests. The rebase claim onto origin/main 2771618 is consistent with the diff (edits from_plan/reproduction_arguments, uses SCOPE_TARGET_WEIGHT, no pb2 churn).
Open questions
- Where does the recipe-side contract live? A recipe can only read
plan.target_head_quantization; nothing in the repo documents that contract, andbootstrap.pydoes not forward it. Is aBasePreparationConfigfield plus docstring like #516's expected here? - Should the flag be inside
planning.plan/fit/weights_bytesso that memory estimates, GPU selection and shortfall errors reflect the smaller head? As written, the fit check cannot use the saving it is meant to produce. - Is the new
SCOPE_TARGET_WEIGHTcombine/reuse equality gate between two logs of the same recipe acceptable, and should it be documented (and/or resolved the way #291 resolved effective precision)? - Does
target_head_quantizationspass principle 15 ("metadata fields cannot serve as alternative model allowlists")? Its only demonstrated consumer is one external Qwen recipe. - Should
ignition/cli/help.pyanddocs/runtime-core-design.md:374-375be updated alongsidedocs/cli-design.md:454? - Which of #508 / #516 / #518 merges first — they conflict textually on
bench.pyandrebuild_manifest.py?
What could not be found
- Any linked issue, user report or prior request for a target-head conversion flag — none exists in the searched history.
- The evidence behind the performance and quality numbers:
local-inference-lab/hyperflare-recipes#40is in another repository and unreachable, so the+7.5–9.0%,~600 MiB,44/44and TP2abbenchfigures cannot be checked. - The head commit's full message and design-review trailer.
- Any CI result for
f54928b. - Any in-tree recipe declaring
target_head_quantizations(ignition/recipes/does not exist at the head of this PR — removed by the repository split).