#1 [high] Research summary
Conventions-and-duplication review of PR #229 (all changed files read in context against their closest precedents: muse_spark, nemotron_h, qwen38_dense, gemma4, patch_merge, and the shared ignition/components/*). Findings, in severity order.
Should fix
-
helios/src/frontend/images/packing.rs:98-105— graph input packing is now selected byImageLayoutKind::BracketedandImagePreparationKind::MuseGlimmer. Every other arm dispatches onimage_layoutalone, and AGENTS.md ("Architecture and ownership") states image-preparation/layout identifiers "cannot select scheduling, cache policy, text-graph input packing, or completion behavior".ImageLayoutKindexists precisely to select the staged tensor set (tensor_layout,packing.rs:16-83); adding arm(Bracketed, "vision_cu_window_seqlens")at:69also makes two different checksum sets share one layout id. Fix: give Muse Glimmer its own additiveImageLayoutKindvalue and dispatch on layout only, asPatchMerge/ClassTokendo. -
ignition/recipes/muse_glimmer_nvfp4/recipe.py:72— the recipe ships a real z-lab DFlash2 drafter throughDFlash2Preparationbut leavesSpeculation.methodunset. The established precedent for exactly this drafter (ignition/recipes/qwen38_dense/recipe.py:68(not opened),method="dflash2") sets it, and the field is load-bearing:ignition/planning.py:451-475gates--speculative-methodand--draft-body-quantization,:574gates mixed prefill onmethod == "dflash2",helios/src/runtime_core/protobuf.rs:22-30(effective_draft_body_quantization) does nothing for a method-less DFlash2 spec, andignition/cli/serve.py:314(not opened) drops the "DFlash2 proposals" label. Muse Spark has the same defect; this PR should not replicate it. Fix: declaremethod="dflash2"(or state indocs/TODO.txtwhy both Muse recipes leave it unset). -
qualify/results/glimmer-c16/summary.json(new, 76 lines) — a one-off run artifact committed to the tree.mainhas noresults/directory at all, no other recipe carries such a file, and its fields (admitted_delta,rounds_batch16_width16,accepted_per_request_round) appear nowhere else in the repository, so no in-repo harness produces or consumes it; the schema does not matchqualify/speculative_benchmark.py'smeasurements.json(not opened) (run()at:486-540). It also records a core built from the fork, which this branch cannot reproduce (the PR description says so). AGENTS.md asks for raw measurements "with their configuration" but also forbids development audit artifacts; the numbers are already in the description. Fix: drop the file, or land it as output of a documented harness with the configuration alongside. -
ignition/recipes/muse_glimmer_nvfp4/draft_config.py:16-77re-derivesDFlash2Config(identicallayers,target_layers,block_size,noise_token,attention,validate_shard, sameDraftAttentionGeometryimport) fromignition/components/dflash2_geometry.py:27-101. The current precedent for a pinned drafter isignition/recipes/qwen38_dense/draft_config.py:1-25, a 25-line file that delegates viaDFlash2Config.from_dict(..., expected=PROFILE); the shared reader already performs the pinned-geometry, tap-ordering and mask-range checks this copy spells out. The PR records the attention fold-back indocs/TODO.txtbut not this one, contrary to the AGENTS.md "Task tracking" rule. Fix: delegate to the shared reader, or add the matching TODO entry.
Nits
-
ignition/recipes/muse_glimmer_nvfp4/attention.py:61-63copiesmuse_spark/attention.py:57-59verbatim whileignition/components/head_norm_rope.py:38(not opened) already exposes a prepared head-norm;attention.pyas a whole (215 lines) andmodel.py:9-40duplicate Spark's modules. Both are recorded in the newdocs/TODO.txtentry, so the convention is met — noting so the duplication is not lost. -
ignition/recipes/muse_glimmer_nvfp4/decoder.py:69-70is a thirdtanh(x·mult/softcap)·softcap:gemma4/decoder.py:21-23(not opened),muse_spark/decoder.py:195-202(SoftcappedProjection), and inline atignition/components/dflash2.py:379 (not opened),551. A single shared helper would cover all four. -
ignition/recipes/muse_spark/config.py:18-31AttentionGeometryandignition/components/dflash2_geometry.py:11-24DraftAttentionGeometryare field-for-field identical, includinglocal(shard); Muse Glimmer imports the former (config.py:14) and uses the latter for its drafter (draft_config.py:10). Pre-existing duplication, extended here. -
ignition/recipes/muse_glimmer_nvfp4/recipe.py:44-46isgemma4/recipe.py:118-120copied character-for-character (third copy ofusage();nemotron_h/recipe.py:41-42uses the single-rank form). -
ignition/recipes/muse_glimmer_nvfp4/frontend.py:25-29calls Muse Spark'sprepare_frontendonly to obtain its EOS list, which parses the tokenizer and re-runs Spark's<|start|>/<|message|>/<|eom|>ID assertions, then parses again via_prepare_frontend. Extracting Spark's EOS augmentation inmuse_spark/frontend.py:31-42as its own helper would avoid the double parse. -
ignition/recipes/muse_glimmer_nvfp4/bootstrap.py:75defaultsstream_overlap=Trueand:188buildsScratchArena(overlap=config.stream_overlap), but the recipe does not declarestream_overlap, does not forwardplan.stream_overlap, and so no--no-stream-overlapflag exists while the plan reportsFalse(ignition/planning.py:503). Identical shape tomuse_spark/bootstrap.py:66; still a plan/behaviour mismatch. -
ignition/recipes/muse_glimmer_nvfp4/attention.py:36keepsmax_verify_width=8from Spark although this recipe's widths reach 16 (bootstrap.py:52MAX_WIDTH = 16, anddecoder.py:38passesconfig.draft.block_size); the default is misleading rather than wrong. -
ignition/preparation/checkpoint.py:396-404widens the shared index check to accepttotal_sizeas either the tensor payload sum or the shard-file sum, for every recipe, on the strength of one exporter. Documented and deliberate, but it removes a cross-check previously applied uniformly; a warning or a note indocs/model-preparation.mdwould keep the two meanings distinguishable.
Positive conventions worth recording: ignition/preparation/quantization.py:12-43 is the charter-preferred consolidation (shared parser, gemma4/config.py:524 now calls it, matches_pattern reused at :555,558); helios/src/frontend/images/conditioned.rs:183-241 replaces the wildcard arms with exhaustive per-profile matches plus the covered array at :389-408, which is exactly the anti-drift pattern the reviewer wants for new profiles; patch_merge.rs:70-111 extracts bracketed_prompt instead of copying; muse_spark/frontend.py:45 parameterizes runtime_assets(patch=...) rather than duplicating it; docs/TODO.txt and docs/model-preparation.md entries follow the required form, and the localized subdirectory tests/recipes/muse_glimmer_nvfp4/ matches the muse_spark/nemotron_h precedent.
Not verified by test: whether declaring method="dflash2" changes any captured graph (it should not — speculative_proposal_source in Helios only accepts mtp|copy), and whether a new ImageLayoutKind value would require re-exporting existing Muse Glimmer cores (it would not, since none exist yet, but the padded-grid core reader test in conditioned.rs:842-856 should be extended).
#2 [high] Should fix: packing dispatch on image_preparation violates AGENTS.md enum rule
PR #229, file: helios/src/frontend/images/packing.rs (PR head eebbf1d).
prepare() at :98-112 matches:
ImageLayoutKind::Bracketed
if config.contract.frontend.image_preparation == Some(ImagePreparationKind::MuseGlimmer) => muse_glimmer(...)
ImageLayoutKind::Bracketed => bracketed(...)
Every other arm dispatches on image_layout alone (Qwen|Glm, Mimo, Deepseek|RowMajor, Moonvit|Radio, Step, ClassToken).
Rule: AGENTS.md "Architecture and ownership" bullet 3 — "Tool/reasoning parsers and image preparation/layout implementations use independent typed enum identifiers; those identifiers cannot select scheduling, cache policy, text-graph input packing, or completion behavior." docs/design-review.md principle 3 repeats it.
Also tensor_layout at :69-70 adds (ImageLayoutKind::Bracketed, "vision_cu_window_seqlens") and (..., "vision_reverse_index"), so one layout id now names two different staged-tensor sets, while :30 (Bracketed, "vision_pixel_values") is shared.
Fix: give Muse Glimmer its own additive ImageLayoutKind value (contract.rs enum is additive-safe; ImagePreparationKind::MuseGlimmer = 11 already done at helios/src/model/contract.rs:68) and dispatch on layout only, as PatchMerge/ClassToken do. Existing cores unaffected (no Muse Glimmer cores exist).
#3 [high] Should fix: Muse Glimmer DFlash2 recipe leaves Speculation.method unset
PR #229, ignition/recipes/muse_glimmer_nvfp4/recipe.py:72:
speculation=Speculation(draft_tokens=15, token_capacity=128, packed_verification=True, graph_budget=64) — no method=.
The recipe ships z-lab DFlash2 through the shared DFlash2Preparation (ignition/recipes/muse_glimmer_nvfp4/dflash.py:14-37), exactly the case that ignition/recipes/qwen38_dense/recipe.py:68 declares as method="dflash2".
Consequences of the omitted field, all checked in code:
ignition/planning.py:450-453—--speculative-method dflash2is rejected becauserecipe.speculative_methodsis empty and the default is None.ignition/planning.py:474-475—--draft-body-quantizationrequiresmethod == "dflash2", so the shared mxfp8 draft-body path is unreachable.ignition/planning.py:574— mixed prefill disabled formethod == "dflash2".helios/src/runtime_core/protobuf.rs:22-30—effective_draft_body_quantization()returns None unlessspeculation.method == "dflash2"in rebuild metadata.ignition/cli/display.py:45— plan output labels the drafter "MTP module" (the PR description calls this cosmetic).ignition/cli/serve.py:314— "DFlash2 proposals" tag omitted.
muse_spark/recipe.py:58 has the same omission (pre-existing). Fix: declare method="dflash2" here, or add a docs/TODO.txt entry explaining why both Muse recipes leave it unset.