This is an asynchronous inference engine written in Rust, optimized for executing Mixture of Experts (MoE) models. It relies on the candle-core framework for native execution without Python overhead.
- Asynchronous Runtime: Based on
tokiofor handling non-blocking requests and token streaming. - Zero-Copy Loading: Uses
MmapedSafetensorsto load weights directly into RAM, minimizing initialization latency. - Streaming Pipeline: Atomic inference per token (Embed -> Attention -> MoE -> Projection).
- Orchestrator: Asynchronous queue for request management, isolated from the mathematical execution backend.
- Tokenizer: Custom BPE (MUNTU) tokenizer optimized for byte-level processing.
- Language: Rust
- ML Framework:
candle-core(Hugging Face). - API Server:
tokio(async runtime),axum. - Serialization:
safetensors.
Zilda is currently a functional PoC. The basic infrastructure is validated, but the mathematical logic (tensor alignment) is undergoing debugging.
Validated Features:
- Operational HTTP/API server.
- Asynchronous pipeline and request queue.
- Weight loading via Mmap.
- Integrated BPE tokenizer.
- Shape resolution: Correcting input/output dimensions on attention and MoE layers.
- Mathematical validation: Verification of the complete
forward pass(coherent logits). - Unit tests: Isolation of Expert
forwardcalculations.
- Auto-Discovery Schema: Removal of hard-coded parameters (
num_layers,num_heads, etc.). The engine must inspect tensor metadata at load time to auto-configure. - External configuration: Implementation of a
zilda_config.tomlfile to configure the engine without recompilation. - KV Cache: Memory management optimization for long sequences.
- GPU Acceleration: CUDA/FlashAttention integration via
candle. - Batching: Processing multiple simultaneous requests.
- Quantification: Support for Q4/Q8 formats.