Direct answer
TinyRustLM is the concrete runtime anchor for the ModelBreeder browser-local story. It shows how a file-backed site can teach a path toward local model experimentation without a server database: model bytes are loaded into a Rust/WASM runtime, a custom .slm header declares model identity, tensor layouts are validated, adapters bind to model identity, generation runs locally, diagnostics report resource behavior, and eval sidecars record quality evidence.
header · tensors · tokenizer
ADP1 · ASP1 · ALR1
load · validate · apply · generate
tokens · cache · quant · checksum
cases · boundary · pass/fail
lineage · evidence · rollback
Why this matters to ModelBreeder theory
Before this source drop, the site described local-first model ecologies mostly as architecture. The Rust files make the architecture tangible:
| Theory concept | Runtime surface |
|---|---|
| Model package | SLM1 header, tokenizer section, tensor directory, tensor bytes, checksum. |
| Compatibility | parameter count, tensor-layout checksum, tokenizer checksum, flags, tensor count. |
| Descendant | adapter-delta package applied to a loaded parent. |
| Evaluation evidence | local eval case file plus quality-gate sidecar. |
| Resource ledger | diagnostics with token counts, token rate, scratch use, KV cache, quantization mode, and adapter count. |
| Local sovereignty | raw WASM exports for browser execution without remote inference. |
Runtime layers
- Model parser. The
.slmparser validates magic, version, header length, tensor ranges, tensor directory, tokenizer offsets, tensor data offsets, dimensions, dtype, and checksum. - Tensor store. Loaded tensors can use
f32,q8_0, orq4_0storage. Matvec operations use native storage when possible and copy/dequantize only when required. - Tokenizer. The runtime supports a phase-one byte tokenizer and a custom BPE tokenizer with byte fallback.
- Generation state. The runtime keeps model, KV cache, tokenizer, token buffers, diagnostics, sampling config, scratch arena, and logits together.
- Adapter ABI. Adapter packages can be raw dense, sparse, or low-rank delta formats. Each is validated against expected model identity before mutation.
- Evaluation runner. Local cases are exact-match and produce sidecars, giving the site a simple model for evidence-bearing release packets.
- WASM exports. The browser boundary exposes model load, adapter validation, adapter apply, generation, sampling config, result access, diagnostics access, and memory allocation.
Pseudocode: local runtime experiment
PROCEDURE run_local_descendant_experiment(model_bytes, adapter_bytes, eval_cases)
runtime <- INIT_RUNTIME()
model_result <- runtime.LOAD_MODEL(model_bytes)
IF model_result != OK THEN
RETURN REJECT("model package failed parser", model_result)
END IF
adapter_result <- runtime.VALIDATE_ADAPTER_DELTA(adapter_bytes)
IF adapter_result != OK THEN
RETURN REJECT("adapter does not match parent identity", adapter_result)
END IF
runtime.APPLY_ADAPTER_DELTA(adapter_bytes)
evidence <- RUN_EVAL_CASES(runtime, eval_cases)
diagnostics <- READ_DIAGNOSTICS(runtime)
RETURN BUILD_RELEASE_PACKET(
parent_model_digest = HASH(model_bytes),
adapter_digest = HASH(adapter_bytes),
eval_evidence = evidence,
diagnostics = diagnostics
)
END PROCEDUREWhat the runtime does not imply
A local runtime is not automatically a safe or production-ready system. It is an execution substrate. ModelBreeder still requires package identity, frozen eval cases, diagnostics, lineage, scorecards, release packets, and human review for consequential use.
Implementation implication
The next site milestone should add mock .slm package metadata, sample adapter manifests, sample eval-case files, and a generated release packet so readers can see the full loop without downloading real model weights.
Source reports used for this guide
These reports are preserved verbatim in the site archive. The guide above is an editorial synthesis and may narrow, qualify, or reorganize claims from the source material.