How luce-org/lucebox works
Lucebox is an optimized LLM inference engine focused on speculative inference, model-specific execution, and heterogeneous hardware. The principal workflow is a client request entering the serving engine, being scheduled across sequence slots, and executed by a model-specific prefill/decode path. Major documented branches include hybrid MoE storage and pipelined decode, PFlash, Spark, and megakernels. The excerpts show selected engine and storage relationships; broader capability links are documented in the README, while unsampled implementation details are not asserted.
Main entry points: seq_engine.h Sequence engine API · luce_engine.cpp Luce engine · calibrate.py Spark expert calibration · moe_hybrid_storage.cpp Hybrid expert storage
Components 14
Serving and sequences
- Luce engine
server/src/engine/luce_engine.cpp - Sequence engine API
server/src/common/concurrency/seq_engine.h - Sequence slots
server/src/common/concurrency/seq_slot_manager.cpp
Model execution
- Qwen 3.5 engine
server/src/qwen35/concurrency/qwen35_seq_engine.cpp - DeepSeek 4 engine
server/src/deepseek4/deepseek4_seq_engine.cpp - Qwen 4 experimental engine
server/src/qwen4exp/qwen4exp_seq_engine.cpp
Hybrid MoE
- Pipelined MoE decode
server/src/qwen35moe/qwen35moe_pipelined_decode.cpp - Hybrid expert storage
server/src/common/moe_hybrid_storage.cpp
Inference optimizations
- PFlash prefill
optimizations/pflash/pflash/dflash_client.py - Spark expert calibration
optimizations/spark/spark/calibrate.py - Session corpus extraction
optimizations/spark/spark/extract_sessions.py - Megakernel execution
optimizations/megakernel/model.py
Other components
- Inference client
- Heterogeneous hardware
Connections 12
- Inference client → Luce engine: sends requests
README.md - Luce engine → Sequence engine API: schedules sequences
- Sequence engine API → Sequence slots: claims slots
server/src/common/concurrency/seq_engine.h - Sequence engine API → Qwen 3.5 engine: dispatches steps
- Sequence engine API → DeepSeek 4 engine: dispatches steps
- Sequence engine API → Qwen 4 experimental engine: dispatches steps
- Pipelined MoE decode → Hybrid expert storage: uses storage
- Session corpus extraction → Spark expert calibration: supplies traffic
README.md - Spark expert calibration → Hybrid expert storage: guides placement
README.md - PFlash prefill → Inference client: accelerates prefill
README.md - Megakernel execution → Heterogeneous hardware: targets hardware
README.md - Luce engine → Heterogeneous hardware: runs across devices
README.md