hearth
Deterministic model residency. Keep declared models warm, and tell the truth about which ones are.
Not an inference engine. llama.cpp and vLLM have spent years on kernels, samplers and tokenizers, and none of that is the problem. The problem is that no serving stack will promise a model stays loaded, and none of them can say why one stopped being.
The night this came from
A PIN operator on one rented RTX A6000 stopped answering. Requests hung, then failed. Four pull requests landed against the streaming path in a single evening and none of them were the cause — because the cause was never visible. Three completely different failures were arriving as the same timeout:
- the runtime evicted a model to free VRAM,
- the host detached the GPU and gave it to another tenant,
- a 32B model was simply still loading.
One of those is a capacity problem you own. One is your provider's and no configuration will touch it. One is not a problem at all. A timeout cannot tell you which, so all three got "fixed" repeatedly and none of them went away.
Worse, the operator was being scored down for a card their host reclaimed. A reputation system fed that kind of data slowly deletes its own honest operators.
What it does
$ hearth status
42.0 / 44.2 GiB held (5 declared, 2 admitted)
muse-local:latest resident for 14203s
deepseek-r1:32b loading for 47s
gemma4:26b not admitted — short by 14.8 GiB
qwen3.6:27b not admitted — short by 15.8 GiB
gemma4-extract:31b not admitted — short by 17.8 GiB
Three things, none of which you can get today:
1. Residency is a named state with a named reason.
Unknown never probed
Loading weights materializing — with elapsed, so it can say how long
Resident loaded AND answering AND accounted for
Lost with a reason: Evicted · GpuDetached · ProcessExited · Unhealthy
Failed won't load, and what the runtime said
Stopped unloaded on purpose
Evicted and GpuDetached are the two states nothing else reports, and they were the two that mattered. They are distinguished by one bit — whether the GPU was still present when the probe failed — and that bit is the entire diagnosis.
2. The card's size is arithmetic, checked before anything loads.
Declare four 20 GiB models on a 48 GiB card and no runtime errors. It loads, evicts, loads, evicts, forever, and presents as "the models got slow." hearth refuses the fifth model at declare time and tells you it was short by 17.8 GiB. Nothing is ever evicted to make room for a load — if it doesn't fit, the honest answer is that it doesn't fit.
3. Routers get an answer they can act on.
| answer | what a router should do |
|---|---|
Ready |
send it |
Warming{for_ms} |
wait, or try elsewhere — but do not fault this node |
Lost{GpuDetached} |
try elsewhere, and do not score this operator down |
Lost{Evicted} |
try elsewhere; this box is over-committed |
NotAdmitted{short} |
stop asking — it will never fit here |
Unknown |
we genuinely don't know yet, and we say so |
Design rules
Nothing fails on a clock. A 32B materializing over a network fabric can legitimately spend minutes before its first token, and killing it at an arbitrary deadline turns a slow success into a fast failure. Loading reports how long it has been loading; deciding what to do about that belongs to whoever knows if a human is waiting. Progress is reported — patience is a policy, not a constant.
Loading is not Ready. The most common way a serving stack lies is routing to something still coming up and calling the inevitable timeout an error.
Declaration order is priority order. First fit, never best fit. Reordering to squeeze in one more model would silently demote whatever the operator listed first, and on a serving box first means most important. A planner that outsmarts the operator surprises them at 3am.
The reserve is never planned into. Weights aren't the whole cost — KV cache grows with context and parallelism, the CUDA context is hundreds of megabytes, and fragmentation is real on a card that's been up for weeks.
Status
hearth-core — state machine, VRAM planner, fleet routing. 33 tests, all pure logic, no GPU required to run them.
Next: supervisor over llama-server children · NVML probe · HTTP surface (OpenAI-compatible + /residency) · CLI · napi + PyO3 bindings · NEDB event log.
That last one is the interesting one. Every state transition becomes an event in NEDB, which is bi-temporal — so "what was resident as of 03:14?" is a real query against a real causal chain. When a model goes cold at 3am you get the answer instead of a theory.
Integration
hearth speaks OpenAI-compatible, so pin-clientd works with it today: set apiMode: "openai" and point inferenceUri at hearth. /residency then adds the truth that the OpenAI shape has no way to express.
Build
cargo test # 33 tests, no GPU needed
cargo run --example a6000
© Interchained LLC · BUSL-1.1 (converts to Apache-2.0 on 2030-08-27)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hearth_engine-0.1.2.tar.gz.
File metadata
- Download URL: hearth_engine-0.1.2.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42294e3721abc889b4d928b3eb836022a01d7676f1a3cb167215d7b0b1f2c2c7
|
|
| MD5 |
0d2f3d93b068c3f0ba38b129624f927a
|
|
| BLAKE2b-256 |
9d04d3f42454988494018aea81ec27ead9dc6e6244a1eb0f0dfac7761a045d1a
|
File details
Details for the file hearth_engine-0.1.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: hearth_engine-0.1.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 208.3 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7223f745b485edd990de8f1216e140318c50c7091292b25698ccdf35f253afc
|
|
| MD5 |
012ae6b78747fc6764b0a464f922bfed
|
|
| BLAKE2b-256 |
ed1b1faa528dffec8b1a50fc04a4660e19533ab288ebdb30a261a7f36a86a9f0
|
File details
Details for the file hearth_engine-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hearth_engine-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 349.3 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b79d953a542b9a56f6d2b4c2e3631b669192804ab596cb56c0a5faedbe3aed4
|
|
| MD5 |
359b7043bbb5fce0fc5dfdc262d35b2c
|
|
| BLAKE2b-256 |
363a659f1327a09aa079018c2908844c9ab3aaef3f30cdae7c731682a9bcb728
|
File details
Details for the file hearth_engine-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: hearth_engine-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 337.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07123042581c56ce32b717b68a384dd471e042829ec65e355d2fe7d9c54e364d
|
|
| MD5 |
1c73a439e43d088669d40ca9dfac8a5f
|
|
| BLAKE2b-256 |
44a70a60ec395bce2db5ebb28b41a17782ff0d541b46f59ce182d562a665edd0
|
File details
Details for the file hearth_engine-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: hearth_engine-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 299.7 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada6e3ea8555c6fc6183ccb7302f9913885b1c17bcbe923c6c956cecf43d4f61
|
|
| MD5 |
8793ecbd82a484b703d12613c09c430d
|
|
| BLAKE2b-256 |
dce5314d3b163cc9aee00c00c2d97f3c79ba5b4f1d20367c8a01a7945091c6e9
|
File details
Details for the file hearth_engine-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: hearth_engine-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 307.7 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
maturin/1.15.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06ac9ec7f1cdc4de1a0b7bba8951ad176d925cc93d9126b24430f78152265181
|
|
| MD5 |
1cc2cc74efb0b509638a53e9d6e9fb65
|
|
| BLAKE2b-256 |
d31cfd7780bacdd96b640448573f035d0c3cb0311b2e0203c0621cc411d376a4
|