Skip to content

registry: the licence a model file carries, starting with LFM3-1.7B (engine#2918) - #3031

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

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

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

engine#2918's acceptance list ends with "the licence is read and its terms recorded in the registry note". The reading
happened and it lives in a GitHub comment: LFM Open License v1.0, §5 granting commercial rights only below US$10M annual
revenue, §4 requiring the notices to travel. Nothing in the repository said so:

$ grep -rn "LFM Open License\|lfm1.0" registry/ docs/     -> (nothing)

which matters beyond bookkeeping, because LFM3-1.7B is the model chosen for the 16 GB / small-machine tier: a reader
planning to ship it cannot see the revenue ceiling from the registry at all.

A new file rather than a column, on what the existing files already are:

  • registry/check_models.tsv is the RUN list (backend, model, extra serve args) and registry_check.py parses column
    three as args, so a fourth column would be read as a serve flag;
  • registry/significant.json is for architecture classes that are NOT mapped, which is the opposite of this;
  • registry/architectures.json maps classes to backends and carries no terms;
  • no registry/.json carries a licence field today, and no tool globs registry/.json (each is opened by name), so a
    new file is inert to every existing reader and is where a reader would look for it.

Keyed by upstream repository with the files it covers, because two quantisations of one model share the terms, and
with the date the text was read, because a licence can change. The 'about' key is the same convention significant.json
uses in place of a JSON comment.

Refs engine#2918.

…engine#2918)

engine#2918's acceptance list ends with "the licence is read and its terms recorded in the registry note". The reading
happened and it lives in a GitHub comment: LFM Open License v1.0, §5 granting commercial rights only below US$10M annual
revenue, §4 requiring the notices to travel. Nothing in the repository said so:

    $ grep -rn "LFM Open License\|lfm1.0" registry/ docs/     -> (nothing)

which matters beyond bookkeeping, because LFM3-1.7B is the model chosen for the 16 GB / small-machine tier: a reader
planning to ship it cannot see the revenue ceiling from the registry at all.

A new file rather than a column, on what the existing files already are:
- registry/check_models.tsv is the RUN list (backend, model, extra serve args) and registry_check.py parses column
  three as args, so a fourth column would be read as a serve flag;
- registry/significant.json is for architecture classes that are NOT mapped, which is the opposite of this;
- registry/architectures.json maps classes to backends and carries no terms;
- no registry/*.json carries a licence field today, and no tool globs registry/*.json (each is opened by name), so a
  new file is inert to every existing reader and is where a reader would look for it.

Keyed by upstream repository with the files it covers, because two quantisations of one model share the terms, and
with the date the text was read, because a licence can change. The 'about' key is the same convention significant.json
uses in place of a JSON comment.

Refs engine#2918.

@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 on the content -- and it needs one reader, or it rots the first time a model is added

The entry is the best kind of licence record I have seen in this repo:

  • the source and the date (read_from: … LICENSE, read 2026-11-20) with the reason stated -- "a licence can change, and a reader needs to know which text the note describes";
  • the operative clauses by number (§1, §5, §5(c), §4) rather than a summary adjective: "conditional: granted only while annual revenue stays below US$10,000,000" is a fact a user can act on, and "Non-profits keep non-commercial and research rights (§5(c))" is the part people get wrong;
  • the notice obligation separated from the permission (§4: pass on the licence, retain all notices), and the honest summary "This is not a permissive OSI licence";
  • keys by upstream repo with the covered files listed, because -- as the about says -- two quantisations of one model share the terms.

The gap: grep -rln licences.json finds no consumer. Nothing validates it, nothing cross-checks it against the registry, and nothing fails when a model is added without an entry -- so the file is correct today and will be silently incomplete in a week. That is the exact shape this round has fixed twice already (the counters check, the census ratchet): a hand-kept table whose value is that it can be checked.

Smallest useful reader, ~15 lines, same discipline as census_counters_check: for every model named in registry/check_models.tsv under the hrx backend, assert an entry exists in licences.json that lists it -- and report (not fail) an entry whose models names a file no row carries. Two of those three directions are warnings; the missing-entry direction is the one worth failing, because a model served without its terms recorded is the thing the file exists to prevent. Wire it as a census.yml step or a pre-pr-checks row, and a malformed entry gets caught by a JSON schema check at the same time.

One content note: "issue": "engine#2918" is good provenance for why the entry exists; if the file grows, that field is what lets someone find the conversation that decided a term, so I would make it required in the reader rather than optional.

@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

This adds a field nobody asked for in the CI sense and everybody needs in the shipping sense, and the grep is the argument:

$ grep -rn "LFM Open License\|lfm1.0" registry/ docs/     -> (nothing)

A licence that lives in a GitHub comment is a licence that will not be read. The registry names the model, the checker proves it answers, and the one fact that constrains whether a product can ship on it — §5 grants commercial rights only below a revenue threshold, §4 requires the notices to travel — was not in the repository at all. For a fleet whose owner direction is "LFM3 on 16 GB machines", that is the difference between a model being evaluated and a model being shipped.

"A new file rather than a column, on what the existing files already are" is the right call and the reasoning is the kind I want to see stated: check_models.tsv is a list of things to run, checked.json is a record of runs, and a licence is neither — it is a property of the artifact that survives every run. Putting it in either of the other two would have been a schema that says "this model passed" about a legal term.

Two things:

  1. quote the clause numbers and the threshold, not only the citation — "§5 granting commercial rights only bel[ow a revenue threshold]" is the shape, but the number is what an engineer can act on. If the threshold is public, name it; if quoting it is itself restricted, say "the threshold is in §5; it is not reproduced here" so a reader knows they have to go and read it rather than assuming there isn't one;
  2. say whether registry_check.py or any gate reads the new file — a licence record that nothing reads is a comment with a filename (the unknown-that-nothing-can-set problem from #2907/#2911). If a model with a non-commercial licence enters the registry the weekly should say so; if the file is documentation-only for now, say that too, because the difference decides whether it decays.

The pattern this belongs to, worth one line in the body: the registry has grown three kinds of fact tonight — what to run (check_models.tsv), what happened (checked.json), and now what is permitted (this). Naming the third category is what stops the next such fact (a hardware requirement, a context limit, a redistribution restriction) from being bolted onto one of the first two.

Not blocking: a real shipping constraint that was only in a comment, a grep that proves it, and a file placed by what the other files are rather than by convenience.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 566f2af: READY on the record. It is the best provenance artefact of the day and it has no consumer, which is the one thing to fix.

What the record captures, and why it is better than a licence string

"licence":    "LFM Open License v1.0 (license_name: lfm1.0)"
"commercial": "conditional: granted only while annual revenue stays below US$10,000,000 (Threshold, §1 and §5); at or ab…"
"notice":     "§4: pass on the licence, retain all notices, and include any NOTICE file. This is not a permissive OSI licence"
"models":     ["LFM3-1.7B-Q4_K_M.gguf"]
"read_from":  "https://huggingface.co/LiquidAI/LFM3-1.7B-GGUF LICENSE, read 2026-11-20"
"issue":      "engine#2918"
  • The obligation, not the name. commercial: conditional with the revenue threshold and the section numbers is the fact someone actually needs before shipping; the SPDX-ish name alone would have said "a licence exists".
  • "This is not a permissive OSI licence" is the sentence I would want in any such record. A open_source: true checkbox would have been technically defensible and completely misleading.
  • read_from carries the date. Provenance without a date is folklore — the same rule as a measurement without its command, and the reason this entry can be re-checked in six months.
  • models scopes it to the files rather than to a repository, which is right when a repo can hold several.

The gap: nothing reads it

registry_check.py    8 "licence" mentions — all of them the Apache header
census_counters_check.py   same, all header

registry/licences.json is a new file with no consumer anywhere in tools/. In a structure this good that is a waste, and the day has a receipt for what happens next: a record with no reader rots exactly like the prose count in #2980 — accurate when written, silently wrong later, with nothing to say so.

One consumer, and it is cheap because registry_check.py already walks the registry:

  • report every model whose commercial is not an unconditional yes, with the licence name and the read_from link, in the same run that checks hashes;
  • and fail when a model file has no licence record at all — the useful direction, since the entry that is missing is the one nobody thought about.

That turns the file from documentation into a check, and it makes the next model's licence part of shipping rather than part of someone's memory.

Nothing else

Obligation, notice, scope, source with a date, and an issue reference — and one honest sentence that a checkbox would have hidden. Add the reader and this becomes the file a release review actually consults.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 566f2af: READY — I fetched the licence the note describes and every term in it checks out, including the section numbers. One note on discoverability.

Verified against LiquidAI/LFM3-1.7B-GGUF's own LICENSE (70 lines, read here)

the note says the licence says
LFM Open License v1.0 (license_name: lfm1.0) the HF model card carries license: other, license_name: lfm1.0 — the note's bracket is the machine-readable field, which is the useful thing to record
conditional, granted only below US$10,000,000 annual revenue, §1 and §5 §1: "'Threshold' shall mean annual revenue of 10 million United States dollars ($10,000,000) or more"; §5(a) conditions the grant on not exceeding it
at or above it, Commercial Use is not licensed under this agreement §5(b), verbatim: "is not licensed under this Agreement"
non-profits keep non-commercial and research rights (§5(c)) §5(c): "The Threshold shall not apply to a Qualified Non-Profit Organization's use … for Non-Commercial or Research Purposes", with Qualified Non-Profit defined in §1 as 501(c)(3)-equivalent
§4: pass on the licence, retain all notices, include any NOTICE file §4(a) give recipients a copy of this License; §4(c) retain copyright/patent/trademark/attribution notices; §4(d) include a readable copy of a NOTICE file if the Work ships one
not a permissive OSI licence correct, and §7 (no trademark rights) plus the §5 ceiling are the two clauses a user must actually know

So the record is not a paraphrase that happens to be close — the section numbers point at the clauses that say it, which is what makes it checkable by whoever reads it next. Recording read 2026-11-20 beside the URL is the right instinct too: a licence can change, and this one is a threshold grant rather than a static text.

The one note: nothing reads this file

git grep licences.json finds no reader (it is a new file, and no tool, doc or CMake row references it), so this is documentation-in-data — legitimate, and the registry directory already holds several such files — but it is only discoverable by someone who already knows to look in registry/. Two cheap ways to make it findable, either is fine: a line in docs/hrx.md/docs/npu.md beside the model notes ("terms: registry/licences.json"), or a row in the CI-checks page's index if a checker is ever written. notice_covers_deps is the closest existing reader-shaped thing and it deliberately covers software notices, not model weights, so I would not stretch it.

Also worth one line in the file itself: the models array names LFM3-1.7B-Q4_K_M.gguf, and the note's about says "one entry per upstream repo, because two quantisations of one model share the terms" — good; if the NPU pack (LFM3-1.7B-NPU2, now in registry/check_models.tsv by #3016) is derived from the same weights, say whether it is covered by the same entry. A reader shipping the NPU route will ask exactly that.

Not covered: I am not a lawyer and this is a reading of the text, not a legal opinion; I verified the file against the upstream LICENSE as fetched today, which is what the note claims to record.

@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 566f2af: READY

The JSON parses, and the terms it records are the terms the upstream licence actually says — I fetched the licence rather than trusting the summary:

huggingface.co/LiquidAI/LFM3-1.7B-GGUF/raw/main/LICENSE
  "Threshold" shall mean annual revenue of 10 million United States dollars ($10,000,000) or more.
  (a) …Commercial Use are conditioned upon You or Your Legal Entity not exceeding the Threshold.
  (b) Any Commercial Use … by a Legal Entity that exceeds the Threshold is not licensed under this Agreement.
  (c) The Threshold shall not apply to a Qualified Non-Profit Organization's use … for Non-Commercial or Research Purposes.

which is what registry/licences.json says, clause for clause: conditional: … annual revenue stays below US$10,000,000 (Threshold, §1 and §5), the §5(c) carve-out for non-profits, and §4: pass on the licence, retain all notices, and include any NOTICE file. The file is well-shaped as a registry entry too — keyed by upstream repo (so two quantisations share one entry), with the models it covers, the URL it was read_from and the date, and the issue it closes.

One correction to the description, and it is the same class of staleness that hit #3029's body tonight: "Nothing in the repository said so" is no longer true.

$ git -C ~/engine grep -l "LFM Open License\|lfm1.0" origin/main -- registry/ docs/
origin/main:docs/models.md

#3013's merged row in docs/models.md already ends with "Licence: LFM Open License v1.0 - commercial use is licensed only while annual revenue stays below US$10M (its §1 and §5), so it is not an OSI licence". The grep in the body was made before that merged, so the file is still the right place for the machine-readable record and this PR is still worth landing — only the sentence "nothing in the repository said so" should be narrowed to "the prose said so in docs/models.md; nothing machine-readable did".

That distinction matters for the reader you are writing for: a lane planning a 16 GB-tier build will read a docs/ sentence and miss it, and a tool will never see it at all. A registry/licences.json entry is the difference between a note a human must find and a constraint something can check.

@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:

  • The licence is read and its terms recorded in the registry note (the repos say license: other).

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.
  • Registry entry and chat-template pin.

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.
  • Registry entry and chat-template pin.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Licence Information Not Fully Verified

The PR introduces a new file registry/licences.json to record the licence terms for the LFM3-1.7B model. However, the acceptance criteria for the ticket require verification that the model loads correctly on HRX, runs all weight types under strict placement, and that performance metrics are measured. These verifications are not present in the PR and must be confirmed separately.

{
 "about": "The terms a MODEL WEIGHT FILE is licensed under, recorded per upstream repository, for models whose terms constrain what a user of this engine may do. Not this repository's licence (that is LICENSE, Apache-2.0) and not a software dependency's (those are NOTICE/pyproject). One entry per upstream repo, with the files it covers, because two quantisations of one model share the terms. Read from the upstream LICENSE file, with the date it was read: a licence can change, and a reader needs to know which text the note describes.",
 "licences": {
  "LiquidAI/LFM3-1.7B-GGUF": {
   "licence": "LFM Open License v1.0 (license_name: lfm1.0)",
   "commercial": "conditional: granted only while annual revenue stays below US$10,000,000 (Threshold, §1 and §5); at or above it, Commercial Use is not licensed under this agreement. Non-profits keep non-commercial and research rights (§5(c)).",
   "notice": "§4: pass on the licence, retain all notices, and include any NOTICE file. This is not a permissive OSI licence.",
   "models": ["LFM3-1.7B-Q4_K_M.gguf"],
   "read_from": "https://huggingface.co/LiquidAI/LFM3-1.7B-GGUF LICENSE, read 2026-11-20",
   "issue": "engine#2918"
  }
 }
}

@bong-water-water-bong
bong-water-water-bong merged commit 2a821b5 into main Nov 20, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the pi-issues/2918-licences branch November 20, 2026 21:08

@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 566f2af: READY

The one thing that has to be true about a licence note is the licence, and it checks out against the source — independently, not just against the URL the entry cites:

$ curl -s https://huggingface.co/api/models/LiquidAI/LFM3-1.7B-GGUF | jq …
license tags:  ['license:other']
cardData:      license=other   license_name=lfm1.0

the entry: "LFM Open License v1.0 (license_name: lfm1.0)"      ✓ same identifier

The rest of the entry is the shape a licence note needs to be useful rather than decorative: what commercial use is conditioned on ("granted only while annual revenue stays below US$10,000,000 (Threshold, §1 and §5); at or above it, Commercial Use is not licensed under this agreement"), the obligation ("§4: pass on the licence, retain all notices, and include any NOTICE file. This is not a permissive OSI licence."), the files it covers (two quantisations share the terms), and when and where the text was read — read 2026-11-20, with the URL. That last field is the one that makes the note maintainable: a licence can change, and the reader needs to know which text the claim describes.

The about paragraph does the thing these files usually fail to do — it says what the file is not: "Not this repository's licence (that is LICENSE, Apache-2.0) and not a software dependency's (those are NOTICE/pyproject)." That sentence prevents the most likely misuse (someone grepping for "licence" and finding the wrong one).

One gap, and it is the day's recurring shape

Nothing reads this file yet:

$ grep -rn 'licences.json' --include=*.py --include=*.sh --include=*.cmake --include=CMakeLists.txt .
(no output)

It is data with no guard: valid JSON today (I checked), unread tomorrow. Two cheap rows would make it a check instead of a note — and the second is the one with teeth:

  1. json.load + assert every entry has licence, models, read_from (a schema row, seconds);
  2. cross-check the other way: every model in config/template-pins.json / registry/check_models.tsv that is not the engine's own must have an entry here, so adding a model without recording its terms fails a row rather than being remembered by whoever added it.

That is the same argument as #2985's counts and #3004's opt-in: the value of a recorded fact is the row that notices when it stops being recorded.

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