Core reference
Engines
The six engine drivers opod links, their names, aliases and default endpoints, how a worker launches them, and the engine flags a plan may set.
In short
An engine is the inference server a node drives: Ollama, vLLM, SGLang, llama.cpp, MLX-LM or TensorRT-LLM. Each node uses one, chosen by engine.preferred or OPOD_ENGINE, and finds it at its default endpoint unless you name another. OPOD_ENGINE_FLAGS passes allow-listed flags to the engine launch.
OPOD_ENGINE=vllm OPOD_VLLM_ENDPOINT=http://127.0.0.1:8000 \
opod join "http://leader:8080?token=sk-orc-<node-token>"An engine is the inference server a node drives. Each node uses one, chosen by engine.preferred / OPOD_ENGINE. Any alias resolves to the same driver. GET /admin/v1/capabilities lists the drivers linked into a binary.
| Id | Aliases | Default endpoint | Endpoint override | One model per process | cache_salt |
|---|---|---|---|---|---|
ollama | — | http://127.0.0.1:11434 | OPOD_OLLAMA_ENDPOINT | no | no |
vllm | tt-openai, tenstorrent, tt | http://127.0.0.1:8000 | OPOD_VLLM_ENDPOINT | yes | yes |
sglang | sgl | http://127.0.0.1:30000 | OPOD_SGLANG_ENDPOINT | yes | yes |
llamacpp | llama-cpp, llamacpp-rpc | http://127.0.0.1:8089 | OPOD_LLAMACPP_ENDPOINT | yes | no |
mlx | mlx-lm | http://127.0.0.1:8080 | OPOD_MLX_ENDPOINT | no | no |
trtllm | tensorrt-llm, trtllm-serve | http://127.0.0.1:8000 | OPOD_TRTLLM_ENDPOINT | yes | yes |
- One model per process. Loading another model on such a worker stops the running engine and starts it again for the new model.
model add --nodeandmodel moverefuse that unless forced. cache_salt. The engine keys its prefix cache by a request's salt, so the leader can isolate caches per team or key (routing.cacheIsolation).- Native name. Ollama serves a catalog model by
source.ollama_name; the others bysource.repo, elsesource.path. - vLLM API key.
OPOD_VLLM_API_KEYis sent as a bearer to a vLLM server started with one. - The MLX default port is the leader's default port too. Move one of them when both run on one Mac.
When the engine is down, a request gets 502 engine_unreachable with the engine name, its endpoint and how to start it:
| Engine | Start hint |
|---|---|
ollama | ollama serve |
llamacpp | llama-server -m /path/to/model.gguf --port 8089 |
mlx | mlx_lm.server --port 8080 |
vllm | start vLLM and make OPOD_VLLM_ENDPOINT match |
sglang | python -m sglang.launch_server --model-path <repo> and make OPOD_SGLANG_ENDPOINT match |
trtllm | trtllm-serve <model> --port 8000 and make OPOD_TRTLLM_ENDPOINT match |
Who starts the engine
- Ollama and MLX-LM run on their own. Start them before opod; opod talks to them.
- llama.cpp on the leader. With
engine.preferred: llamacpp,router.pull_default_modelon and nothing listening on the endpoint,opod uplaunchesllama-server -hf <repo>for the default model, watches its health every 30 seconds, restarts it after three failures in a row, and stops it at shutdown. - On a worker, a model load (
OPOD_LOAD_MODEL,model add --node, a gang) launches vLLM, SGLang, llama.cpp or TensorRT-LLM as a supervised child process. A crashed child restarts with back-off; the worker reports the engine state (serving,starting,restarting,crash-looping,stopped) on its heartbeat. - Device and memory. The child sees
CUDA_VISIBLE_DEVICESand friends from--gpu, and a memory setting derived from--vram-budget. - llama.cpp offload. On a worker with an accelerator, llama.cpp is started with all layers on the GPU (
--n-gpu-layers 999) unless the plan setsngl. - Tool parsers. For a model with the
toolscapability, a vLLM, SGLang or TensorRT-LLM launch adds the parser the catalog'stool_parsernames (vLLM--enable-auto-tool-choice --tool-call-parser NAME, SGLang--tool-call-parser NAME, TensorRT-LLM--tool_parser NAME), unlessextraalready names one.
Engine flags
A manager sets per-worker engine flags with OPOD_ENGINE_FLAGS, a JSON object whose values are strings, numbers or booleans. Only these keys are used; the rest of the command line stays the worker's decision. The same keys go in a gang's flags.
| Engine | Key | Becomes |
|---|---|---|
| vLLM | tp | --tensor-parallel-size; auto = the largest power of 2 not above the GPU count |
| vLLM | gpu_memory_utilization | --gpu-memory-utilization (0.05–0.95); overrides the budget-derived value |
| vLLM | max_model_len | --max-model-len |
| vLLM | max_num_seqs | --max-num-seqs |
| vLLM | kv_cache_dtype | --kv-cache-dtype |
| vLLM | kv_tier_fs | An absolute directory for a disk KV tier below the host tier (needs --kv-offloading-size in extra). Bound it with opod cache kv-prune. |
| vLLM, SGLang | pp_layer_partition | Layers per pipeline stage (VLLM_PP_LAYER_PARTITION / SGLANG_PP_LAYER_PARTITION) |
| llama.cpp | ctx | -c |
| llama.cpp | ngl | --n-gpu-layers |
| llama.cpp | parallel | -np |
| llama.cpp | kv_cache_type | -ctk / -ctv |
| llama.cpp | kv_unified | true → --kv-unified, false → --no-kv-unified |
| llama.cpp | tensor_split | --tensor-split (uneven shares per device, e.g. 12,8) |
| SGLang | tp | --tp-size |
| SGLang | mem_fraction_static | --mem-fraction-static. From core v0.4.6, when SGLang refuses to start because the share is too small (Raise --mem-fraction-static above 0.532 …, common with a speculative draft model on a small card), the worker's engine error starts with the value to set: set the engine flag mem_fraction_static to 0.54 or more …. Core never raises it by itself: more for the static share is less KV cache for requests |
| SGLang | max_model_len | --context-length |
| SGLang | max_running_requests | --max-running-requests |
| SGLang | kv_cache_dtype | --kv-cache-dtype |
| TensorRT-LLM | tp | --tp_size |
| TensorRT-LLM | max_num_seqs | --max_batch_size (always set) |
| TensorRT-LLM | max_model_len | --max_seq_len |
| TensorRT-LLM | kv_cache_free_gpu_memory_fraction | the KV cache memory fraction |
| TensorRT-LLM | kv_cache_dtype | kv_cache_config.dtype in the config file |
| all four | extra | Raw extra arguments, plain tokens only |
OPOD_ENGINE=vllm \
OPOD_ENGINE_FLAGS='{"max_model_len":32768,"max_num_seqs":64,"kv_cache_dtype":"fp8"}' \
opod join http://leader:8080An invalid JSON value is ignored as a whole (no flags).
Slots
Each worker reports how many requests its engine serves at once: llama.cpp slots, SGLang's running-request limit, vLLM --max-num-seqs. When the engine does not state it, the worker reports what it put on the launch line. The admission gate uses these slots. See Policy snapshot.
Capability limits
| Feature | Engines |
|---|---|
| Tool calls | vLLM, SGLang, TensorRT-LLM (with a parser), llama.cpp. Ollama is refused by name. |
| Image input | Needs a model with the vision capability. SGLang, llama.cpp and MLX-LM are refused by name, because they are not proven to take images. |
| Rerank | vLLM, SGLang, llama.cpp started with --reranking. Ollama and MLX-LM answer 501 rerank_not_supported. |
| Unload | Ollama unloads in place. A worker stops the vLLM, SGLang, llama.cpp or TensorRT-LLM process it launched. |
| Sleep mode | vLLM (OPOD_SLEEP_MODE=1). Others answer 501. |
| LoRA adapters | vLLM. |
| Gangs | llama.cpp RPC, vLLM with Ray, SGLang multi-node. TensorRT-LLM is one node only. |
Last updated · Source: content/docs/core-reference/engines.mdx · View as Markdown