Adapters & Assembly

Adapters are how TinyRustLM explores small, modular model changes without pretending every change is a finished model.

Adapter package types

PackageMeaningRuntime role
ADP1Raw f32 task-delta adapter package.Can be validated and applied to compatible f32/q8_0/q4_0 loaded models.
ASP1Sparse f32 task-delta adapter package.Compact sparse route with retention and mask metadata.
ALR1Low-rank adapter package.Factor-based low-rank route with source-backed metadata.

Rust is the package authority. JavaScript may select and transfer adapter bytes, but Rust validates identity, checksums, tensor directory, tokenizer, layout, finite payload values, sparse indexes or low-rank shapes, and fused values before mutation.

Generated assembly chain

Generated browser bundles can carry:

  1. selector registry;
  2. module-plan receipt;
  3. model bytes;
  4. model manifest;
  5. assembly receipt;
  6. evidence files;
  7. adapter-family receipt;
  8. adapter manifests;
  9. ADP1, ASP1, and ALR1 stack artifacts;
  10. Rust validation calls;
  11. Rust apply calls;
  12. diagnostics proving the assembly state.

Module plan

A module plan is a browser-constrained assembly receipt. It states what must be fetched, in what class, under what byte budgets, with what checksums, roles, phases, dependencies, and slots.

The browser must verify the plan before fetching generated model bytes. This prevents a selector registry from silently routing an unplanned artifact.

Selector registry

The selector registry is the browser route gate. It carries entries for admitted model candidates and optional adapter families. It must include budget fields such as model byte budgets and text-sidecar budgets before generated entries are accepted.

Assembly receipt

The assembly receipt binds the model manifest, ledger, review, recipe, operator, candidate, promotion, runtime, eval, admission, eval-case digest, and adapter-family evidence by checksum.

The browser should fetch evidence files referenced by the receipt and verify their checksums before showing Assembly Evidence as loaded.

Why this matters

This project is about controlled local evolution, not arbitrary runtime mutation. Every generated route should be a chain of ordinary files that can be inspected, replayed, and rejected when drift is detected.