logit-loom-core
Serializable, backend-neutral contracts for bounded token-stream mechanics.
This crate defines token identifiers, candidate exposure, sampling plans, steering descriptors, checkpoints, bounded audio-prefill contracts, topology-bound activation programs, target-authoritative speculation, and structured-projection compiler/validator/feedback lineage and mechanical receipts. It contains no model runtime or native code.
[]
= "=0.2.0"
Example
Build and validate a complete generation contract before handing it to an adapter:
use ;
Plans and receipts implement serde::Serialize and serde::Deserialize.
Digest domains are explicit and versioned; changing a serialized shape or its
interpretation is a compatibility change.
Boundaries
- Token pieces are arbitrary bytes, not necessarily standalone UTF-8.
AudioPrefillPlanV1binds one projector identity, its declared sample rate, and a bounded caller-owned normalized mono PCM slice. Its receipt binds only a caller-provided audio identity and causal accounting; it never serializes PCM bytes.- Public collections and native strings have documented bounds.
TextModelTopologyV1, activation capture/vector/program contracts,SpeculationPlanV1, and their receipts describe exact mechanics and target/draft lineage without naming a native tensor pointer or model path.TextMechanicsPlanV2composes those mechanics, whileTextMechanicsCheckpointReceiptV2binds an ordinary opaque state receipt to the exact aggregate mechanics and parent lineage which produced it.- Provisional speculative telemetry resolves to admitted or rejected target positions before entering aggregate capture receipts.
StructuredProjectionPlanV1binds semantic component identities without implementing their policy. Attempt receipts distinguish cancellation, authoritative rejection, and selected causal state.- Receipts record mechanics and causal lineage, not model quality or semantic correctness.
- Checkpoint metadata binds an opaque backend state; it does not make that state portable across native builds.
See the workspace overview, architecture, and compatibility policy.