1#![allow(async_fn_in_trait)]
11
12#[cfg(test)]
13extern crate self as ferrum_interfaces;
14
15pub mod engine;
16pub mod kv_cache;
17pub mod kv_dtype;
18pub mod model_executor;
19pub mod recurrent_state;
20pub mod sampler;
21pub mod scheduler;
22pub mod tensor;
23pub mod tokenizer;
24#[allow(
25 dead_code,
26 unused_imports,
27 reason = "reviewed vNext contracts stay isolated and byte-stable until the product runtime migration"
28)]
29pub mod vnext;
30
31pub use engine::InferenceEngine;
33pub use kv_cache::{
34 AllocationRequest, BlockTable, CacheHandleStats, KvCacheHandle, KvCacheManager,
35};
36pub use kv_dtype::{KvBf16, KvDtypeKind, KvFp16, KvFp8, KvInt8};
37pub use model_executor::{
38 DecodeInput, DecodeOutput, ExecutorAdmissionEpochs, ExecutorPrefillAdmission,
39 ExecutorPrefillAdmissionDecision, ExecutorPrefillAdmissionReceipt,
40 ExecutorPrefillMaintenanceBlocker, ExecutorPrefillMaintenanceDeferral,
41 ExecutorPrefillMaintenanceOutcome, ExecutorPrefillMaintenanceStage, ExecutorSamplingOutput,
42 ModelExecutor, PlanRuntimeBatchDecodeOutcome, PlanRuntimeBatchPrefillOutcome,
43 PlanRuntimeDecodeInput, PlanRuntimeDecodeOutput, PlanRuntimePrefillAuthority,
44 PlanRuntimePrefillCompletion, PlanRuntimePrefillInput, PlanRuntimePrefillOutcome,
45 PlanRuntimePrefillOutput, PlanRuntimePrefillProduct, PrefillInput, PrefillOutput,
46};
47pub use recurrent_state::{
48 RecurrentStateHandle, RecurrentStateHandleStats, RecurrentStateManager,
49 RecurrentStateManagerStats, RecurrentStateResumePolicy, RecurrentStateSpec,
50 RecurrentStateTensorSpec,
51};
52pub use sampler::{
53 LogitsProcessor, Sampler, SamplingConfig, SamplingContext, SamplingRng,
54 SAMPLING_RNG_ALGORITHM_ID,
55};
56pub use scheduler::{BatchHint, BatchPlan, Scheduler as SchedulerInterface};
57pub use tensor::{TensorFactory, TensorLike, TensorOps, TensorRef};
58pub use tokenizer::{IncrementalTokenizer, Tokenizer, TokenizerFactory, TokenizerInfo};
59
60pub use ferrum_types::{
62 config::BackendConfig,
63 config::EngineConfig,
65 config::SchedulerConfig,
66 config::TokenizerConfig,
67 BatchId,
68 BlockId,
69 ClientId,
70 ComponentHealth,
71 ComponentStatus,
72 DataType,
73 Device,
75 EngineMetrics,
76 EngineStatus,
77 FerrumError,
78 FinishReason,
79 HealthStatus,
80 InferenceRequest,
82 InferenceResponse,
83 MemoryUsage,
85 ModelId,
86 ModelInfo,
88 ModelSource,
89 ModelType,
90 Priority,
91 RequestId,
93 Result,
94 SamplingParams,
96 SchedulerStats,
97 SessionId,
98 SpecialTokens,
99 StreamChunk,
100 TaskId,
101 TokenId,
103};