Skip to content

census: review HrmTextForCausalLM as not an alias, report-only (#402) - #418

Merged
bong-water-water-bong merged 2 commits into
mainfrom
fix/402-census-hrm-text
Oct 16, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
fix/402-census-hrm-text

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The daily watcher's archived run 38248085357 flagged one new class:

!! UNCOVERED HrmTextForCausalLM (new class): 1 model(s), e.g. zyr-AGENT/ZY-S1

Verified

  • Not an alias. HrmTextForCausalLM / hrm_text is Sapient's HRM-Text hierarchical-reasoning LM: H_cycles / L_cycles run a stack of num_layers_per_stack layers several times per token, L_bp_cycles feeds the low stack back through the high one, on a prefix-LM schedule. Base sapientinc/HRM-Text-1B: 128 layers, hidden 1536, num_layers_per_stack 16, H_cycles 2, L_cycles 3, L_bp_cycles [0,3], prefix_lm true. The flagged zyr-AGENT/ZY-S1 is a 16-layer finetune of it. No supported family computes that recurrence; mapping it to a plain decoder stack would be silent substitution.
  • No pinned backend accepts it. third_party/llama.cpp at the pin 0e255d77 (and the fork's patched tip ad18320a) has zero hrm hits in src/llama-arch.cpp, gguf-py/gguf/constants.py, convert_hf_to_gguf.py, and no conversion/hrm_text.py. tools/registry_build.py --check confirms registry/architectures.json still matches the pinned sources.
  • The issue's "one-off" premise is wrong. The HF hrm_text tag has 60 models from 34 uploaders; sapientinc/HRM-Text-1B has 14,437 downloads / 834 likes; danish-foundation-models/DFM-Mimir{,-v1.5} are in the family; the 2026-10-11 census counts 41 HrmTextForCausalLM models. Upstream transformers (src/transformers/models/hrm_text/) and upstream ggml-org/llama.cpp master (LLM_ARCH_HRM_TEXT, conversion/hrm_text.py) already implement it — our pin is what is behind.

Change

  • registry/significant.json: HrmTextForCausalLM with "watch": "report" — same mechanism as GrugMoeForCausalLM (census: review GrugMoeForCausalLM as not an alias, report-only #392).
  • docs/arch-gaps.md: the review, the pinned-fork check, the uploader/usage spread, and the exit condition (remove watch, record mapped_ok when the llama.cpp pin gains hrm_text).
  • No generated artifact touched by hand.

Because upstream implements the class and only our pin does not, watch: "report" is used here to clear an alert nothing can act on yet, not because the class is unimportant. The real fix is the llama.cpp pin bump; --check-gaps will force the record at that point.

Proof

  • Replay of the archived run's batch before/after (census_watch.classify + report): before exit=1 with !! UNCOVERED HrmTextForCausalLM (new class); after exit=0 with . REVIEWED HrmTextForCausalLM. Raw: team/evidence/402-replay-before-after.log.
  • Live python3 tools/census_watch.py --limit 120 on this branch: exit 0, OK — no uncovered class in the newest models, no UNCOVERED line (raw: team/evidence/402-census-watch-live-after.log).
  • tests/census_watch_test.py all checks passed; tests/registry_gaps_test.py PASS; registry_build.py --check-gaps/--check-pins/--check clean.

Fixes #402.

HrmTextForCausalLM (model_type hrm_text) is Sapient's HRM-Text
hierarchical-reasoning LM: H_cycles/L_cycles run a stack of
num_layers_per_stack layers several times per token and L_bp_cycles
feeds the low stack back through the high one, on a prefix-LM
(prefix_lm, embedding_scale) schedule. Upstream transformers ships it
(src/transformers/models/hrm_text/) and upstream llama.cpp master has
LLM_ARCH_HRM_TEXT plus conversion/hrm_text.py, but our pinned fork
(0e255d77, and its patched tip ad18320a) has neither, so no pinned
backend accepts hrm_text and tools/registry_build.py finds no mapping.

Record it in registry/significant.json and docs/arch-gaps.md. The
entry carries "watch": "report", so the census watcher lists new
uploads of it as ". REVIEWED" and does not alert while no pinned
backend can serve the class; remove that field and record "mapped_ok"
when the llama.cpp pin reaches upstream's hrm_text support
(--check-gaps fails until a person does).

The issue called this a one-off (0 downloads, one uploader, created
2026-10-12). It is not: the HF hrm_text tag has 60 models from 34
uploaders, base sapientinc/HRM-Text-1B has 14,437 downloads / 834
likes, and the 2026-10-11 census snapshot counts 41
HrmTextForCausalLM models. The class still cannot be mapped here, so
report-only stands, but the pin bump is the real fix.

Fixes #402
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 88cf2c8)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

392 - Partially compliant

Compliant requirements:

  • Added GrugMoeForCausalLM entry with "watch": "report" in registry/significant.json
  • Updated tools/census_watch.py to print . REVIEWED and not alert for classes with "watch": "report"
  • Updated docs/arch-gaps.md with review details for GrugMoeForCausalLM
  • Updated docs/registry.md with exception for the new field
  • Added tests in tests/census_watch_test.py to verify behavior

Non-compliant requirements:

  • None

Requires further human verification:

  • None

402 - Partially compliant

Compliant requirements:

  • Added HrmTextForCausalLM entry with "watch": "report" in registry/significant.json
  • Updated docs/arch-gaps.md with review details for HrmTextForCausalLM
  • Updated tools/census_watch.py to print . REVIEWED and not alert for classes with "watch": "report"
  • Added tests in tests/census_watch_test.py to verify behavior

Non-compliant requirements:

  • None

Requires further human verification:

  • None
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing Documentation for New Class

The new entry for HrmTextForCausalLM in registry/significant.json lacks a detailed explanation of why it is not an alias, which is present in the documentation. While the documentation in docs/arch-gaps.md provides a good explanation, the JSON file itself should ideally include a brief note or reference to the documentation for clarity.

"HrmTextForCausalLM": {
 "model_type": "hrm_text",
 "family": "HRM-Text hierarchical-reasoning LM (Sapient)",
 "watch": "report"
}

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 88cf2c8

@bong-water-water-bong
bong-water-water-bong merged commit 32818f8 into main Oct 16, 2026
7 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the fix/402-census-hrm-text branch October 16, 2026 01:56
bong-water-water-bong pushed a commit that referenced this pull request Nov 20, 2026
…torage guard

engine#2870 reports 13 rows that expect ggml_flash_attention_decode_split_f32_f16_wmma_next_q8 and
get the general kernel. The invariant behind that symptom is a JOIN of two files, and each side has
a different failure:

  fixture pads nothing      the expectation can never be satisfied: the matcher refuses the split
                            unless key->ne[1] >= ceil_div(kv, 64) * 64, so a 65-token case handing
                            it 65 slots is declined for storage it does not have
  matcher lost the guard    the matcher may CLAIM a walk past the binding, which is the fault #418
                            removed (page fault + MODE2 reset, three times in 80 minutes)

A check that looked at one side would pass in both states, which is why this one reads both.

The real fixture pads CONDITIONALLY, through the named constant, and pads only when the expected
kernel is the split one:

    const int64_t key_value_capacity =
        expected_kernel == kDecodeSplitKernelName
            ? ((key_value_token_count + kDecodeKvTileSize - 1) / kDecodeKvTileSize) * kDecodeKvTileSize
            : key_value_token_count;

My first version matched only a literal `+ 63) / 64) * 64` on one line, so it failed on the very
tree it was written to pass -- the expression is wrapped and uses the constant. The check now
normalises whitespace and accepts both spellings.

Measured:
  shipped fork tree                  rc 0
  six self-test arms                 ok  (padded+guard passes; unpadded names the fixture; guard-less names
                                          the matcher; no expectation is vacuous; missing test file is rc 2;
                                          an expectation with no readable matcher is rc 2, not a pass)

What this does NOT claim: that it reproduces #2870's 13 rows on a historical tree. I tried -- the pin
before #418 carries ZERO split expectations, so that state is not reproducible from a pin, and the
bite is proven on the self-test arms rather than on a past checkout.
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…torage guard (engine#2870) (#2900)

* ci: an FA decode-split expectation needs the padded fixture AND the storage guard

engine#2870 reports 13 rows that expect ggml_flash_attention_decode_split_f32_f16_wmma_next_q8 and
get the general kernel. The invariant behind that symptom is a JOIN of two files, and each side has
a different failure:

  fixture pads nothing      the expectation can never be satisfied: the matcher refuses the split
                            unless key->ne[1] >= ceil_div(kv, 64) * 64, so a 65-token case handing
                            it 65 slots is declined for storage it does not have
  matcher lost the guard    the matcher may CLAIM a walk past the binding, which is the fault #418
                            removed (page fault + MODE2 reset, three times in 80 minutes)

A check that looked at one side would pass in both states, which is why this one reads both.

The real fixture pads CONDITIONALLY, through the named constant, and pads only when the expected
kernel is the split one:

    const int64_t key_value_capacity =
        expected_kernel == kDecodeSplitKernelName
            ? ((key_value_token_count + kDecodeKvTileSize - 1) / kDecodeKvTileSize) * kDecodeKvTileSize
            : key_value_token_count;

My first version matched only a literal `+ 63) / 64) * 64` on one line, so it failed on the very
tree it was written to pass -- the expression is wrapped and uses the constant. The check now
normalises whitespace and accepts both spellings.

Measured:
  shipped fork tree                  rc 0
  six self-test arms                 ok  (padded+guard passes; unpadded names the fixture; guard-less names
                                          the matcher; no expectation is vacuous; missing test file is rc 2;
                                          an expectation with no readable matcher is rc 2, not a pass)

What this does NOT claim: that it reproduces #2870's 13 rows on a historical tree. I tried -- the pin
before #418 carries ZERO split expectations, so that state is not reproducible from a pin, and the
bite is proven on the self-test arms rather than on a past checkout.

* ci: re-name the FA split-expectation check after the rebase dropped its row

The rebase onto main rewrote the FA commit and the fa_split_expectation_check
add_test went with it, so tests_referenced fails again: a tools/**/*.py with a
--self-test that no runner names. Re-added beside serve_routes_check.

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: pi-os3 <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…ine#2925) (#2927)

#2900 added the tool and a row that runs `--self-test`, which proves the tool's fixtures. The invariant the tool was
written for -- every decode-split expectation has the padded fixture AND the matcher compares storage against the padded
capacity -- was therefore evaluated nowhere on main, and that is the state engine#2870/#418 exist to prevent.

Two lines, in the same place the self-test row sits:

    add_test(NAME fa_split_expectation COMMAND … fa_split_expectation_check.py --check
             --root ${CMAKE_SOURCE_DIR}/third_party/llama.cpp)

`--root` is the FORK, not the engine tree: both paths the tool joins are fork-relative
(`tests/hrx-ops-test.cpp`, `ggml/src/ggml-hrx/dispatch_registration/common/dispatch-flash-attention.cpp`), and at the
engine root it answers `cannot tell: no …/tests/hrx-ops-test.cpp`. CI checks the fork out (ci.yml:110), so the row runs
there; a lane without the submodule gets that `cannot tell` as a red row, the same stance submodule_pin_check takes --
which is why no skip code is registered here.

Verified both directions, because a row that cannot fail is the defect this issue is about:

  $ python3 tools/ci/fa_split_expectation_check.py --check --root third_party/llama.cpp
  fa-split-expectation: every decode-split expectation has the padded fixture and the storage guard      rc 0

  # same command against a copy of the fork with the two guard comparisons in dispatch-flash-attention.cpp replaced:
  matcher: the test expects the split kernel and the matcher no longer compares storage against the padded capacity,
           so it may claim a walk past the binding (the fault #418 removed)                              rc 1

So the row fails on exactly the regression it exists for, and the message names it.

Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong pushed a commit that referenced this pull request Nov 20, 2026
…engine#2925)

-- every decode-split expectation has the padded fixture AND the matcher compares storage against the padded capacity --
was evaluated nowhere on main. This adds the `--check` row, rooted at the FORK (whose tests/ and dispatch file the tool
joins), which ci.yml:110 initialises, so the row is live in CI rather than skipping.

While wiring it I found the guard check was weaker than its own message: `any(g in dispatch_text for g in GUARD)` passes a
matcher that keeps the value comparison and drops the key one, i.e. half of the fault #418 removed. Measured on a copy of
the fork's dispatch file mid-flight: neutralising the combined `if (key->ne[1] < … || value->ne[1] < …)` line is a failure
under either rule, but deleting only the key half passed the `any()` version. It is now `all(...)`, its fixture emits both
comparisons, and a new self-test arm pins the half-invariant case ("kept the key guard and dropped the value one is a
FAILURE") -- the arm the old rule could not express.

Verified: `--check --root <fork pin tree>` rc 0 (the tree as it stands), `--self-test` ok (7 arms), and the mutation above
turns the new row red with "the matcher no longer compares storage against the padded capacity".
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…engine#2925) (#2929)

-- every decode-split expectation has the padded fixture AND the matcher compares storage against the padded capacity --
was evaluated nowhere on main. This adds the `--check` row, rooted at the FORK (whose tests/ and dispatch file the tool
joins), which ci.yml:110 initialises, so the row is live in CI rather than skipping.

While wiring it I found the guard check was weaker than its own message: `any(g in dispatch_text for g in GUARD)` passes a
matcher that keeps the value comparison and drops the key one, i.e. half of the fault #418 removed. Measured on a copy of
the fork's dispatch file mid-flight: neutralising the combined `if (key->ne[1] < … || value->ne[1] < …)` line is a failure
under either rule, but deleting only the key half passed the `any()` version. It is now `all(...)`, its fixture emits both
comparisons, and a new self-test arm pins the half-invariant case ("kept the key guard and dropped the value one is a
FAILURE") -- the arm the old rule could not express.

Verified: `--check --root <fork pin tree>` rc 0 (the tree as it stands), `--self-test` ok (7 arms), and the mutation above
turns the new row red with "the matcher no longer compares storage against the padded capacity".

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

census: new HF model class uncovered by the registry

1 participant