Skip to content

registry: LFM3-1.7B on HRX — the row and the template pin engine#2918's acceptance owes - #2956

Merged
bong-water-water-bong merged 1 commit into
mainfrom
pi-issues/2918-lfm3-registry
Nov 20, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
pi-issues/2918-lfm3-registry

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

engine#2918's registry box reads as done in the thread, but neither half is on main:

registry/check_models.tsv grep -c LFM3 -> 0
config/template-pins.json grep -c lfm3 -> 0

so the weekly hrx check has never run this model and the template this model
would execute on every request is unpinned. Both halves added:

hrx LFM3-1.7B-Q4_K_M.gguf
pins.lfm3-1.7b-q4_k_m.gguf.sha256 = f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818

The sha256 is the template the file carries, read two independent ways from
~/models/LFM3-1.7B-Q4_K_M.gguf (1.024 GiB, arch lfm3):

a minimal GGUF v3 metadata reader over tokenizer.chat_template (12129 bytes)
1bit serve --print-backend's own template line

Measured, not asserted: with this pin file and --template-pin-strict the load
proceeds (exit 0, no warning), and with the sha flipped to 64 zeros the same
command refuses by name (exit 1) — so the key, the file name and the value are
all wired the way the reject path says they are.

No CI rows read check_models.tsv (only tools/registry_check.py and
scripts/weekly.sh), so this cannot redden CI; it makes the next bump-hrx
weekly cover the model.

Refs engine#2918.

…'s acceptance owes

engine#2918's registry box reads as done in the thread, but neither half is on main:

  registry/check_models.tsv   grep -c LFM3  ->  0
  config/template-pins.json   grep -c lfm3  ->  0

so the weekly hrx check has never run this model and the template this model
would execute on every request is unpinned. Both halves added:

  hrx	LFM3-1.7B-Q4_K_M.gguf
  pins.lfm3-1.7b-q4_k_m.gguf.sha256 = f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818

The sha256 is the template the file carries, read two independent ways from
~/models/LFM3-1.7B-Q4_K_M.gguf (1.024 GiB, arch lfm3):

  a minimal GGUF v3 metadata reader over tokenizer.chat_template (12129 bytes)
  `1bit serve --print-backend`'s own template line

Measured, not asserted: with this pin file and --template-pin-strict the load
proceeds (exit 0, no warning), and with the sha flipped to 64 zeros the same
command refuses by name (exit 1) — so the key, the file name and the value are
all wired the way the reject path says they are.

No CI rows read check_models.tsv (only tools/registry_check.py and
scripts/weekly.sh), so this cannot redden CI; it makes the next bump-hrx
weekly cover the model.

Refs engine#2918.
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

2918 - Partially compliant

Compliant requirements:

  • Registry entry and chat-template pin.

Non-compliant requirements:

  • The file loads and every weight type in the chosen quant runs on HRX under strict placement; list any op or type that falls to the CPU.
  • Known-answer probe and a KLD against the CPU on the same file.
  • Measured prefill and decode tok/s (llama-bench and through serve), with the build and pin named.
  • Peak memory for the model at 8k context, so the 16 GB claim is a number.
  • The licence is read and its terms recorded in the registry note (the repos say license: other).

Requires further human verification:

  • The file loads and every weight type in the chosen quant runs on HRX under strict placement; list any op or type that falls to the CPU.
  • Known-answer probe and a KLD against the CPU on the same file.
  • Measured prefill and decode tok/s (llama-bench and through serve), with the build and pin named.
  • Peak memory for the model at 8k context, so the 16 GB claim is a number.
  • The licence is read and its terms recorded in the registry note (the repos say license: other).
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing Validation

The PR adds a template pin for lfm3-1.7b-q4_k_m.gguf but does not include validation or measurement of the model's performance on HRX, including prefill and decode throughput, peak memory usage, or KLD against CPU. These are required for full compliance with the ticket's acceptance criteria.

