Repository navigation
census: review HrmTextForCausalLM as not an alias, report-only (#402) - #418
Merged
Merged
Conversation
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
PR Reviewer Guide 🔍(Review updated until commit 88cf2c8)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 88cf2c8 |
This was referenced Nov 17, 2026
Closed
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]>
This was referenced Nov 20, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The daily watcher's archived run 38248085357 flagged one new class:
Verified
HrmTextForCausalLM/hrm_textis Sapient's HRM-Text hierarchical-reasoning LM:H_cycles/L_cyclesrun a stack ofnum_layers_per_stacklayers several times per token,L_bp_cyclesfeeds the low stack back through the high one, on a prefix-LM schedule. Basesapientinc/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 flaggedzyr-AGENT/ZY-S1is a 16-layer finetune of it. No supported family computes that recurrence; mapping it to a plain decoder stack would be silent substitution.third_party/llama.cppat the pin0e255d77(and the fork's patched tipad18320a) has zerohrmhits insrc/llama-arch.cpp,gguf-py/gguf/constants.py,convert_hf_to_gguf.py, and noconversion/hrm_text.py.tools/registry_build.py --checkconfirmsregistry/architectures.jsonstill matches the pinned sources.hrm_texttag has 60 models from 34 uploaders;sapientinc/HRM-Text-1Bhas 14,437 downloads / 834 likes;danish-foundation-models/DFM-Mimir{,-v1.5}are in the family; the 2026-10-11 census counts 41HrmTextForCausalLMmodels. Upstream transformers (src/transformers/models/hrm_text/) and upstreamggml-org/llama.cppmaster (LLM_ARCH_HRM_TEXT,conversion/hrm_text.py) already implement it — our pin is what is behind.Change
registry/significant.json:HrmTextForCausalLMwith"watch": "report"— same mechanism asGrugMoeForCausalLM(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 (removewatch, recordmapped_okwhen the llama.cpp pin gainshrm_text).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-gapswill force the record at that point.Proof
census_watch.classify+report): beforeexit=1with!! UNCOVERED HrmTextForCausalLM (new class); afterexit=0with. REVIEWED HrmTextForCausalLM. Raw:team/evidence/402-replay-before-after.log.python3 tools/census_watch.py --limit 120on this branch: exit 0,OK — no uncovered class in the newest models, noUNCOVEREDline (raw:team/evidence/402-census-watch-live-after.log).tests/census_watch_test.pyall checks passed;tests/registry_gaps_test.pyPASS;registry_build.py --check-gaps/--check-pins/--checkclean.Fixes #402.