Expand description
Completed-token lifecycle, snapshot reservation and branch accounting policy. Shared completed-token lifecycle and non-rewindable snapshot reservations.
Structs§
- Generation
Boundary - Quiescent, rewindable lifecycle component of a complete generation snapshot. It is not native completion evidence or a substitute for a complete snapshot.
- Generation
Lifecycle - One portable lifecycle shared by all native implementations. A Running state includes native completion and record delivery, not just host submission.
- Managed
Text Continuation - Ordinary continuation plus its logical branch-retention ownership. Moving or swapping native slots must keep this lease with the logical child, including while that child is installed in the shared executable.
- Sampling
Override - Supported changes to future sampling only. Omitting
reseedretains the exact inherited RNG stream. Sampler strategy, adaptive counters, penalties and token history remain unchanged; incompatible strategy transitions are not exposed. - Sampling
State Facts - Native facts consumed by shared validation; contains no mutable native handle.
- Snapshot
Budget - Shared logical reservation owner for retained snapshots, child states and provisional restore copies. It deliberately lives outside rewindable state.
- Snapshot
Reservation - Retention lease held alongside an opaque snapshot or child state. Cloning the lease is only for handles sharing that same object; copying native state needs another reservation. Final drop releases retained resources, not cumulative work.
- Text
Branch Request - Explicit child admission and logical storage bounds. Future model/host growth must be priced by the owning composition before creating a runnable branch.
- Text
Continuation Branch - Independently prepared branch slot. Exchange is serial and moves the previous installed continuation into this slot; immutable weights stay in one runtime.
- Text
Continuation Snapshot - Opaque reusable model/sampler/input/controller/capture checkpoint. The facade pairs this with its semantic/output/lifecycle checkpoint before exposing a full generation snapshot. Native state is never serialized or shallow-cloned.
- Token
Choice Controller - Adds a one-decision restriction to an existing canonical constraint owner. Native sampling, penalties, history and RNG still use the ordinary path. A forced decision consumes exactly that sampler’s one-candidate decision: at nonzero temperature RNG advances as usual, and Mirostat observes probability one. It does not edit an already committed prefix or replay text.
- Validated
Sampling Override - Validated native action. Only the shared policy constructs this value.
Enums§
- Sampling
Override Error - Invalid policy is rejected before any native operation or state change.
- Text
Snapshot Error - Failure before or during native/portable snapshot composition.
- Token
Choice Error - Rejected canonical choice or error from the original grammar controller.
Traits§
- Snapshot
Token Controller - Explicit independent-copy contract for the canonical constraint owner. A
shallow
Cloneof grammar or mutable handles does not provide this guarantee. - Text
Sampling Control Backend - Minimal native mechanism; ordinary sampling and snapshot state keep their existing owners. Errors must preserve the previous logical sampling state.
- Text
Snapshot Backend - Native ordinary-generation mechanisms used by the portable snapshot driver.
Capture/intervention ownership stays in the shared
CaptureSession; adapters expose that owner and perform native copying, never duplicate its bookkeeping.
Functions§
- apply_
prepared_ sampling_ override - Validates a prospective change on detached, independently prepared generation state. Used during branch construction under its copy reservation, while the loaded runtime is quiescent. Native installation must preserve the installed model state and cooperate with its existing submission/completion owner.
- apply_
sampling_ override - Validates and applies one future sampling change at a proven native and record boundary. Stochastic-to-greedy retains RNG; switching back resumes that stream. A run created without an RNG needs an explicit seed to become stochastic.
- intervention_
plan_ storage_ bytes - Logical owned storage of the audited serialized intervention request DTO. Native estimators and admitted handles are deliberately excluded.