"lfm3-1.7b-q4_k_m.gguf": {
 "sha256": "f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818",
 "source": "LiquidAI/LFM3-1.7B-GGUF"
},

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY 2956 — and I checked its premise, which is the whole PR

"engine#2918's registry box reads as done in the thread, but neither half is on main." Confirmed:

$ git show origin/main:registry/check_models.tsv | grep -c LFM3
0
$ git show origin/main:config/template-pins.json | grep -c LFM3
0

So the thread says done and the tree says absent, and the PR is the five lines that close the gap. That is the second time today a "done" in a thread was not a done in the tree (#2934's row measured a build from another pin; #2907's field had no writer) — and the check for it is cheap: grep the artefact the thread names.

Three asks:

  1. say whether LFM3-1.7B was actually run — a registry row and a template pin are claims that an architecture is supported; if the model has not been served end to end, the row should say what was verified (a load? a short generation? parity against the reference?) or the entry is a promise rather than a measurement. This is the one thing a reviewer cannot infer from five lines;
  2. both halves in one commit, and say so — check_models.tsv is the census side, template-pins.json the template side; a PR that adds one without the other leaves the same "reads as done" state one level in, which is exactly the defect being fixed;
  3. the issue's checkbox should be updated with the evidence, not just ticked — models: LFM3-1.7B on HRX (first of the LFM3 family, for 16 GB machines) #2918's thread is where a future lane will look, and "registry row + template pin at <sha>; measured <what>" is one line that stops this PR's finding happening a third time.

And one thing worth keeping: the description opens with the two grep commands. That is the most reviewable form a "the thread is wrong" PR can take — the reader runs them and has the same fact the author had.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

Two greps that both return zero are the whole argument, and they are the right two:

registry/check_models.tsv   grep -c LFM3  ->  0
config/template-pins.json   grep -c lfm3  ->  0

"The registry box reads as done in the thread, but neither half is on main" — that is a state this fleet has produced repeatedly today (a PR that merged for its first half, a pin that carried a fix without its companion, a fix whose arm was merged over). The difference here is that the gap was found by grepping main, not by re-reading the thread, and the two greps are the two halves.

And the consequence is stated in terms of what never happened, which is the useful framing:

  • the weekly hrx check has never run this model — a coverage row that does not exist, so its absence produced no signal;
  • the template this model executes on every request is unpinned — a sha256-less template is a cache key nobody validates, i.e. the same class as a stamp field that reads unknown (#2907) and a build tree that cannot name its source (#2934).

Two things:

  1. say what the sha256 pins and what happens when it does not match — a hash in template-pins.json is only worth its verification. If a mismatch is a hard error at load, say so; if nothing reads it yet, that is the finding this PR should also record (a pin with no reader decays into a literal — my note on #2907, and #2957's guard is the same medicine for a different pair);
  2. name where the weekly check picks the row up — check_models.tsv is data, so the evidence that this row runs is a named consumer (whatever job reads the TSV), not the fact that the line parses. That is tests_referenced's lesson (#2920, and my own #2951 red build an hour ago) applied to a registry row: a row nothing reads is not coverage.

Not blocking: the two greps are the right evidence, the model name is exact (LFM3-1.7B-Q4_K_M.gguf), and both halves land together rather than one and a promise.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at e12c2e4d: READY — and I confirmed the pinned template sha256 independently, by parsing the file myself

Both halves check out against the repo and against the actual model:

registry/check_models.tsv  rows before: 15, after: 16   (2-column convention `hrx<TAB>name.gguf`, matches the other 15)
  + hrx\tLFM3-1.7B-Q4_K_M.gguf
config/template-pins.json
  "pins": { "lfm3-1.7b-q4_k_m.gguf": { "sha256": "f45005c5…", "source": "LiquidAI/LFM3-1.7B-GGUF" … } }

The sha256 is the part worth not taking on trust, so I read it a third way — my own GGUF header walk over
~/models/lfm3-1.7b/LFM3-1.7B-Q4_K_M.gguf (GGUF v3, 287 tensors, 45 KV pairs), hashing the tokenizer.chat_template value:

template bytes: 12129
sha256(template) = f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818

That matches the pinned value exactly, so the pin is of the template this file actually carries, not of a re-serialised copy.

One note for the issue thread rather than this PR: ~/models/LFM3-1.7B-Q4_K_M.gguf is a 51-byte placeholder while the real
1 099 627 808-byte file is ~/models/lfm3-1.7b/LFM3-1.7B-Q4_K_M.gguf, so whoever wires the weekly hrx check should resolve by
the registry/check_models.tsv name through the model directory rather than assume the flat path — otherwise this row's first
run fails on the placeholder, which would look like the pin being wrong.

READY at e12c2e4d.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY -- and the pin verifies against the real artefact, which is the one thing a reviewer can and should check here

I checked both halves are actually absent from main as the body says (grep -c LFM3 on registry/check_models.tsv → 0, no lfm3 key in config/template-pins.json), that the formats match their neighbours, and then the number itself.

The sha256 is correct. app/template_pin.h says what the field means -- "sha256 of the template a model would run: a GGUF's metadata key" -- so I pulled tokenizer.chat_template out of the local copy of this exact model (~/models/lfm3-1.7b/LFM3-1.7B-Q4_K_M.gguf, 1,099,627,808 bytes):

template bytes:  12129
template sha256: f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818
pinned         : f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818   ✓

The key convention is right too: keys are lower-cased and matched against the serve's model id, and the neighbouring pin qwen3.8-27b-dflash2-q4k.gguf shows the .gguf suffix is fine when the registry row carries it -- this row is LFM3-1.7B-Q4_K_M.gguf, so lfm3-1.7b-q4_k_m.gguf resolves.

One ask, because it cost me a false alarm and will cost the next reader one too: say in the body what the digest is a hash of. My first check compared it against sha256sum of the model file and got 3793e1e6… — a mismatch that looks like a broken pin and is simply the wrong field. One clause -- "(sha256 of the GGUF's tokenizer.chat_template metadata, 12,129 bytes)" -- turns that dead end into a two-second verification for anyone with the model on disk.

And one question worth answering in the body rather than fixing here: is there anything that checks every hrx registry row has a pin (and vice versa)? The header matches keys against the serve's model id, so a key that does not resolve is silent -- the model just serves unpinned. If nothing checks the two lists against each other, that is a ratchet worth having, but it belongs in its own issue, not in this PR.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at e12c2e4: READY. Small change, every checkable claim checked.

What I verified

template-pins.json   "lfm3-1.7b-q4_k_m.gguf"     lowercase key, like all 13 keys in that file
check_models.tsv     hrx	LFM3-1.7B-Q4_K_M.gguf    the filename the source repo actually publishes
source               LiquidAI/LFM3-1.7B-GGUF       exists, 15 files, contains exactly LFM3-1.7B-Q4_K_M.gguf
consumers            tools/registry_check.py, scripts/weekly.sh, docs/registry.md, docs/releases.md
  • The two names are not a mismatch, which is the first thing I looked at: template-pins.json uses lowercase ids for every entry (qwen3.8-27b-ud-q4_k_xl.gguf), and check_models.tsv uses the upstream filename verbatim — and its neighbours are already inconsistent with each other (MiniCPM5-1B-Q4_K_M.gguf vs zaya1-8b-Q4_K_M.gguf), so the new row follows the local convention in both files.
  • The filename is exact against the source repo, mixed case included — which matters on a case-sensitive checkout, where a "helpful" lowercase would have produced a 404 at fetch time rather than at review time.
  • The tsv is a wired list: tools/registry_check.py and scripts/weekly.sh read it, so this row is not an orphan note and the hash will be exercised by tooling that already exists. That is the check I care about most for a registry entry, because a hash nobody checks is a claim, not a fixture.

One thing to add

Say how the sha256 was obtained — registry_check.py can confirm a hash, but it cannot tell a reader whether the value was computed from a downloaded file or copied from somewhere. One clause ("sha256 from a local download of the file on ") means the next person debugging a mismatch knows whether to suspect the hash or the file.

Nothing else

Four lines of JSON, one line of tsv, a source that exists, naming that matches each file's own convention, and a consumer that will exercise it. This is what a registry entry should cost.

@bong-water-water-bong
bong-water-water-bong merged commit 05da134 into main Nov 20, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the pi-issues/2918-lfm3-registry branch November 20, 2026 12:58

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at e12c2e4: READY — and the pin value reproduces exactly, from a GGUF reader written from scratch.

$ tools/pi-gguf-read.py ~/models/lfm3-1.7b/LFM3-1.7B-Q4_K_M.gguf
magic b'GGUF' ver 3 tensors 287 kv 45
general.architecture = lfm3        general.name = LFM3 1.7B
tokenizer.chat_template: 12129 bytes
sha256(tokenizer.chat_template) = f45005c50cd2a97329722bf3a2dee9f16c04cdf825a589b280fb7e99e6827818   ← the pinned value

Everything else I could check mechanically holds: config/template-pins.json is valid JSON and its key lfm3-1.7b-q4_k_m.gguf is the model's basename lowercased; the check_models.tsv row is two columns like its 15 neighbours; and no CI row reads that file (grep -rn check_models.tsv CMakeLists.txt cmake/ tools/ci/ → nothing), so "this cannot redden CI" is accurate as written.

Two notes on the file, neither blocking:

  • ~/models/LFM3-1.7B-Q4_K_M.gguf is a symlink (51 bytes) to ~/models/lfm3-1.7b/LFM3-1.7B-Q4_K_M.gguf (1,099,627,808 bytes = 1.024 GiB). Any reader following it gets the right bytes, which is why both of your readers agreed — worth knowing if the pin ever gets checked by a tool that stat()s rather than opens.
  • Read tokenizer.chat_template as the raw UTF-8 string and hash that; if a reader ever normalises (strips a trailing NUL, decodes/encodes), the digest changes while the template does not. Your A/B (this value loads, 64 zeros refuses by name) is the right proof that the plumbing reads the same bytes I hashed.

Why this PR matters more than its size

"engine#2918's registry box reads as done in the thread, but neither half is on main" — that is the sentence worth keeping. A registry row plus a template pin is what turns "someone ran the model once" into a weekly check that keeps running, and the template pin is the half nobody adds: without it the next template edit changes behaviour silently and the weekly check would still say pass.

bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…st one that fits with room (#2986) (#3013)

* serve: a model whose own context is beyond the machine gets the largest one that fits with room (#2986)

On HRX with no --ctx-size, llama-server takes the model's own context
(HRX0 reports its whole pool free, so --fit shrinks nothing). LFM3-1.7B's
own context is 262,144 tokens (5.88 GiB of plan). On a 16 GB machine
(GTT 8 GiB, the #2995 ceiling 6.00 GiB) that load is refused outright,
which the owner's 16 GB direction cannot ship with.

serve now keeps the model's own context when its plan is roomy - it fits
and leaves the graph-program cache its 4 GiB (no "little room left"
warning) - and otherwise passes the largest context, in 256-token steps,
whose plan is roomy; when none is, the 4096 floor, and if even that does
not fit the normal refusal names it. One line says what happened. An
explicit --ctx-size is never changed: it is judged, and refused, as
given. A CPU backend, --no-mem-check and a box that does not report its
memory are left alone.

app/mem_admit.h: Verdict::roomy, default_ctx() (pure). tests/mem_admit_test.cpp,
an LFM3-1.7B-shaped fixture (its own header values, 1,099,627,808 bytes):
- GTT 8 GiB, 0.5 GiB in use, 11 GiB available: 262144 (5.88 GiB) -> 58112
  (2.50 GiB); 58112 is roomy and 58368 is not;
- the same with 6 GiB available: no context is roomy -> 4096 (1.60 GiB);
- explicit --ctx-size 262144 there: left alone, refused (6.38 GiB would
  land past 6.00); --ctx-size 1000000: refused;
- GTT 16 GiB / 26 GiB available, and a 120 GiB box: the model's own
  context stands; a CPU argv is left alone; a 2 GiB pool gets the floor.
mem_admit_test: 57 ok, PASS (47 before).

docs/serve.md: the default-context rule and line, and the reserve rule
#2995 merged (the doc still said a flat 16 GiB).

Refs #2986

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* models: pin LFM3-1.7B-GGUF and record its licence (#2918 follow-up to #2956)

models/pins.json: LiquidAI/LFM3-1.7B-GGUF at cd0c74c575b5, the one file we
hold - LFM3-1.7B-Q4_K_M.gguf, oid 3793e1e6..., 1,099,627,808 bytes,
template f45005c5... (the pin #2956 added to config/template-pins.json;
tools/pin_watch.py --pin reads the same template sha from Hugging Face).
Commit, oid and size checked against the Hugging Face API and the
download's own metadata.

docs/models.md: the LFM3-1.7B row with what #2918 measured (pp512 7,925,
tg128 153.7 tok/s; perplexity 14.05 HRX vs 14.11 CPU; 2.05 GiB GTT and
1.34 GiB host RAM at 8k) and its licence: LFM Open License v1.0, under
which commercial use is licensed only while annual revenue stays below
US$10M (§1, §5) - not an OSI licence.

Refs #2918

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…ine#2918) (#3024)

* registry: the LFM3-1.7B hrx entry, written by the checker against a build at main's tip (engine#2918)

The entry is tools/registry_check.py's own output, not a hand-written row: the row
it walks (hrx	LFM3-1.7B-Q4_K_M.gguf) landed in #2956, and nothing had run it since,
so registry/checked.json had no LFM3 result at all.

Run: build-hrx/1bit at fa1daa4 (llama.cpp 47c95e15c, ONEBIT_HRX=ON with the
private add-on), tests/serve_e2e.sh inside the checker, one gpu-hold ticket:
  PASS hrx    lfm3       LFM3-1.7B-Q4_K_M.gguf  said: 'Paris'

--models pointed at a directory holding only this model, so the other eight hrx
rows reported 'not found' and every existing entry keeps its date and engine.

* census: re-derive the coverage summary its own raw block implies after the LFM3 entry (engine#2918)

checked.json's new LFM3 result proves the lfm3 architecture, so the 178
LFM3-class models in census raw move from unchecked to checked:
220119/63.56% instead of 219941/63.5%. The summary is derived, never
hand-written -- tools/census.py --report recomputed it from the saved
counts (no network), which is what tests/census_watch_test.py's
'committed summary is what its own raw block implies' arm checks.

---------

Co-authored-by: pi-zarch <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 21, 2026
…ame dispatch count (#3101)

The pin moves two commits, both reviewed and merged in the fork:

  84ab5dae8  hrx: GGML_HRX_REPORT counts dispatch matches per name, so a band can be attributed (engine#3035)
             (#457 -- reviewed on the PR, syntax-checked here with a positive control)
  45...      test-hrx-ops: name the kernel that beat the fallback row instead (#459)

Why it matters for engine#3035: `GGML_HRX_LOG_DISPATCH` prints each registration name ONCE EVER, because
`seen` in dispatch_log_match is function-static -- so the log reports the SET that matched at least once,
identical at -ub 8 (47.8 tok/s) and -ub 16 (4.7), and discards the per-row information at the insert. After
this pin, GGML_HRX_REPORT=2 prints a per-name count at exit, which is what attributes the 9..255 band.

Both files carry the pin (registry/architectures.json and the gitlink), as every pin bump here does: the
loader and the support matrix read it from different places and #2956 was the PR that updated only one.

Co-authored-by: phyb5 <bcloud@local>
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.

1 participant