Skip to main content

logit_loom_core/
lib.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3#![doc = include_str!("../README.md")]
4#![forbid(unsafe_code)]
5
6mod activation;
7mod activation_accumulator;
8mod audio;
9mod digest;
10mod error;
11mod generation;
12mod observe;
13mod sampling;
14mod speculation;
15mod state;
16mod steering;
17mod structured;
18mod text_mechanics;
19mod token;
20mod transform;
21
22pub use activation::*;
23pub use activation_accumulator::*;
24pub use audio::{
25    AudioPrefillPlanV1, AudioPrefillReceiptV1, MAX_AUDIO_FRAMES, MAX_AUDIO_SAMPLE_RATE_HZ,
26};
27pub use digest::Digest;
28pub use error::CoreError;
29pub use generation::{GenerationFinish, GenerationReceipt};
30pub use observe::{ControlFlow, ObserverReceipt, PrefillFinish, PrefillProgress, PrefillReceipt};
31pub use sampling::{
32    DrySampler, GenerationPlan, GenerationPlanV2, Grammar, GrammarActivationV2, GrammarPlanV2,
33    LogitBias, MAX_DRY_SEQUENCE_BREAKER_BYTES, MAX_DRY_SEQUENCE_BREAKERS, MAX_GRAMMAR_ROOT_BYTES,
34    MAX_GRAMMAR_SOURCE_BYTES, MAX_LAZY_GRAMMAR_TRIGGER_BYTES,
35    MAX_LAZY_GRAMMAR_TRIGGER_PATTERN_BYTES, MAX_LAZY_GRAMMAR_TRIGGER_PATTERNS,
36    MAX_LAZY_GRAMMAR_TRIGGER_TOKENS, MAX_LOGIT_BIASES, MAX_STOP_SEQUENCE_BYTES, MAX_STOP_SEQUENCES,
37    MirostatSampler, MirostatVersion, RepetitionSampler, SamplingPlan,
38};
39pub use speculation::*;
40pub use state::CheckpointReceipt;
41pub use steering::{ControlVectorSpec, LoraSpec, SteeringAction, SteeringKind, SteeringReceipt};
42pub use structured::*;
43pub use text_mechanics::{
44    MAX_SPECULATIVE_TOKENS, MAX_TEXT_MECHANICS_CAPTURES, MAX_TEXT_MECHANICS_LORAS,
45    TextMechanicsCheckpointReceiptV2, TextMechanicsCleanupReceiptV2, TextMechanicsPlanV1,
46    TextMechanicsPlanV2, TextMechanicsReceiptV1, TextMechanicsReceiptV2,
47};
48pub use token::{CandidateMode, MAX_SPARSE_CANDIDATES, TokenId};
49pub use transform::{
50    CallbackFailure, CallbackPhase, MAX_PIPELINE_STAGES, PipelineReceipt, PipelineSpec,
51    StageReceipt, TransformSpec,
52};