Conventions report · NVIDIA/hyperflare-inference #229

Raw Markdown for agents: https://autobot.eidonix.com/p/c0db3d28-f06b-4656-aa78-0aabe7bf394d.md

Key findings

PR #229 adds the Muse Glimmer 30B NVFP4 recipe plus shared-mechanism changes. Through the conventions-and-duplication lens the PR is mostly well behaved: it consolidates the ModelOpt parser into ignition/preparation/quantization.py, replaces wildcard arms with exhaustive per-profile matches plus a covered array, and carries its own docs/TODO.txt entries for the duplication it knowingly leaves behind. Three things should change and eight smaller departures are worth noting.

One finding is blocking because the repository treats it as a non-negotiable invariant rather than a style preference: prepare() in the Helios packing module selects text-graph input packing using the image-preparation identifier, which AGENTS.md forbids by name and with an explicit "reject even when tests pass" instruction in docs/design-review.md.

Blocking

1. Text-graph input packing is selected by the image-preparation enum

helios/src/frontend/images/packing.rs:98-105:

match config.contract.frontend.image_layout.ok_or("image layout is not prepared")? {
    ImageLayoutKind::Bracketed
        if config.contract.frontend.image_preparation == Some(ImagePreparationKind::MuseGlimmer) =>
    {
        muse_glimmer(config, handle, images, image, destination_feature_offset)
    }
    ImageLayoutKind::Bracketed => bracketed(config, handle, images, image, destination_feature_offset),
    ...
}

What is wrong. Every other arm dispatches on image_layout alone. This one adds a second condition on image_preparation, so the preparation identifier — not the layout identifier — decides which staged tensor set and upload path a Bracketed core gets.

Why it matters. The rule is stated explicitly and names this exact behavior:

The PR is otherwise careful to keep the core format additive, so the fix is cheap and the author has already done the harder half.

Second symptom, same root cause. tensor_layout at packing.rs:69-70 now adds

(ImageLayoutKind::Bracketed, "vision_cu_window_seqlens") => (Int32, patches / 64 + 2),
(ImageLayoutKind::Bracketed, "vision_reverse_index") => (Int64, patches),

while :30 (ImageLayoutKind::Bracketed, "vision_pixel_values") is shared. One layout id now names two different staged-tensor sets, which is precisely the drift the enum exists to prevent.

Fix. Give Muse Glimmer its own additive ImageLayoutKind value (the contract enum is additive-safe, and ImagePreparationKind::MuseGlimmer = 11 was already added this way at helios/src/model/contract.rs:68) and dispatch on layout only, as PatchMerge and ClassToken already do. No Muse Glimmer cores exist yet, so no re-export is needed.

Should fix

2. The recipe ships a DFlash2 drafter but never declares method="dflash2"

ignition/recipes/muse_glimmer_nvfp4/recipe.py:72:

speculation=Speculation(draft_tokens=15, token_capacity=128, packed_verification=True, graph_budget=64),

The recipe downloads z-lab/Muse-Glimmer-30B-DFlash2 and runs it through the shared DFlash2Preparation (ignition/recipes/muse_glimmer_nvfp4/dflash.py:14-37) — exactly the configuration the established precedent declares as method="dflash2" at ignition/recipes/qwen38_dense/recipe.py:68 (not opened). The field is load-bearing, not documentary:

muse_spark/recipe.py:58 has the same omission, so this is a copied defect rather than a new one — which is the reason to fix it here instead of replicating it. Fix: declare method="dflash2", or add a docs/TODO.txt entry (per AGENTS.md:500-503) explaining why both Muse recipes leave it unset.

3. draft_config.py re-derives the shared DFlash2 reader

ignition/recipes/muse_glimmer_nvfp4/draft_config.py:16-77 reproduces DFlash2Config field for field: the same required arithmetic dict, the same options block, the same layers/target_layers/block_size/noise_token/attention properties (draft_config.py:52-72 vs ignition/components/dflash2_geometry.py:76-96 — textually identical, including the DraftAttentionGeometry construction), and the same validate_shard (:74-77 vs :98-101). The shared reader additionally performs checks this copy drops: positive-integer geometry (dflash2_geometry.py:51-54), GQA divisibility and per-layer sliding attention (:55-57), rotary/norm-epsilon validation (:58-61), tap ordering and mask-token range (:65-70).

The precedent for a pinned drafter is ignition/recipes/qwen38_dense/draft_config.py:1-25 — 25 lines that delegate through DFlash2Config.from_dict(..., expected=PROFILE).

