跳到导航

Qwen4-35B-A3B

Serve Qwen4-35B-A3B with Dynamo using vLLM on B200.

Serve Qwen/Qwen4-35B-A3B-FP8, a 35B mixture-of-experts model with about 3B active parameters that takes text, image and video input, with NVIDIA Dynamo using vLLM on B200. The frontend routes each request to the worker that already holds its prefix in KV cache. This recipe is functional only; no performance claim is made.

Deployment target

GPUs 2x B200 (2 workers)Parallelism Single GPU per workerSpeculative decoding Disabled

Prerequisites

  • A Kubernetes cluster with the Dynamo platform installed and 2 B200 GPUs available. See the Kubernetes Deployment Guide.
  • A Hugging Face token with access to Qwen/Qwen4-35B-A3B-FP8.
  • Access to the runtime image referenced by the manifest.

Create the namespace and token secret:

export NAMESPACE=your-namespace
kubectl create namespace ${NAMESPACE}
kubectl create secret generic hf-token-secret \
--from-literal=HF_TOKEN="your-token" \
-n ${NAMESPACE}

Review storage paths, node placement, registry credentials, and resource claims before applying the manifest.

Deploy

Create the model cache and download the checkpoint:

Edit storageClassName in recipes/qwen4-35b-a3b/model-cache/model-cache.yaml to a ReadWriteMany class on your cluster before you apply it.

kubectl apply -f recipes/qwen4-35b-a3b/model-cache/model-cache.yaml -n ${NAMESPACE}
kubectl apply -f recipes/qwen4-35b-a3b/model-cache/model-download.yaml -n ${NAMESPACE}
kubectl wait --for=condition=Complete job/model-download -n ${NAMESPACE} --timeout=7200s

The Job downloads Qwen/Qwen4-35B-A3B-FP8 into the Hugging Face cache on the shared-model-cache PVC (HF_HOME=/shared-model-cache). Each worker mounts the PVC at /shared-model-cache and loads the model from the cache with HF_HUB_OFFLINE=1.

Deploy the DynamoGraphDeployment (DGD):

export DGD=qwen4-35b-a3b-vllm-b200-agg-chat
kubectl apply -f recipes/qwen4-35b-a3b/vllm/agg-b200/deploy.yaml -n ${NAMESPACE}

Add node selectors and tolerations for your cluster, and an image-pull secret if your registry needs one, in a private overlay; the manifest sets none of them.

Smoke Test

The deploy command sets DGD to the resource name. Wait for readiness and forward the frontend port:

kubectl wait --for=condition=Ready dynamographdeployment/${DGD} \
-n ${NAMESPACE} --timeout=3600s
kubectl port-forward svc/${DGD}-frontend 8000:8000 -n ${NAMESPACE}

In a second terminal, send a chat completion with the served model name Qwen/Qwen4-35B-A3B-FP8:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen4-35B-A3B-FP8","messages":[{"role":"user","content":"Reply with exactly: READY"}],"temperature":0,"max_tokens":2048}'

The model reasons before it answers. The reasoning is in reasoning_content and the answer in content. If content is empty, raise max_tokens.

Send an image. An image URL or a base64 data URL works:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen4-35B-A3B-FP8","messages":[{"role":"user","content":[{"type":"text","text":"Describe this image in one sentence."},{"type":"image_url","image_url":{"url":"https://raw.githubusercontent.com/ai-dynamo/dynamo/main/docs/fern/assets/img/frontpage-banner.png"}}]}],"max_tokens":2048}'

Send a video:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen4-35B-A3B-FP8","messages":[{"role":"user","content":[{"type":"text","text":"Describe this video in one sentence."},{"type":"video_url","video_url":{"url":"https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4"}}]}],"max_tokens":2048}'

Call a tool. The tool call is in tool_calls:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen4-35B-A3B-FP8","messages":[{"role":"user","content":"What is the weather in Paris?"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the current weather for a city","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}],"max_tokens":2048}'

Ask for structured output. content is a JSON object that matches the schema:

curl http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen4-35B-A3B-FP8","messages":[{"role":"user","content":"Name a fictional person and their age."}],"response_format":{"type":"json_schema","json_schema":{"name":"person","schema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"]}}},"max_tokens":2048}'

Benchmark

This recipe makes no performance claim and does not ship a benchmark Job.

Notes

  • Parsers and media. The workers set --enable-multimodal, --dyn-reasoning-parser qwen3 and --dyn-tool-call-parser qwen3_coder.
  • KV-aware routing. The frontend sets DYN_ROUTER_MODE=kv. Each worker sets --enable-prefix-caching and --kv-events-config so it publishes KV cache events to the router, and --no-disable-hybrid-kv-cache-manager.
  • Remote code. The frontend and the workers pass --trust-remote-code, which the checkpoint needs.
  • Status. This recipe is experimental.

Source