NVIDIA Dynamo
NVIDIA Dynamo is a framework for serving a model from many workers: an OpenAI-compatible HTTP frontend, a router that sends each request to the worker most likely to hold its prompt’s KV cache already, prefill/decode disaggregation, and a Kubernetes operator. Inference engines plug into it as workers.
Started with dynamo as its first argument, the LayerScale image runs the engine as a Dynamo worker: the same engine, behind Dynamo’s backend interface. Dynamo’s frontend takes the HTTP request, applies the chat template, tokenizes, and handles stop strings, tool-call parsing and reasoning parsing. The worker receives token ids and streams token ids back.
Requirements
The worker needs a Pro license key (layerscale.ai/pricing); without one it refuses to start.
The sessions API is available through Dynamo when the worker serves it and the frontend forwards to it; see Sessions.
The worker links the latest stable Dynamo release. Run it with that release’s frontend: pip install ai-dynamo, or the nvcr.io/nvidia/ai-dynamo/dynamo-frontend image of the same version.
Running locally
Dynamo needs no etcd or NATS on one machine: workers and the frontend find each other through a directory (DYN_DISCOVERY_BACKEND=file), and requests travel over TCP.
# The worker. DYN_SYSTEM_PORT turns on its /live, /health and /metrics.docker run -d --gpus all --network host --stop-timeout 30 \ -e LAYERSCALE_LICENSE_KEY=LSK-... \ -e DYN_DISCOVERY_BACKEND=file -e DYN_FILE_KV=/kv -v /tmp/dynamo-kv:/kv \ -e DYN_SYSTEM_PORT=9090 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ layerscale/layerscale:latest \ dynamo --model nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 --served-model-name nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4
# The frontend, on port 8000, with the KV-aware router, sharing the discovery directory.pip install ai-dynamoDYN_DISCOVERY_BACKEND=file DYN_FILE_KV=/tmp/dynamo-kv \ python -m dynamo.frontend --http-port 8000 --router-mode kv
curl http://127.0.0.1:8000/v1/chat/completions -H "Content-Type: application/json" \ -d '{"model":"nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'A worker takes longer than Docker’s default 10 seconds to stop: it first leaves discovery and waits out Dynamo’s 5-second grace period, then frees its GPUs. --stop-timeout 30 (or docker stop -t 30) lets it exit cleanly instead of being killed, which would leave its entry behind in the discovery directory. Kubernetes’ default 30-second grace period is enough.
The container runs as root, so the files it writes in the discovery directory are root’s. Create the directory first and make it writable for the frontend’s user (mkdir -p /tmp/dynamo-kv && chmod a+rwX /tmp/dynamo-kv), or run the frontend as root.
The worker registers with Dynamo only after the weights are loaded and the warm-up has run. Until then the frontend does not list the model, and /live and /health answer 503.
Dynamo reads the tokenizer and chat template from --model: the directory, or for a Hugging Face repo id, the Hugging Face cache the engine downloads it into. Pass --served-model-name to choose the name clients send. Without it, the name is the model’s own.
Flags
docker run --rm -e LAYERSCALE_LICENSE_KEY=LSK-... layerscale/layerscale:latest dynamo --help prints both groups (the image checks the license before it starts anything, help included).
Engine options. Every option in Configuration works the same way here: --model, --license-key, --ctx, --max-num-seqs, --gpu-memory-utilization, --max-total-tokens, --chunked-prefill-size, --kv-cache-dtype, --device, --tp, --no-prefix-cache and --speculative-algorithm. --api-key guards only the sessions API that --sessions-addr serves. A worker runs on one node: --nnodes above 1 is refused, and a model across several nodes runs under layerscale serve (Multi-node).
Worker options. Dynamo’s own. Each one can also be set through its environment variable, which is how the Kubernetes operator passes them.
| Flag | Environment | Default | Meaning |
|---|---|---|---|
--served-model-name <NAME> |
the model’s name | The model name clients ask for. | |
--disaggregation-mode <M> |
DYN_DISAGGREGATION_MODE |
agg |
agg runs whole requests. prefill and decode split them; see Disaggregated serving. encode is refused, because LayerScale has no separate encoder. |
--namespace <NS> |
DYN_NAMESPACE |
dynamo |
Dynamo namespace. The frontend serves the workers in its own namespace. |
--component <NAME> |
DYN_COMPONENT |
backend |
Component name within the namespace. |
--endpoint <NAME> |
DYN_ENDPOINT |
generate |
Endpoint name. |
--endpoint-types <LIST> |
DYN_ENDPOINT_TYPES |
chat,completions |
Which frontend routes serve this model. |
--custom-jinja-template <PATH> |
DYN_CUSTOM_JINJA_TEMPLATE |
none | A chat template to use instead of the model’s. |
--dyn-tool-call-parser <NAME> |
DYN_TOOL_CALL_PARSER |
none | The frontend’s tool-call parser for this model. |
--dyn-reasoning-parser <NAME> |
DYN_REASONING_PARSER |
none | The frontend’s reasoning parser for this model. |
--exclude-tools-when-tool-choice-none <B> |
DYN_EXCLUDE_TOOLS_WHEN_TOOL_CHOICE_NONE |
true |
Leave tools out of the chat template when tool_choice is none. |
--enable-rl |
DYN_ENABLE_RL |
off | Dynamo’s reinforcement-learning control endpoint. |
Dynamo’s runtime reads its environment directly:
| Variable | Meaning |
|---|---|
DYN_DISCOVERY_BACKEND |
etcd (default), kubernetes, file or mem. |
DYN_FILE_KV |
The directory for file discovery. |
ETCD_ENDPOINTS, NATS_SERVER |
Where etcd and NATS are, when used. |
DYN_REQUEST_PLANE |
tcp (default) or nats. |
DYN_SYSTEM_PORT |
The port for /live, /health and /metrics. Off unless set. |
POD_IP |
The address a prefill or decode worker gives the other to reach it at. Without it, the address of the default route. |
What a request may ask for
The frontend turns an OpenAI request into token ids and sampling options. The worker applies max_tokens, temperature, top_p, top_k, seed, ignore_eos, and logprobs with up to 20 top_logprobs; a sampling field the request leaves unset takes the checkpoint’s generation_config.json, as the HTTP API does. A request with no max_tokens runs until end of sequence or the context limit.
The frontend applies stop strings and stop token ids. The worker refuses the following with a 400 instead of ignoring them: n or best_of above 1, beam search, min_p, frequency, presence or repetition penalties, guided decoding, min_tokens, max_thinking_tokens, prompt logprobs, image input and prompt embeddings.
A streamed response without logprobs arrives as the engine produces it, step by step. With logprobs, the tokens and their logprobs all arrive in the final chunk; since the frontend sees no tokens before then, the worker also stops such a request on its stop strings, and the frontend still trims the text and sets the finish reason.
Conversations across workers
With several workers, start the frontend with Dynamo’s session affinity, so that each conversation stays on one worker:
python -m dynamo.frontend --http-port 8000 --router-mode kv --router-session-affinity-ttl-secs 3600- A conversation is named by its
X-Dynamo-Session-IDheader, or by the session header Claude Code, Codex or OpenCode sends (x-claude-code-session-id,thread-id,x-session-id). - Its first request goes where the router sends any request: the worker holding most of its prompt, weighed against load. Its later requests go to that worker until it has been idle for the TTL. Requests without a session are routed as before.
- An aggregated worker holds each conversation between turns, as
layerscale serveholds an implicit session: a turn resumes where the last one ended and prefills only what is new.X-Dynamo-Session-Final: trueon a conversation’s last request lets it go. - A conversation whose worker has stopped moves to another worker, which prefills it again.
What works through Dynamo’s frontend, and what does not:
- Works: Chat Completions, Responses and Messages requests that carry the whole conversation, with tools and streaming.
- Does not:
previous_response_id(the frontend answers501), and Message Threads (the frontend drops thethreadfield, so acontinuerequest answers only its new messages).x-layerscale-session-idapplies tolayerscale serveonly. The sessions API needs a forward route that is not in a Dynamo release yet.
Sessions
--sessions-addr HOST:PORT (or LAYERSCALE_SESSIONS_ADDR) makes an aggregated worker also serve the sessions API (/v1/sessions and everything under it, the event stream and the WebSocket included) on that address, from the same engine that serves Dynamo’s requests. The worker advertises the API’s URL to Dynamo when it registers: the address it is bound to, or, bound to every interface (0.0.0.0), POD_IP (else the address of the default route) on the same port.
A session lives on the worker that created it. The frontend’s owner forward route (--forward-route, or DYN_HTTP_FORWARD_ROUTES), proposed in ai-dynamo/dynamo#15608 and not in a Dynamo release yet, sends each session’s requests to that worker:
layerscale-dynamo --model nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 --sessions-addr 0.0.0.0:8081 &python -m dynamo.frontend --http-port 8000 --forward-route /v1/sessions=ownerPOST /v1/sessionsgoes to one worker. The frontend fills in anidwhen the body has none, so the frontend knows the session’s worker from the start./v1/sessions/{id}and every path under it go to the worker holding the session. A frontend that does not know it yet asks each worker forGET /v1/sessions/{id}, so every frontend, including one that restarted, finds every session.- A session no worker holds answers
404; one whose worker stopped is gone with it.GET /v1/sessions(the list) spans workers and answers501.
The frontend passes the client’s Authorization header on, so a worker started with --api-key checks it as layerscale serve does. Prefill and decode workers refuse --sessions-addr.
Metrics and health
Dynamo owns the worker’s HTTP surface, on DYN_SYSTEM_PORT:
/liveand/healthanswer503until the engine is loaded and warmed up, then200. A worker whose engine stops exits with a non-zero status, so its supervisor restarts it./metricshas Dynamo’sdynamo_component_*families and, after them, everylayerscale_*family thatlayerscale serveexports, under the same names and labels. See the API reference. Requests served through Dynamo count in the request, token and latency families as they would on the HTTP API.- The worker also reports its KV pool to Dynamo, for rank 0:
dynamo_component_total_blocks,dynamo_component_gpu_cache_usage_percentanddynamo_component_kv_cache_hit_rate. The router uses the same numbers as a load signal.
Engine log lines are the same JSON objects as from layerscale serve, mixed with Dynamo’s own log lines.
KV-aware routing
With --router-mode kv on the frontend (DYN_ROUTER_MODE=kv), the router sends each request to the worker that already holds the most of its prompt in its prefix cache. Each worker tells the router what it holds. A page is reported when it enters the prefix cache: a prompt’s pages as its prefill computes them, the rest as its request finishes. It is reported again as removed when the pool evicts it.
Dynamo routes in blocks of 16 tokens, which is LayerScale’s KV page size, so a router block is one page. The worker registers that size, along with its context length, pool size and batch limits, when it joins.
The router starts empty for a worker that restarts: the worker tells it to forget what it held before. Pages written during the warm-up are not reported. With --no-prefix-cache the worker keeps no prefix cache, so it reports nothing and the router places its requests by load alone.
Disaggregated serving
Prefill and decode can run on separate workers, so a long prompt never stalls the decode steps of other requests:
worker() { # worker <gpu> <system port> <mode> docker run -d --gpus device=$1 --network host --pid host --ipc host --cap-add SYS_PTRACE --stop-timeout 30 \ -e LAYERSCALE_LICENSE_KEY=LSK-... \ -e DYN_DISCOVERY_BACKEND=file -e DYN_FILE_KV=/kv -v /tmp/dynamo-kv:/kv \ -e DYN_SYSTEM_PORT=$2 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ layerscale/layerscale:latest \ dynamo --model nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 --served-model-name nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 --disaggregation-mode $3}worker 0 9091 prefillworker 1 9092 decodeDYN_DISCOVERY_BACKEND=file DYN_FILE_KV=/tmp/dynamo-kv \ python -m dynamo.frontend --http-port 8000 --router-mode kvOn one machine, give each worker its own GPU, as above. --pid host, --ipc host and --cap-add SYS_PTRACE let each worker map the other’s memory: the KV goes GPU to GPU (CUDA IPC) and the workers’ notes through shared memory. Without them both go over TCP, and the first token waits for it. In Kubernetes, the same is hostPID: true, hostIPC: true and the SYS_PTRACE capability.
How a request runs:
- The frontend sends the request to a prefill worker and a decode worker at the same time. The prefill worker registers its address with Dynamo, so the decode worker knows where to find it.
- The decode worker reserves pages (and a state slot) for the prompt’s KV as soon as its half arrives. Pages its own prefix cache already holds for the prompt, such as an earlier turn of the conversation and its reply, are reused and not sent again. It tells the prefill worker where the pages are.
- The prefill worker computes the prompt’s KV up to its last token, and on a hybrid model the recurrent state at that point. It writes each chunk’s KV straight into the decode worker’s pages over NIXL, GPU to GPU, while it computes the next chunk, and the last pages and the state when it is done.
- Once every write has landed, the prefill worker tells the decode worker, frees its copy, and the decode worker generates. It computes the prompt’s last token itself, so it samples the first output token.
- When the decode worker’s prefix cache already holds all of the prompt but its last page, the decode worker runs the prompt itself and the prefill worker stops. A one-token prompt, a health-check request, or a request the router marks to run whole also runs start to finish on whichever worker gets it.
Under load:
- KV a prefill worker computes for a decode worker counts against its KV pool until its last write lands.
- Pages a decode worker reserves count against its KV pool while the prefill runs. A request cancelled before its KV lands keeps them until the prefill worker says no write is in flight, or 60 seconds.
- A decode worker without free pages for the KV runs the whole prompt itself instead of failing the request, and tells the prefill worker, which stops computing or frees its copy.
- Pages reserved or held for a transfer come back once it lands or is dropped. A request short only of them waits in the queue until they do, as an aggregated request waits for pages; it is not failed.
- A transfer that fails fails its request with the reason.
usage.prompt_tokens_details.cached_tokensreports the prompt tokens a worker did not compute: prefix-cache hits on an aggregated worker, the reused and transferred KV on a decode worker (and any prefix-cache hit past it).
Requirements:
- Both workers load the same model with the same
--tpand the same--kv-cache-dtype. The prefill worker checks the decode worker’s layout of the KV and the state before it writes, which covers the model’s configuration, the page geometry, the cache precision and an fp8 cache’s scales, and refuses a mismatch. - Every model runs disaggregated: attention-only models, hybrids with Gated DeltaNet, Mamba2 or KDA layers (with or without MTP), latent attention with its indexer (GLM-5.3-Flash), and models whose layers store KV of different widths, such as Gemma 4.
- On a model with sliding-window or chunked attention layers (gpt-oss, Gemma 4, Ripple-65B, Llama 4), a worker in
prefillordecodemode keeps those layers’ whole KV, as it keeps the other layers’. An aggregated worker keeps only their last window, so its pool holds more tokens on the same GPU. - KV-aware routing hears of the global layers’ cached pages. On a model with sliding-window layers a prefix also needs the window before its end to be reused, and that window may have been evicted, so the router can predict a longer hit than the worker then reuses.
- Prefill and decode workers must reach each other directly: NIXL’s metadata port, which each rank picks when it starts, and UCX’s transports. Allow pod-to-pod traffic between them.
- Transfers are neither authenticated nor encrypted, and a worker’s KV cache is readable and writable by any NIXL agent that reaches it. Keep the workers on a private network.
UCX picks the transport: CUDA IPC (NVLink) between GPUs of one node or NVLink domain, GPUDirect RDMA across nodes. The first time a prefill worker writes KV to a decode worker, it prints UCX’s protocol table for the write; its last column names the transport (cuda_ipc, rc_mlx5, or tcp when neither reaches).
On a GB200 or GB300 NVL72 rack, CUDA IPC also reaches the GPUs of other trays. It needs NVIDIA’s IMEX service running on every tray and an IMEX channel in each worker’s container: add --device /dev/nvidia-caps-imex-channels/channel0 to docker run. In Kubernetes, both workers claim a ComputeDomain from NVIDIA’s DRA driver for GPUs. Each worker’s kv_pool_export log line says fabric handles once the channel is there.
Kubernetes
With the Dynamo operator installed, deploy with a DynamoGraphDeployment. Two manifests follow: save the one you want, put the model on the model-cache claim, then apply it.
kubectl create secret generic layerscale-license --from-literal=license-key=LSK-...kubectl apply -f agg.yamlkubectl port-forward svc/layerscale-agg-frontend 8000:8000A frontend with the KV-aware router and session affinity, and one aggregated worker:
# LayerScale behind NVIDIA Dynamo, aggregated: a frontend with the KV-aware# router and one LayerScale worker that runs prefill and decode. For the# Dynamo Kubernetes operator (nvidia.com/v1beta1); see https://docs.layerscale.ai/deployment/dynamo/.## Before applying:# - the worker image below is the LayerScale image (or your mirror of it):# the loader runs the worker in it on `dynamo`;# - kubectl create secret generic layerscale-license --from-literal=license-key=LSK-...# - put the model directory on the PVC `model-cache` (here /models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4).# To load a Hugging Face repo id instead, pass it as --model, mount the PVC# at /root/.cache/huggingface (where the download is kept) and, for a# gated repo, set HF_TOKEN from a secret.## No spec.backendFramework: the operator applies no backend-specific rewrites# to a command it does not recognise, which is what a custom worker needs.apiVersion: nvidia.com/v1beta1kind: DynamoGraphDeploymentmetadata: name: layerscale-aggspec: components: - name: Frontend type: frontend replicas: 1 podTemplate: spec: containers: - name: main image: nvcr.io/nvidia/ai-dynamo/dynamo-frontend:1.6.2 env: - name: DYN_ROUTER_MODE value: kv # Each conversation (X-Dynamo-Session-ID, or a coding agent's session # header) stays on the worker holding its KV, once replicas > 1. - name: DYN_ROUTER_SESSION_AFFINITY_TTL_SECS value: "3600" - name: LayerscaleWorker type: worker # The Dynamo runtime the worker links. The operator otherwise reads it # from the image tag, which is LayerScale's, # and gates probe defaults and health checks on it. runtimeVersionOverride: "1.6.2" replicas: 1 podTemplate: spec: containers: - name: main image: layerscale/layerscale:latest command: - /app/layerscale-loader args: - dynamo - --model - /models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --served-model-name - nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --disaggregation-mode - agg env: - name: LAYERSCALE_LICENSE_KEY valueFrom: secretKeyRef: name: layerscale-license key: license-key resources: limits: nvidia.com/gpu: "1" volumeMounts: - name: models mountPath: /models readOnly: true volumes: - name: models persistentVolumeClaim: claimName: model-cacheA frontend, a prefill worker and a decode worker:
# LayerScale behind NVIDIA Dynamo, disaggregated: a frontend with the KV-aware# router, a prefill worker and a decode worker. The frontend sends a request# to both at once. The decode worker reserves pages for the prompt's KV past# what its own prefix cache holds and says where they are; the prefill worker# computes the KV (and a hybrid model's recurrent state) and writes each chunk# straight into those pages over NIXL as it goes, then the decode worker# generates. UCX picks the transport: CUDA IPC or NVLink inside a node or an# NVLink domain, GPUDirect RDMA across nodes. For the Dynamo Kubernetes# operator (nvidia.com/v1beta1); see https://docs.layerscale.ai/deployment/dynamo/.## Before applying:# - the worker image below is the LayerScale image (or your mirror of it):# the loader runs the worker in it on `dynamo`;# - kubectl create secret generic layerscale-license --from-literal=license-key=LSK-...# - put the model directory on the PVC `model-cache` (here /models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4),# ReadOnlyMany or ReadWriteMany when the workers land on different nodes.## Both workers must load the same model with the same --tp and --kv-cache-dtype:# the prefill worker refuses to write into KV laid out differently from its# own. Inside a node, UCX maps the other worker's memory (the KV over CUDA IPC,# the notes through shared memory), which needs the host's PID and IPC namespaces# and the SYS_PTRACE capability (hostPID, hostIPC and securityContext below);# without them both go over TCP. Across nodes, give both workers the RDMA NICs# (e.g. an rdma/ib resource from the NVIDIA Network Operator) so UCX can write# GPU to GPU. On a GB200 or GB300 NVL72 rack the KV crosses trays over NVLink# once both workers hold an IMEX channel: with NVIDIA's DRA driver for GPUs# installed, uncomment the ComputeDomain at the end and the `NVL72` lines in# both workers. Each worker's kv_pool_export log line then says "fabric handles".## No spec.backendFramework: the operator applies no backend-specific rewrites# to a command it does not recognise, which is what a custom worker needs.apiVersion: nvidia.com/v1beta1kind: DynamoGraphDeploymentmetadata: name: layerscale-disaggspec: components: - name: Frontend type: frontend replicas: 1 podTemplate: spec: containers: - name: main image: nvcr.io/nvidia/ai-dynamo/dynamo-frontend:1.6.2 env: - name: DYN_ROUTER_MODE value: kv # Each conversation (X-Dynamo-Session-ID, or a coding agent's session # header) stays on the decode worker holding its KV, once replicas > 1. - name: DYN_ROUTER_SESSION_AFFINITY_TTL_SECS value: "3600" - name: LayerscalePrefillWorker type: prefill # The Dynamo runtime the worker links. The operator otherwise reads it # from the image tag, which is LayerScale's, # and gates probe defaults and health checks on it. runtimeVersionOverride: "1.6.2" replicas: 1 podTemplate: spec: hostPID: true hostIPC: true # NVL72: the IMEX channel of the ComputeDomain at the end. # resourceClaims: # - name: imex-channel # resourceClaimTemplateName: layerscale-imex-channel containers: - name: main image: layerscale/layerscale:latest securityContext: capabilities: add: ["SYS_PTRACE"] command: - /app/layerscale-loader args: - dynamo - --model - /models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --served-model-name - nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --disaggregation-mode - prefill env: - name: LAYERSCALE_LICENSE_KEY valueFrom: secretKeyRef: name: layerscale-license key: license-key # The address the other worker reaches this one at. - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP resources: limits: nvidia.com/gpu: "1" # NVL72: # claims: # - name: imex-channel volumeMounts: - name: models mountPath: /models readOnly: true volumes: - name: models persistentVolumeClaim: claimName: model-cache - name: LayerscaleDecodeWorker type: decode runtimeVersionOverride: "1.6.2" replicas: 1 podTemplate: spec: hostPID: true hostIPC: true # NVL72: the IMEX channel of the ComputeDomain at the end. # resourceClaims: # - name: imex-channel # resourceClaimTemplateName: layerscale-imex-channel containers: - name: main image: layerscale/layerscale:latest securityContext: capabilities: add: ["SYS_PTRACE"] command: - /app/layerscale-loader args: - dynamo - --model - /models/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --served-model-name - nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 - --disaggregation-mode - decode env: - name: LAYERSCALE_LICENSE_KEY valueFrom: secretKeyRef: name: layerscale-license key: license-key - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP resources: limits: nvidia.com/gpu: "1" # NVL72: # claims: # - name: imex-channel volumeMounts: - name: models mountPath: /models readOnly: true volumes: - name: models persistentVolumeClaim: claimName: model-cache# NVL72: one ComputeDomain (resource.nvidia.com, NVIDIA's DRA driver for GPUs)# over the trays the two workers run on; numNodes is how many trays that is.# ---# apiVersion: resource.nvidia.com/v1beta1# kind: ComputeDomain# metadata:# name: layerscale-imex# spec:# numNodes: 2# channel:# resourceClaimTemplate:# name: layerscale-imex-channelWhat the manifests do and why:
- No
backendFramework. The operator recognises the engines that ship with Dynamo by their launch command. For any other command it applies no engine-specific changes, which is what this worker needs. It still adds the discovery settings,DYN_NAMESPACE,DYN_COMPONENT,DYN_SYSTEM_PORT=9090and the probes on/liveand/health, and the worker reads all of them. runtimeVersionOverrideon every worker, set to the Dynamo release the worker links (the frontend image’s tag). The operator reads the Dynamo version from the image tag, and a LayerScale image tag is not one. Without it, the operator refuses an image tag that is not a version, or misreads one that is (a0.1.0tag would turn off the health checks and tighten the liveness probe).- The image is the LayerScale image, and the command is
/app/layerscale-loader, its entrypoint. Set the command: without one, the operator starts the container with a shell. Theargsstart withdynamo, which selects the worker, followed by the worker’s flags. Name the containermain. - The license key comes from the
layerscale-licenseSecret, asLAYERSCALE_LICENSE_KEY. - The model is a directory on a PersistentVolumeClaim named
model-cache, mounted at/models. To load a Hugging Face repo id instead, pass it as--model, mount the claim at/root/.cache/huggingfaceso the download is kept, and setHF_TOKENfrom a Secret for a gated repo. nvidia.com/gpulimits set how many GPUs a worker sees.--tpdefaults to all of them. One worker is one pod: tensor parallelism stays within the pod, and multi-node workers are not supported.POD_IPon both workers ofdisagg.yaml, from the pod’s status, is the address the other worker reaches it at.
Scale with replicas on each component. The operator’s startup probe gives a worker two hours to download, load and warm up; a startupProbe on the main container replaces it.
Profiling and SLA planning
Dynamo’s DynamoGraphDeploymentRequest profiles a model, picks a configuration for a latency target, and generates the deployment. Its backend field accepts only the engines bundled with Dynamo, and its profiler sizes deployments from performance models of those engines. LayerScale is not one of them, and that list cannot be extended without changing Dynamo itself. Dynamo’s SLA planner depends on the same profiling data.
Deploy LayerScale with a DynamoGraphDeployment, as above, and size replicas and the prefill/decode split from your own measurements.
Known limits
- Sessions. A conversation through Dynamo’s own endpoints keeps its worker, which holds it between turns (Conversations across workers); prefill and decode workers hold none, and a later turn reuses what the decode worker’s prefix cache holds. A new sessions API session goes to a worker the frontend picks by its id, without regard to how many sessions that worker already holds.
- KV block manager. Dynamo’s KVBM, which offloads KV blocks to host memory or disk and brings them back, is not integrated. The worker’s KV cache is LayerScale’s own paged pool on the GPU, with its own prefix cache.