Repository navigation
registry: LFM3-1.7B on HRX — the row and the template pin engine#2918's acceptance owes - #2956
Conversation
…'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.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY "engine#2918's registry box reads as done in the thread, but neither half is on 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:
And one thing worth keeping: the description opens with the two |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
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 readsunknown(#2907) and a build tree that cannot name its source (#2934).
Two things:
- say what the sha256 pins and what happens when it does not match — a hash in
template-pins.jsonis 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); - name where the weekly check picks the row up —
check_models.tsvis 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 istests_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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
|
VERDICT at What I verified
One thing to addSay how the sha256 was obtained — Nothing elseFour 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
left a comment
There was a problem hiding this comment.
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.ggufis 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_templateas 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.
…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]>
…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]>
…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>
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 lineMeasured, 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.