MiniModel.MiRust.com Developer docs for MiniModel.com

Rust-first tiny model exchange

MiniModel.com developer documentation

MiniModel is a metadata and verification layer for tiny local AI models. The first implementation target is deliberately simple: publish schemas and documentation, verify local `.slm` files with Rust, write checksum-bearing receipts, and let TinyRustLM.com load only user-selected local files in the browser.

No server model bytes

Project servers do not host, proxy, serve, or cache user model artifacts.

No server execution

Project servers do not run user models or provide inference for user models.

Local Rust proof

Manifests, checksums, `.slm` structure, and receipts are verified locally.

Local files, Hugging Face discovery, and future P2P chunks converge into Rust verification, import receipts, and TinyRustLM local import.

Server Boundary

  • MiniModel.com may publish static documentation, manifest schemas, example manifests, metadata-only catalog entries, public-key routes, signed catalog snapshots, and takedown/contact routes.
  • MiniModel.com must not serve third-party `.slm`, safetensors, GGUF, ONNX, adapter packages, tokenizer binaries, or any other user model bytes.
  • MiniModel.com must not proxy Hugging Face downloads, peer transfers, or browser model fetches in a way that turns project infrastructure into a model-byte relay.
  • TinyRustLM.com remains browser-local. A user imports a local `.slm` file through the browser file picker. Rust/WASM validates the bytes before they can be used.
  • Catalog entries are publisher assertions and evidence pointers. They are not project endorsements, safety certifications, legal opinions, or training-data claims.

The `.slm` Format

Binary contract

`.slm` v1 is a little-endian, fixed-shape, non-JSON model container for TinyRustLM. It starts with `SLM1`, carries a 108-byte v1 header, a tokenizer section, a 64-byte tensor directory entry per tensor, aligned tensor payloads, and a custom u64 checksum with bytes 100..108 treated as zero during recomputation.

The format is intentionally smaller than a general interchange standard. It is not GGUF, ONNX, safetensors, or a dynamic schema language. Those formats may be source inputs, but TinyRustLM executes `.slm` after local conversion and validation.

Validation authority

Rust is the acceptance authority. JavaScript may display routes, labels, and progress, but Rust parses and rejects invalid magic, unsupported versions, checksum drift, offset escapes, tensor shape drift, malformed tokenizers, unsupported dtypes, missing scales, and missing required tensors.

The current runtime supports f32, q8_0, and q4_0 tensor payloads, `BTOK` byte-tokenizer metadata, `BPE1` custom BPE metadata, explicit output heads, and the v1 tied-output flag.

Header Field Order

OffsetTypeFieldMeaning
04 bytes`magic``SLM1`
4u32`version`Must be `1` for the current parser.
8u32`header_length`Minimum 108 bytes.
12u32`model_type`Current model type id is `1`.
16u32`flags`Bit 0 means tied output projection.
20..52u32shape fieldsVocabulary, specials, hidden size, layer count, head counts, head dim, FFN size, context.
56f32`rope_theta`Finite positive RoPE theta.
60f32`rms_norm_epsilon`Finite positive RMSNorm epsilon.
64u64`tokenizer_offset`Tokenizer section start.
72u64`tokenizer_length`Tokenizer section byte count.
80u64`tensor_directory_offset`64-byte aligned tensor directory start.
88u32`tensor_count`Number of 64-byte tensor entries.
92u64`tensor_data_offset`64-byte aligned tensor payload region start.
100u64`checksum`Nonzero custom checksum over the entire file.

Full reference: docs/slm-format.md

MiniModel Manifest v0

Purpose

The MiniModel manifest is a small line-oriented `key=value` document that binds metadata to a user-supplied local artifact. It is not a fetch instruction and never authorizes TinyRustLM to download model bytes from a project server.

Minimum binding

A manifest binds model id, publisher identity, license route, model-card route, artifact kind, byte count, artifact SHA256, `.slm` shape, tokenizer checksum, tensor-layout checksum, evidence routes, chunk/Merkle metadata, and signature identity fields.

manifest.version=0
manifest.kind=minimodel.manifest
model.id=example-tiny-assistant-q8
publisher.id=example-publisher
model_card.route=https://example.invalid/models/example-tiny-assistant
license.route=https://example.invalid/licenses/example
artifact.kind=slm
artifact.byte_count=123456
artifact.sha256=sha256:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
artifact.project_server_url=none
slm.format_version=1
slm.quantization=q8_0
chunks.mode=none
signature.kind=unsigned-draft

Full reference: docs/manifest-v0.md

Rust Verifier MVP

Parse

Reject duplicate keys, unsupported schema versions, missing required fields, non-ASCII keys, unknown required boundary claims, and signed manifests that contain comments or non-canonical form.

Prove

Open only the local artifact path supplied by the user. Verify byte count, SHA256, optional chunk list, Merkle root, `.slm` header, custom checksum, tokenizer identity, tensor layout identity, and runtime compatibility.

Receipt

Write a local import receipt after verification passes. The receipt stores checksums, manifest identity, artifact byte count, shape, quantization, and the next gate: user-selected TinyRustLM local file open.

Full reference: docs/verifier-mvp.md

Source Lanes

Your local files

The simplest path. Users bring a local `.slm` file and optional local manifest or evidence sidecars. The verifier proves the local file. TinyRustLM opens the same local file through the browser picker.

Hugging Face

Hugging Face is an external discovery and acquisition lane. MiniModel may expose metadata awareness, model-card routes, file hints, and revision identity. Project infrastructure does not use project-owned tokens, proxy `/resolve/` URLs, or turn endpoints into a MiniModel runtime path.

Future P2P

Peer transfer comes later and must preserve the same local verifier contract. Consenting peers may exchange chunks, but the artifact becomes importable only after byte count, whole-artifact checksum, chunk/Merkle proof, `.slm` validation, and receipt writing.

Full reference: docs/source-lanes.md

Roadmap

Implement first

Schema docs, example manifests, local Rust parser, checksum drift tests, `.slm` validation calls, receipt writer, and a metadata-only catalog prototype.

Defer networking

Compare Rust-native QUIC/blob transfer, Iroh, Rust-libp2p, BitTorrent-style chunking, and Pear/Bare/Hypercore after the verifier is stable. Do not choose a JavaScript runtime as a core dependency without a later explicit justification.

Full reference: docs/p2p-roadmap.md