# TinyRustLM Runtime Source Manifest

The uploaded Rust runtime files are preserved under `/docs/runtime-source/tinyrustlm/` as durable implementation evidence. They are not public web endpoints; they are included in the root ZIP so future agents can compare theory pages against concrete runtime source.

| File | Bytes | SHA-256 | Role |
|---|---:|---|---|
| `model.rs` | 68445 | `2fa2149c17d301271316eae29d214887597c63a313997c61ca5225f785c2373e` | Loaded model directory, tensor storage, quantized tensor access, adapter validation, and adapter application. |
| `generate.rs` | 49054 | `5880a713465935ca9937044dcc0f82741d08dc3b248f4a5f04f9e5bfc3207db8` | Autoregressive runtime state, local generation, sampling configuration, diagnostics, model load and adapter apply flow. |
| `adapter.rs` | 19168 | `e45628be16c7758c3a60c190ff866732a03bc442556bd35d81bd183d64b26df6` | Adapter-delta package parser and identity checks for ADP1, ASP1, and ALR1 payloads. |
| `tokenizer.rs` | 17504 | `ab51e0eda9f89e1567d5a3610dd97902390f8e8e9b22283137a089659fb13750` | Byte and custom BPE tokenizer support for .slm model tokenizer sections. |
| `eval_runner.rs` | 14645 | `4907408005acfa229c9ba8e2007eb95612fcd07c5f0c3ea17c2ce5b45624ca1a` | Native eval-case runner that writes quality-gate sidecars for local model artifacts. |
| `model_format.rs` | 11788 | `b2041c774bb82009a57904a28ebeb5a08bb713fdafcb30c5f83ccc6b4f8289d5` | Custom SLM1 binary model parser, tensor directory validation, and model header fields. |
| `diagnostics.rs` | 9646 | `e48b2478938e73afc8f486a6a21c360a864434bdc7efad152ae3c7d7033bea0e` | Runtime counters for token rate, memory, quantization, adapters, errors, and assembly checksum. |
| `sampler.rs` | 6972 | `2fdb1bc4ba798258a4adf2034b3ed931083377e4c276e3d1bf5ac46eec26488f` | Greedy, top-k, top-p, temperature, and deterministic seeded sampling helpers. |
| `ops.rs` | 6310 | `47d6fedd08b4dc3059f36c3203c13e0eca8f53f2f18dcdc46b20a4a4e5b1028b` | Core CPU/WASM math operations such as dot products, matvec, RMSNorm, softmax, and SwiGLU. |
| `kv_cache.rs` | 5959 | `0885152e6b189b894da5ce4a2f438b4f1068fab3c96e4709ec8372e0da97edd1` | Layer-major key/value cache for autoregressive attention. |
| `quant.rs` | 5721 | `90e9f3103d39d00a75a1ac52756436d745eb0d24de748affe5c3f462b183a914` | Q8_0 and Q4_0 quantization, dequantization, and matvec helpers. |
| `wasm_exports.rs` | 5227 | `fb382f3a85d8232a9fb58aaf9f3f3612722fb578a2f1d327db58e1baf1753185` | Raw WebAssembly ABI for browser JavaScript without wasm-bindgen. |
| `tensor.rs` | 3942 | `611ed2feea28b9e53d415291f9e1962b4eb6d56657437fb61af16e994b710589` | Borrowed tensor view validation and row-major indexing. |
| `errors.rs` | 2622 | `93b775552f722b3c7dedd5b6ac36f1e95149d1f52afc8ce8674207bae7deba6a` | Stable error-code ABI shared across Rust and browser host. |
| `memory.rs` | 1465 | `078bc01720160fb816d5ecff493f4184417d985accf45ec9c5d0f0bc5874fa59` | WASM memory allocation, deallocation, and raw slice boundary checks. |
| `lib.rs` | 1383 | `7fdfe094576f7cb4c63847e6594cbf9dfcd4130f48b6ae7ee95426043364d578` | Crate module map and public runtime boundary. |
| `rope.rs` | 1055 | `8f760bf3b39f72c2270533c4b50f9f5769639ae02c5208b584f836898e73ace6` | Rotary positional embedding helper. |

## Promoted implementation implications

- ModelBreeder theory should talk about concrete model packages, not just metaphors.
- The `.slm` header, tensor directory, tokenizer checksum, tensor-layout checksum, quantization mode, and adapter identity checks are the deployable form of lineage and compatibility.
- `validate_adapter_delta` and `run_eval_to_sidecar` show how local experimentation can be evidence-bearing before a descendant is promoted.
- The WebAssembly exports prove that a local-first browser lab can expose model load, adapter validation, adapter application, generation, sampling config, and diagnostics without a server-side database.
