Skip to content

A catalogue row says what a model needs of the machine that runs it - #45

Merged
jithinAB merged 3 commits into
masterfrom
catalog/model-size-requires
Nov 17, 2026
Merged

jithinAB merged 3 commits into
masterfrom
catalog/model-size-requires

Conversation

@jithinAB

Copy link
Copy Markdown
Contributor

A catalogue row says what a model needs of the machine that runs it

A runtime choosing among models served on its own machine could not tell whether the machine could hold one. A row said where a model was served and what it cost, but never how big it was or how much memory it took. So a local row the machine could not load was bound, and it failed on its first call.

  • size: is a figure: the model's parameter count (7.6B, 405B, 500M, 8000000000) with its provenance, or unknown.
  • requires: {memory, accelerator}: memory: is a figure for how much memory loading and running the model as served takes (4.7 GB, 9 GiB). accelerator: gpu says the model runs only on an accelerator, so memory: is the accelerator's memory. Leaving it out means none.
  • A runtime that knows its machine leaves out a model served only on that machine when the machine cannot hold it, with a sentence such as "needs 9 GB of memory, and this machine has 8 GB" or "runs only on an accelerator, and this machine has none". A row with no figure, a machine figure the runtime does not know, and a row some runtime serves elsewhere are never left out. The Python reference reads the machine's memory when it scores (pact_adapters.machine.this_machine, through os.sysconf). It does not know an accelerator, so it decides nothing about one. ModelEntry.fits_machine and satisfies(needs, machine) take a Machine for a runtime that knows more.
  • The checker refuses a figure no runtime could read, at the line where it is written: loader/a-parameter-count-that-does-not-read and loader/a-memory-figure-that-does-not-read. A bare 8 could be bytes or gigabytes.
  • spec/hardware-fit.yaml holds the readings (counts, amounts, refusals) and the decisions (machine × row → kept or left out, with the sentence). The Rust checker reads its value sections and the Python resolver reads all of it, so both ports read a figure the same way.
  • The shipped rows record no size: or requires: yet, because each figure needs a source somebody else can follow. A runtime that measures them writes them on its own copy of the row.

Proof

  • Rust: every_size_and_memory_in_the_shared_table_reads_as_it_says, a_figure_that_does_not_read_is_refused_where_it_is_written, every_figure_the_distribution_ships_reads (crates/pact-loader/src/hardware.rs).
  • Python: test_a_local_model_must_fit_the_machine.py (readings and refusals from the shared table, the decision table, satisfies leaving out a local row the machine cannot hold, this_machine reports memory and no accelerator).
  • tests/golden/schema-fields.txt re-blessed; docs/97-PRIMITIVES.md table, site-docs/reference/kinds.md (71 kinds) and counts synced (scripts/sync-counts.sh: 1725 Rust + 3650 adapter after the master merge).
  • After the master merge: cargo test --workspace passes (1725, counted by sync-counts.sh); the adapter suite has 3619 passed and 30 skipped. One local failure, test_deepeval_comes_with_what_its_benchmarks_import (from A benchmark named in any script, a figure recorded under an alias, and DeepEval's ARC challenge set #42), happened only because the local venv lacks the deepeval extra's datasets. CI installs that extra.

Purpose checklist (BMH PACT v97 §0.2)

  1. P1 Declared: what a model needs of a machine is written on its catalogue row, not in a runtime's configuration.
  2. P2 No hidden divergence: both ports read figures from one shared table, and the Rust checker refuses what the Python resolver cannot read.
  3. P3 Honest gaps: the reference says it does not know an accelerator and decides nothing on it; shipped rows carry no unsourced figures.
  4. P4 Host choices recorded: the machine's memory is what the runtime read when scoring; the left-out sentence names both figures.
  5. P5 Model-visible ⟺ logged: not applicable.
  6. P6 Cross-runtime evidence: spec/hardware-fit.yaml cases run in Rust and Python.
  7. P7 Versioned and checked: new fields in spec/schema.yaml with checker codes.
  8. P8 Reusable: one row serves every runtime; each judges it against its own machine.
  9. P9 Platform rules: not applicable (upstream).
  10. P10 Justified: portability. An agent authored on a large machine resolves on a small one without binding a model the small machine cannot load (BMH MOD-2 hardware fit reads this through its host-facts seam after the next re-pin).
  11. P11 Lane hygiene: one change, on master.

🤖 Generated with Claude Code

jithinAB and others added 3 commits November 17, 2026 06:02
size: (a parameter count) and requires: {memory, accelerator} on a model row. A
runtime that knows its machine leaves out a model served on that machine alone
that the machine cannot hold, with a sentence; a row with no figure, a machine
figure the runtime does not know, and a row served elsewhere are never left
out for it. The checker refuses a size or memory figure that does not read.
spec/hardware-fit.yaml holds the readings and decisions for both ports.

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

# Conflicts:
#	CHANGELOG.md
#	site-docs/index.md
@jithinAB
jithinAB marked this pull request as ready for review November 17, 2026 04:51
@jithinAB
jithinAB merged commit fb6eef6 into master Nov 17, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant