Expand description
Component registry for dynamic component creation
This module provides a registry pattern implementation that allows dynamic registration and lookup of component factories. The registry replaces hardcoded factory implementations with a flexible, extensible system that supports:
- Dynamic component registration and discovery
- Multiple implementations for each component type
- Configuration-driven component selection
- Easy testing with mock components
Structs§
- Component
Config - Component configuration passed to factories
- Component
Metadata - Component metadata
- Component
Registry - Global component registry for managing component factories
- Continuous
Batch Scheduler Factory - Continuous batching scheduler factory
- Default
KvCache Factory - Default KV cache factory
- Fifo
Scheduler Factory - FIFO scheduler factory
- Greedy
Sampler - Common samplers Greedy sampler (always picks highest probability token)
- Greedy
Sampler Factory - Greedy sampler factory
- Hugging
Face Tokenizer Factory - HuggingFace tokenizer factory
- LlmExecutor
Factory - Candle executor factory
Builds a
ModelExecutorfrom a resolved model path. Despite the historical “candle” name (PR #127 deleted the legacyCandleBackendtrait), this factory now produces realBackend<B>-based executors for LLMs (LlamaFamilyModel / Qwen3MoeModel) and candle-based executors for embedding / multimodal / ASR (Bert, CLIP, Whisper). - Multinomial
Sampler Factory - Multinomial sampler factory
- Paged
KvCache Factory - Paged KV cache factory (for PagedAttention)
- Priority
Scheduler Factory - Priority scheduler factory
- Stub
Executor Factory - Stub executor factory
- Stub
Tokenizer - Stub tokenizer for testing
- Stub
Tokenizer Factory - Stub tokenizer factory for testing
Traits§
- Component
Factory - Factory trait for creating components
Functions§
- global_
registry - Get the global registry, initializing with defaults if needed
- set_
global_ registry - Initialize global registry with a custom registry
Type Aliases§
- Candle
Executor Factory Deprecated - Back-compat alias; retained so external test fixtures referencing the old name continue to compile while we sweep call sites.