Repository navigation
Conversation
Bandwidth-limited GPUs such as DGX Spark GB10 (273 GB/s LPDDR5X) spend a
measurable share of each single-user decode step reading a full-precision BF16
vocabulary projection (`lm_head`, e.g. 1.21 GiB for a 248,320 x 2,560 head) and
reserve that weight memory out of the unified KV cache budget. Checkpoint
precision must remain the default, and Flare forbids environment-variable
behavior switches, so opting into a quantized target vocabulary head requires an
explicit recipe-declared preparation flag carried through `Plan` and
`PreparationManifest` without adding model-specific logic to core `ignition`.
Changes:
- Add `Recipe.target_head_quantizations: tuple[str, ...] = ()` in
`ignition/declaration.py`, validated in `Recipe.__post_init__` to accept
supported target head formats (`"mxfp8"`).
- Add the default-None, model-agnostic `--target-head-quantization {mxfp8}`
advanced preparation flag in `ignition/cli/__init__.py` across `export`,
`debug-serve`, and `bench`, forwarded through `ignition/cli/preparation.py::derive`,
`ignition/cli/serve.py` (`_export_hosts`, `_prepare` including startup status
summary, and `debug_serve`), and `ignition/cli/bench.py` (`run` and `_measure`).
- Add `Plan.target_head_quantization: str | None = None` in `ignition/planning.py`,
validate against `self.recipe.target_head_quantizations` in `Plan.__post_init__`
(raising `UsageError` naming `self.checkpoint.alias` when unsupported), and
record it in `Plan.to_dict()` when set.
- Record `--target-head-quantization <format>` in
`ignition/preparation/rebuild_manifest.py::reproduction_arguments` and emit
`target_head_quantization` under `SCOPE_TARGET_WEIGHT` in
`PreparationManifest` (`from_plan`) when set (omitted when `None` so existing
default-precision cores remain compatible across `combine` and `--reuse-weights`
with zero Protobuf or Rust changes).
- Document `--target-head-quantization {mxfp8}` in `docs/cli-design.md`.
- Add recipe-free unit tests in `tests/cli/test_commands.py` and
`tests/cli/test_planning.py` verifying model-agnostic CLI help, `derive`
forwarding and rejection, `Recipe` / `Plan` validation, `Plan.to_dict()`, and
`PreparationManifest` (`SCOPE_TARGET_WEIGHT` + `reproduction_args`) Protobuf
round-trip.
Result:
- Core `ignition` remains strictly recipe-free (`ignition/components/` keeps its
13 Helios-ABI modules), Helios runtime policy and `PreparedContract` are
unchanged, and omitting `--target-head-quantization` preserves existing plans,
exports, and checkpoint precision identically.
- Enables downstream recipes declaring `target_head_quantizations=("mxfp8",)`
(such as Qwen3.8-Flash-Next in `local-inference-lab/hyperflare-recipes`) to
prepare opt-in MXFP8 target `lm_head` weights with full `PreparationManifest`
`TARGET_WEIGHT` scope tracking for `flare combine` and `--reuse-weights`.
Measured serving gains on GB10 (+7.5-9.0% C1 decode, ~600 MiB memory saved on
TP1, 44/44 quality checks PASS) belong to the paired core + recipe change, not
this core flag alone.
Evidence and limitations:
- Rebased onto `origin/main` `2771618` (`PreparationManifest`) and verified
unit tests covering core boundary invariants, commit-msg design-review hook,
model-agnostic CLI flag parsing, `derive` forwarding and rejection,
`Recipe`/`Plan` validation, and deterministic `PreparationManifest`
`SCOPE_TARGET_WEIGHT` Protobuf round-trip.
- End-to-end TP1 and TP2 RoCE Qwen3.8-Flash-Next exports with
`--target-head-quantization mxfp8` were qualified on DGX Spark GB10 (SM121)
with the companion `hyperflare-recipes` PR via `flare run`.
- Limitations: Rust `cargo test` was not run because no Rust or Protobuf files
were modified.
Design-Signed-Off-By: Antigravity (Gemini); design-review=eb2f
Signed-off-by: Jonathan Gutierrez <john.gtz@icloud.com>
|
A case file has been opened for 518. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review for Agents. Recommendation: Changes RequestedThe layering is right and no redesign is asked for: the setting is an Ignition-only Blockers:
Should fix:
Nits:9 nits Open question for maintainers, not the author: this is now the fourth parallel projection-precision flag, and unmerged PR #312 reaches the same vocabulary-head outcome through a recipe-declared To opt out, include #autobot:ignore in your post or comment. |
|
This needs to be rebased (or closed) |
|
Closing as obsolete after the |
Why
On bandwidth-constrained GPUs such as DGX Spark GB10 (273 GB/s LPDDR5X), reading a full-precision BF16 target vocabulary projection (
lm_head, e.g., 1.21 GiB for a248,320 x 2,560head) consumes a significant fraction of single-user decode step time and unified KV memory. Because Flare preserves checkpoint precision by default and prohibits environment-variable behavior switches, opting into a quantized target vocabulary head requires an explicit recipe-declared CLI preparation flag carried throughPlanandPreparationManifestwhile keeping coreignitionstrictly recipe-free.This PR supplies the recipe-free core declaration, CLI flag, validation, and
PreparationManifest(SCOPE_TARGET_WEIGHT) plumbing consumed by the companionlocal-inference-lab/hyperflare-recipesPR (local-inference-lab/hyperflare-recipes#40) for Qwen3.8-Flash-Next (merge this PR before or alongside the recipe PR).What Changed
ignition/declaration.py):Recipe.target_head_quantizations: tuple[str, ...] = ()and validated inRecipe.__post_init__that entries name supported target head formats ("mxfp8").ignition/cli/__init__.py,ignition/cli/preparation.py,ignition/cli/serve.py,ignition/cli/bench.py,ignition/planning.py):Planfield existed to opt into target vocabulary head quantization.None, model-agnostic--target-head-quantization {mxfp8}advanced preparation flag acrossexport,debug-serve, andbench, forwarded throughderive(...),_export_hosts,_prepare(including the startup status summary),debug_serve, andbench.Plan.target_head_quantization: str | None = None, validated againstself.recipe.target_head_quantizationsinPlan.__post_init__(raisingUsageErrornamingself.checkpoint.aliaswhen unsupported), and included"target_head_quantization"inPlan.to_dict()(andbenchconfiguration output) only when set.ignition/preparation/rebuild_manifest.py,docs/cli-design.md):['--target-head-quantization', plan.target_head_quantization]inreproduction_arguments(...)when set, and emittedtarget_head_quantizationunderSCOPE_TARGET_WEIGHTinPreparationManifest(from_plan) when set (omitted whenNoneso existing default-precision cores remain 100% compatible acrossflare combineand--reuse-weights, with zero changes tohelios/or Protobuf schemas).--target-head-quantization {mxfp8}indocs/cli-design.md.tests/cli/test_commands.py,tests/cli/test_planning.py):--helptext acrossexport/debug-serve/bench,derive(...)forwarding and unsupported-recipe rejection,Recipe/Planvalidation,Plan.to_dict(), and deterministicPreparationManifest(SCOPE_TARGET_WEIGHT+reproduction_args) Protobuf round-trip.Claimed Benefit / Result
ignitionremains strictly recipe-free (ignition/components/retains its exact 13 Helios-ABI modules), Helios runtime policy andPreparedContractare untouched, and omitting--target-head-quantizationleaves plans,Plan.to_dict(),PreparationManifestentries, exports, and checkpoint precision completely unchanged.target_head_quantizations=("mxfp8",)(starting with the companion Qwen3.8 recipe) to prepare opt-in MXFP8 targetlm_headweights without environment variables, with automaticTARGET_WEIGHTscope validation inflare combineand--reuse-weights. End-to-end serving gains observed on DGX Spark GB10 with the companion Qwen3.8 recipe (+7.5–9.0%C1 decode,~600 MiBsaved on TP1,44/44quality gate PASS; plus combined-stack TP2 RoCE116.0 / 164.2 / 230.5 / 332.4 tok/sabbenchand100%quality gate) belong to the paired core + recipe stack, not this core flag alone.Supporting Evidence & Limitations
f54928brebased ontoorigin/main2771618):pytest -v tests/preparation/test_core_boundary.py tests/test_design_review_hook.py tests/cli/ -k "not test_preparation_manifest_resolves_scopes_and_dflash2_inheritance": 144 passed, 0 failed in 4.35s (covers core boundary invariants, commit-msg design-review hook, model-agnostic CLI flag parsing,deriveforwarding/rejection,Recipe/Planvalidation, deterministicPreparationManifestSCOPE_TARGET_WEIGHT+reproduction_argsProtobuf round-trip, and native CLI tests;test_preparation_manifest_resolves_scopes_and_dflash2_inheritancewas deselected only because the test host's prebuiltflare_heliopausewheel predates2771618).--target-head-quantization mxfp8were exported and served viaflare runon DGX Spark GB10 (SM121) with the companionhyperflare-recipesPR.cargo testcrates were not run because no Rust or Protobuf files were modified.Discord: nero