Expand description
Mock components for testing the ferrum inference engine without GPU.
Provides MockTensor, MockModelExecutor, MockKvCacheManager, MockTokenizer, and MockSampler — all hardware-independent, suitable for testing the scheduling and orchestration layers on any platform.
Re-exports§
pub use paged_executor::PagedAttentionExecutor;pub use paged_executor::PagedExecutorConfig;
Modules§
- paged_
executor - Model executor that uses PagedAttention KV cache.
Structs§
- Mock
KvCache Handle - Mock KV cache handle — tracks block metadata without allocating real memory.
- Mock
KvCache Manager - Mock KV cache manager — tracks allocations in memory, simulates block limits.
- Mock
Model Executor - Mock model executor that simulates prefill/decode with configurable latency. No model weights, no GPU — pure async simulation.
- Mock
Sampler - Greedy sampler — always picks the token with highest logit. Deterministic, no temperature or top-k.
- Mock
Tensor - A mock tensor that stores shape and optional f32 data. No GPU, no Candle — pure Rust.
- Mock
Tensor Factory - Mock tensor factory implementing TensorFactory without any ML backend.
- Mock
Tokenizer - Mock tokenizer: splits on whitespace, assigns sequential token IDs. EOS token is vocab_size - 1.