Skip to content
Opod

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.

IdAliasesDefault endpointEndpoint overrideOne model per processcache_salt
ollama—http://127.0.0.1:11434OPOD_OLLAMA_ENDPOINTnono
vllmtt-openai, tenstorrent, tthttp://127.0.0.1:8000OPOD_VLLM_ENDPOINTyesyes
sglangsglhttp://127.0.0.1:30000OPOD_SGLANG_ENDPOINTyesyes
llamacppllama-cpp, llamacpp-rpchttp://127.0.0.1:8089OPOD_LLAMACPP_ENDPOINTyesno
mlxmlx-lmhttp://127.0.0.1:8080OPOD_MLX_ENDPOINTnono
trtllmtensorrt-llm, trtllm-servehttp://127.0.0.1:8000OPOD_TRTLLM_ENDPOINTyesyes
  • 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 --node and model move refuse 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 by source.repo, else source.path.
  • vLLM API key. OPOD_VLLM_API_KEY is 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:

EngineStart hint
ollamaollama serve
llamacppllama-server -m /path/to/model.gguf --port 8089
mlxmlx_lm.server --port 8080
vllmstart vLLM and make OPOD_VLLM_ENDPOINT match
sglangpython -m sglang.launch_server --model-path <repo> and make OPOD_SGLANG_ENDPOINT match
trtllmtrtllm-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_model on and nothing listening on the endpoint, opod up launches llama-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_DEVICES and 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 sets ngl.
  • Tool parsers. For a model with the tools capability, a vLLM, SGLang or TensorRT-LLM launch adds the parser the catalog's tool_parser names (vLLM --enable-auto-tool-choice --tool-call-parser NAME, SGLang --tool-call-parser NAME, TensorRT-LLM --tool_parser NAME), unless extra already 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.

EngineKeyBecomes
vLLMtp--tensor-parallel-size; auto = the largest power of 2 not above the GPU count
vLLMgpu_memory_utilization--gpu-memory-utilization (0.05–0.95); overrides the budget-derived value
vLLMmax_model_len--max-model-len
vLLMmax_num_seqs--max-num-seqs
vLLMkv_cache_dtype--kv-cache-dtype
vLLMkv_tier_fsAn 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, SGLangpp_layer_partitionLayers per pipeline stage (VLLM_PP_LAYER_PARTITION / SGLANG_PP_LAYER_PARTITION)
llama.cppctx-c
llama.cppngl--n-gpu-layers
llama.cppparallel-np
llama.cppkv_cache_type-ctk / -ctv
llama.cppkv_unifiedtrue → --kv-unified, false → --no-kv-unified
llama.cpptensor_split--tensor-split (uneven shares per device, e.g. 12,8)
SGLangtp--tp-size
SGLangmem_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
SGLangmax_model_len--context-length
SGLangmax_running_requests--max-running-requests
SGLangkv_cache_dtype--kv-cache-dtype
TensorRT-LLMtp--tp_size
TensorRT-LLMmax_num_seqs--max_batch_size (always set)
TensorRT-LLMmax_model_len--max_seq_len
TensorRT-LLMkv_cache_free_gpu_memory_fractionthe KV cache memory fraction
TensorRT-LLMkv_cache_dtypekv_cache_config.dtype in the config file
all fourextraRaw 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:8080

An 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

FeatureEngines
Tool callsvLLM, SGLang, TensorRT-LLM (with a parser), llama.cpp. Ollama is refused by name.
Image inputNeeds a model with the vision capability. SGLang, llama.cpp and MLX-LM are refused by name, because they are not proven to take images.
RerankvLLM, SGLang, llama.cpp started with --reranking. Ollama and MLX-LM answer 501 rerank_not_supported.
UnloadOllama unloads in place. A worker stops the vLLM, SGLang, llama.cpp or TensorRT-LLM process it launched.
Sleep modevLLM (OPOD_SLEEP_MODE=1). Others answer 501.
LoRA adaptersvLLM.
Gangsllama.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