Skip to main content

Module engine_factory

Module engine_factory 

Source
Expand description

Load-time engine selection (llama.cpp llama_model_* factory analogue).

GGUF text-generation architectures that the generic crate::decoder::Decoder can run are routed there. Dedicated stacks (MLA / DSA / recurrent / T5 encoder-decoder) are selected here and must not accumulate if arch branches inside matmul / attention kernels.

Enums§

EngineSelectError
Why a GGUF cannot be served by the currently compiled engine set.
SelectedEngineKind
Result of load-time engine selection for a GGUF architecture string.
ServedEngine
Type-erased serve handle: today ordinary GGUFs use Decoder; Kimi/GLM/MLA use dedicated engines once loaders succeed.

Functions§

ensure_generic_decoder
Fail-closed check used by ferrox-server before constructing a Decoder for architectures that need another engine.
load_gemma4_engine_from_path
Open a Gemma-4 GGUF and build ServedEngine::Gemma4.
load_glm52_engine_from_path
Open a GLM-5.2 / GLM4-family GGUF and build ServedEngine::Glm52.
load_mla_engine_from_path
Open a DeepSeek-2 / Mistral-4 GGUF and build ServedEngine::Mla.
select_engine_kind
Resolve which engine kind a GGUF general.architecture should use.