#1 [high] Research summary
Reviewed PR #518 (--target-head-quantization) under the correctness lens: every changed file read in surrounding code, plus all callers/consumers of Plan (derive, _export_hosts, _prepare, debug_serve, bench, prepare_recipe/tuning_replicas, rebuild_manifest.from_plan/reproduction_arguments, Helios preparation.rs scope comparison). No blocking defect found; the plumbing is consistent and the "omitted → unchanged" claim holds. Findings: (1) Should fix — plan sizing never credits the flag, so Recipe.weights_bytes (ignition/declaration.py:363-374, called at ignition/planning.py:526) still counts the full BF16 head; Plan.fits, the CapacityError shortfall/options text (planning.py:551-563, 697-725) and _keep_reserve (serve.py:51-57) therefore describe a model larger than what is prepared, which can reject a preparation that would fit — exactly the memory-constrained DGX Spark case the PR cites (1.21 GiB head at TP1). (2) Should fix (docs/validation) — --draft-head-quantization and --target-head-quantization can be combined; nothing in planning.fit/Plan.__post_init__ rejects it and docs/cli-design.md:453 still says the draft-head flag retains target-head precision (the two documented flags apply to the same Flash Next recipe per lines 453-454). (3) Nit — duplicated/again-worded validation (planning.py:289-293 vs the sibling "proposal head format" message at planning.py:487-491; target head is checked in two places while draft/markov heads only in fit), a drift risk. (4) Cross-repo risk to state plainly — nothing in this repo consumes plan.target_head_quantization beyond to_dict, the startup summary and PreparationManifest; if the companion recipe declares target_head_quantizations but does not read the field, export accepts the flag, records a SCOPE_TARGET_WEIGHT parameter and prints "target head mxfp8" while weights stay BF16 — a silently accepted no-op that would also make such a core weight-incompatible with the real quantized one on flare combine/--reuse-weights. Only a test in the recipes repo settles it. Verified-correct items (omission keeps manifests byte-identical, fields(root) propagation to tuning replicas, bench output guard, no [preparation] config key matching "command line only") are in the report body.
Details, file:line evidence and what would settle each item are written up in the final report below.
#2 [high] Should fix: target-head flag not reflected in plan sizing / capacity errors
PR #518 adds Plan.target_head_quantization (ignition/planning.py:199) but never feeds it into sizing.
Recipe.weights_bytes(checkpoint, world_size, speculation, expert_scale_compression)(ignition/declaration.py:363-374) returnsdevice_bytes (+ expansion) - draft_bytes (+ drafts), i.e. the full-precision stored weights. It takes no head-quantization argument, andfit()passes onlyexpert_scale_compression(ignition/planning.py:526). The flag's own PR text says the conversion "free[s] the temporary BF16 vocabulary weight after conversion" (~600 MiB on TP1; 1.21 GiB BF16 head for 248,320x2,560).- Consequences:
Plan.fits(planning.py:382-385),_shortfall()(planning.py:551-563), the automatic GPU search (automatic(), planning.py:674-680) and the suggested options list (planning.py:697-725) all size a model larger than what preparation actually allocates. On the memory-constrained target (DGX Spark GB10) a plan can raise CapacityError listing "--max-concurrency N"/"--no-mtp"/--language-model-only for a preparation that would have fit, or select more/smaller GPUs than necessary. - Same overstatement feeds
_keep_reserve(ignition/cli/serve.py:51-57) only indirectly (it uses measured usage, so that one is fine), but the printed plan (plan.to_dict()["weights_bytes"], planning.py:431) andbenchdetails report a weight total that includes the freed head. - Fix: compute and apply the saving when
target_head_quantization is not None(e.g. subtract the target vocabulary head's BF16 bytes / add a per-format saving inweights_bytes), sofits, shortfall text, and reportedweights_bytesreflect MXFP8. Alternatively document explicitly that planning intentionally keeps the BF16 estimate — but then the flag can make an advertised-fitting configuration fail planning. - Settled by: a test asserting
replace(plan, target_head_quantization="mxfp8").weights_bytes < plan.weights_bytes, or by the companion recipe PR showing the loader's actual byte reduction against the plan. Severity: should fix (not blocking: preparation still works, validation and manifests are correct).