Why it matters. AGENTS.md:376-379 says mechanisms that can be shared "should not be copied between recipes." The PR records the attention fold-back in docs/TODO.txt:514-520 but not this one, contrary to AGENTS.md:500-503. The PR description does disclose it ("folding it onto the shared reader is a follow-up"), so the gap is the missing durable TODO entry rather than concealment. Fix: delegate to the shared reader with a PROFILE dict, or add the matching TODO entry.

4. A one-off run artifact is committed to the tree

qualify/results/glimmer-c16/summary.json (new, 76 lines) records a single 16-stream smoke test: wall seconds, completion tokens, and derived counters (admitted_delta, rounds_batch16_width16, accepted_per_request_round, rounds_by_batch_width16). None of these field names appear anywhere else in the repository that I could find, and the schema does not resemble qualify/speculative_benchmark.py's measurement output, so no in-repo harness produces or consumes it. It also describes a core built from the originating fork, which this branch cannot generate.

Why it matters. AGENTS.md:53-55: "Record unresolved defects, unrun checks, and pending measurements in docs/TODO.txt, not in design documents. Do not add defect reports, investigation logs, run journals, or progress notes to the repository." A single-run result file is a run journal. The numbers already appear in the PR description, where they belong. Fix: drop the file, or land it as the documented output of a harness with its configuration alongside.

Confidence note: I verified the file's contents and that no other recipe carries such a summary; I did not exhaustively prove that no results/ tree exists elsewhere on main. If one does, the finding narrows to "schema is one-off and unreproducible from this branch."

Nits

  1. ignition/recipes/muse_glimmer_nvfp4/attention.py:61-63 copies muse_spark/attention.py:57-59 verbatim, and model.py:9-40 duplicates Spark's module structure. Both are recorded in the new docs/TODO.txt:514-520, so the convention is met — noting only so the duplication is not lost.

  2. ignition/recipes/muse_glimmer_nvfp4/decoder.py:69-70 is a third tanh(x·mult/softcap)·softcap, after gemma4/decoder.py:21-23 (not opened) and muse_spark/decoder.py:195-202 (SoftcappedProjection), with a fourth inline copy in ignition/components/dflash2.py (not opened). One shared helper would cover all four.

  3. ignition/recipes/muse_spark/config.py:18-31 AttentionGeometry and ignition/components/dflash2_geometry.py:11-24 DraftAttentionGeometry are field-for-field identical, local(shard) included. Muse Glimmer imports the former (config.py:14) and uses the latter for its drafter (draft_config.py:10). Pre-existing, extended here.

  4. ignition/recipes/muse_glimmer_nvfp4/recipe.py:44-46 is gemma4/recipe.py:118-120 character for character — the third copy of usage(). (nemotron_h/recipe.py:41-42 uses the shorter single-rank form.)

  5. ignition/recipes/muse_glimmer_nvfp4/frontend.py:25-29 calls Muse Spark's prepare_frontend only to obtain its EOS list, which parses the tokenizer and re-runs Spark's <|start|>/<|message|>/<|eom|> ID assertions, then parses again through _prepare_frontend. Extracting Spark's EOS augmentation (muse_spark/frontend.py:31-42) as its own helper would avoid the double parse.

  6. ignition/recipes/muse_glimmer_nvfp4/bootstrap.py:75 defaults stream_overlap=True and :188 builds ScratchArena(overlap=config.stream_overlap), but the recipe neither declares stream_overlap nor forwards plan.stream_overlap, so no --no-stream-overlap flag exists while the plan reports False (ignition/planning.py:503). Same shape as muse_spark/bootstrap.py:66; still a plan/behaviour mismatch.

  7. ignition/recipes/muse_glimmer_nvfp4/attention.py:36 keeps max_verify_width=8 from Spark although this recipe reaches width 16 (bootstrap.py:52 MAX_WIDTH = 16; decoder.py:38 passes config.draft.block_size). Misleading rather than wrong.

  8. ignition/preparation/checkpoint.py:396-404 widens the shared index check so total_size may be either the tensor payload sum or the shard-file sum, for every recipe, on the strength of one exporter. Deliberate and documented, but it removes a cross-check previously applied uniformly; a warning, or a note in docs/model-preparation.md distinguishing the two meanings, would keep them separable.

What the PR gets right, for the record

These are the conventions a new recipe is judged against, and the PR follows them:

Open questions and what I could not settle

Authorship and conduct

No attempt to direct the reviewer appeared in the PR text or the files I read; the description reads as an evidence report and its disclosed limitations (unrun CUDA tests, fork-only measurements, the total_size widening) are accurate as far as I could check them.