TutorialsGB300
Serve a model from a GB300 workstation with SGLang
Start a model server on a GB300, check that it reuses what it has already read, get answers as JSON that follows your schema, and measure several conversations at once.
- Time
- 20 to 30 minutes with the small model, 45 to 60 with the larger one
- For
- A developer or an IT lead with a GB300 workstation
- Status
- NVIDIA’s public guide · not yet run by AI Deskside
What you will have
- A model running on the GB300, behind an OpenAI-compatible address on port 30000.
- Proof that the server reuses what it has already read in a conversation.
- Answers returned as JSON that always matches a schema you give, the form applications need.
What you need
- A GB300 workstation. NVIDIA wrote this guide for its DGX Station; AI Deskside has not run it on another maker’s GB300.
- Docker and the NVIDIA Container Toolkit:
nvidia-smimust show the GB300. - A Hugging Face account. A token is needed only for models that ask you to accept their terms.
- Internet access to Hugging Face and Docker Hub for the first start.
On this page
- Why SGLang here
- 1Let your account run Docker
- 2Choose the model
- 3Download the server
- 4Find the GB300 in the list of GPUs
- 5Start the server
- 6Check that it answers
- 7See the server reuse a conversation
- 8Get an answer as JSON that follows a schema
- 9Measure several conversations at once
- Stop and remove
- When something fails
- Before production
- Managed option
- Sources
- Fact sheet
Why SGLang here
SGLang is a model server, like vLLM. NVIDIA’s guide chooses it for the GB300 for two things. It keeps what it has already read: when a conversation continues, or several requests share the same instructions and documents, it does not read them again. And it can force an answer to follow a JSON schema, which matters for applications that extract fields from documents.
| Server | Use it when |
|---|---|
| SGLang | Many-turn conversations, questions over the same documents, agents, or JSON output at scale. |
| vLLM | You want the server with the most community recipes and the broadest model coverage. |
| TensorRT-LLM | You are going to production and can invest in exporting optimised engines. |
Step 1
Let your account run Docker
sudo usermod -aG docker $USER newgrp docker
Step 2
Choose the model
Start with the small model, to check that everything works, then switch to the larger one.
export HF_TOKEN="" export MODEL_HANDLE="Qwen/Qwen3-8B" export MAX_MODEL_LEN=8192
| Model | What to expect |
|---|---|
Qwen/Qwen3-8B | The guide’s default. About 16 GB to download, ready in 10 to 15 minutes. |
Qwen/Qwen3.6-35B-A3B | A mixture-of-experts model, about 3 billion parameters active. About 70 GB to download, 30 to 45 minutes before the first answer. |
meta-llama/Llama-3.3-70B-Instruct | Requires accepting its licence on Hugging Face, and a token in HF_TOKEN. |
Step 3
Download the server
The image built for CUDA 13 is required on this chip.
docker pull lmsysorg/sglang:latest-cu130
Step 4
Find the GB300 in the list of GPUs
nvidia-smi --query-gpu=index,name --format=csv,noheader
Look for the line NVIDIA GB300 and note its number. A workstation sold with a second card for the display, such as the Dell configuration in the catalogue (GB300 + RTX PRO 2000), can show two lines. If only the GB300 appears, --gpus all in the next step is enough. If two lines appear, replace --gpus all in the next step with --gpus '"device=N"', where N is the number of the GB300 line.
Step 5
Start the server
NVIDIA’s command. On a machine where Step 4 showed two lines, change --gpus all as said there.
docker run -d \
--name sglang-server \
--gpus all \
--ipc host \
--cap-add SYS_NICE \
--ulimit memlock=-1 \
--ulimit stack=67108864 \
-p 30000:30000 \
-e HF_TOKEN="$HF_TOKEN" \
-v "$HOME/.cache/huggingface/hub:/root/.cache/huggingface/hub" \
lmsysorg/sglang:latest-cu130 \
sglang serve --model-path "$MODEL_HANDLE" \
--host 0.0.0.0 \
--port 30000 \
--context-length $MAX_MODEL_LEN \
--mem-fraction-static 0.85 \
--attention-backend flashinfer \
--enable-cache-report| Setting | Why it is there on a GB300 |
|---|---|
--attention-backend flashinfer | The backend SGLang would pick by itself fails on this chip. FlashInfer is the safe choice. |
--cap-add SYS_NICE | Lets the server place its work on the right processor cores. Without it, a warning at every start. |
--enable-cache-report | Makes each answer say how many tokens were reused, which Step 7 reads. |
--mem-fraction-static 0.85 | The share of GPU memory given to the server. Lower it if the model does not load. |
-v …/huggingface/hub | Keeps the downloaded model on the disk, so the next start does not download it again. |
Follow the log until the server says it is ready, then leave with Ctrl+C:
docker logs -f sglang-server
INFO: Uvicorn running on http://0.0.0.0:30000
Step 6
Check that it answers
curl http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "'"$MODEL_HANDLE"'",
"messages": [{"role": "user", "content": "Explain quantum computing in simple terms."}],
"max_tokens": 256
}'Step 7
See the server reuse a conversation
Send a first question with a long instruction at the top, then send the same conversation again with one more question. The instruction is long on purpose: the server reuses text in blocks of 64 tokens, so a shorter beginning would not count.
## Turn 1
curl -s http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "'"$MODEL_HANDLE"'",
"messages": [
{"role": "system", "content": "You are an expert physics tutor who explains concepts clearly and concisely. You use real-world analogies and everyday examples to make abstract ideas concrete. When answering, first state the key concept in one sentence, then give a short explanation with an example."},
{"role": "user", "content": "What is the difference between speed and velocity?"}
],
"max_tokens": 256
}' | python3 -m json.tool
## Turn 2 — extends the same conversation
curl -s http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "'"$MODEL_HANDLE"'",
"messages": [
{"role": "system", "content": "You are an expert physics tutor who explains concepts clearly and concisely. You use real-world analogies and everyday examples to make abstract ideas concrete. When answering, first state the key concept in one sentence, then give a short explanation with an example."},
{"role": "user", "content": "What is the difference between speed and velocity?"},
{"role": "assistant", "content": "Speed is a scalar quantity that measures how fast an object moves, while velocity is a vector quantity that includes both speed and direction. For example, a car driving at 60 km/h has a speed of 60 km/h regardless of where it is headed. But if that car is driving 60 km/h north, that is its velocity — change direction to south and the velocity changes even though the speed stays the same."},
{"role": "user", "content": "Can you give me another example that shows why the distinction matters in real physics problems?"}
],
"max_tokens": 256
}' | python3 -m json.toolThe server logs how many tokens it reused for each request:
docker logs sglang-server 2>&1 | grep "cached-token" | tail -10
A value above 0 on the second request is the proof. The time a request takes is not a reliable sign: a longer conversation can take longer even when its beginning is reused.
Caution. This check does not work with Qwen/Qwen3.6-35B-A3B and the other models of that family: the server does not carry their state from one request to the next, and the count stays at 0. That is expected. Check with the default Qwen/Qwen3-8B.
Step 8
Get an answer as JSON that follows a schema
Add a response_format to the request. The answer is then guaranteed to be valid JSON with the fields you asked for.
curl -s http://localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "'"$MODEL_HANDLE"'",
"messages": [
{"role": "user", "content": "List three programming languages with their primary use case and year created."}
],
"max_tokens": 512,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "languages",
"schema": {
"type": "object",
"properties": {
"languages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"primary_use": {"type": "string"},
"year_created": {"type": "integer"}
},
"required": ["name", "primary_use", "year_created"]
}
}
},
"required": ["languages"]
}
}
}
}' | python3 -m json.toolThe JSON object is in choices[0].message.content.
Step 9 (optional)
Measure several conversations at once
NVIDIA ships a small script with the guide. It runs 20 conversations of 5 turns in parallel and reports the time per turn and the tokens reused.
git clone https://github.com/NVIDIA/dgx-spark-playbooks cd dgx-spark-playbooks/nvidia/station-sglang-inference sudo apt update && sudo apt install -y python3-venv python3 -m venv .venv && source .venv/bin/activate pip install requests python3 assets/benchmark_multiturn.py \ --base-url http://localhost:30000 \ --model "$MODEL_HANDLE" \ --num-conversations 20 \ --turns-per-conversation 5 \ --cache-detail-file ./sglang_benchmark_cache_details.log
Later turns often take longer: the conversation has grown and 20 of them compete. Read the reused-token count, not the time, to judge the cache.
Stop and remove
docker stop sglang-server docker rm sglang-server
When something fails
| What you see | Cause | What to do |
|---|---|---|
An error naming buildNdTmaDescriptor at start-up | The default attention backend does not work on this chip | Keep --attention-backend flashinfer. |
FlashAttention v3 Backend requires SM>=80 and SM<=90 | The fa3 backend was selected | Use flashinfer. |
device >= 0 && device < num_gpus | The GPU number given does not exist | Run Step 4 again and give the number shown, as --gpus '"device=N"', or --gpus all when only the GB300 appears. |
| The server stops with an out-of-memory error | The model and its context do not fit in the share given | Lower --mem-fraction-static to 0.7, or lower --context-length. |
Token is required, or error 401 | A model that requires accepting its terms | Set HF_TOKEN and accept the licence on the model’s page. |
| Connection refused on port 30000 | The server is still loading | Wait for the Uvicorn line in the log. |
An error on json_schema | An older SGLang image | Use lmsysorg/sglang:latest-cu130. |
To do for a production deployment
Before you rely on it in production
Protect the address. The command publishes port 30000 to the whole network and sets no key.
Pin the image. The tag
latest-cu130moves; write down the version that worked and use it.Plan restarts: the first start takes 10 to 45 minutes depending on the model. Later starts reuse the downloaded model.
Choose the model with its architecture in mind: the models that do not carry their state between requests lose the reuse this server is chosen for.
Measure with your own documents and your own number of users before you promise a capacity. The script of Step 9 is a starting point, not your workload.
Where the commands come from
Sources
Read on 30 November 2026. Commands are copied from the sources. A step a source does not show is described in words.
Reference
Fact sheet
- Where this comes from
NVIDIA publishes a guide for serving a model with SGLang on its DGX Station, the GB300 reference machine. It gives the settings this chip needs and shows the two things SGLang is chosen for: reusing the part of a conversation already read, and JSON output that follows a schema.
- Machine
Dell Pro Max with GB300 · 496 GB CPU + 252 GB GPU. A reference machine helps locate guidance; it does not establish identical behaviour on another maker’s system.
- Software
SGLang (image lmsysorg/sglang:latest-cu130), OpenAI-compatible API on port 30000
- Model
Qwen/Qwen3-8B to start, then Qwen/Qwen3.6-35B-A3B
- Evidence
Commands from NVIDIA’s playbooks (Apache 2.0), read 30 November 2026 at a fixed commit; the guide is dated 26 May 2026. Written by NVIDIA for its own DGX Station. AI Deskside has not run it yet, and the reference machine shown here is another maker’s GB300 workstation.
- Still open
- Behaviour on a GB300 workstation from another maker
- Whether a second display card changes the GPU number on your machine
- Speed and number of simultaneous users for your own workload
- The SGLang version behind the moving image tag on the day you install
