Get Started with Step 5 Preview#
This page shows you how to deploy Step 5 Preview using vLLM Model-Free NIM Experimental. The model-free container downloads model assets from a remote source at startup. For more information, refer to Model-Free NIM. For supported hardware, refer to the Support Matrix.
Step 5 Preview is a sparse mixture-of-experts model with 600 billion total parameters and 27 billion active parameters. Text input and image input are supported, but video input is not supported. The model context window is up to 1 million tokens.
For the generic NIM LLM and VLM onboarding path, refer to Quickstart. For full endpoint examples, refer to API Reference. For tool calling and MCP integration, refer to Tool Calling and MCP Integration.
Prerequisites#
Before deploying a NIM LLM and VLM container, ensure your environment meets the following requirements:
Hardware Requirements#
The following are the minimum required specifications for supported hardware components:
Requirement |
Specification |
|---|---|
CPU |
AMD64, ARM64 |
GPU |
Refer to the Support Matrix |
Software Requirements#
Minimum required versions for supported software components.
Requirement |
Specification |
|---|---|
Operating System |
Ubuntu 22.04 LTS or later recommended |
Container Toolkit |
1.14.0 or later |
CUDA SDK |
12.9 or later |
GPU Driver |
580 or later |
Docker |
24.0 or later |
Operating System#
While other Linux distributions can be compatible with NIM, they have not been officially validated.
We recommend using Ubuntu 22.04 LTS or later for the best experience.
CUDA SDK#
Install CUDA SDK by following the CUDA installation guide for Linux.
GPU Drivers#
Install the NVIDIA GPU drivers by following the NVIDIA Driver Installation Guide.
Docker#
Docker is required to run the containerized NIM services.
Install Docker Engine for your Linux distribution by following the Docker Engine installation guide.
Verify that the Docker daemon is running and that your user can execute
dockercommands withoutsudo. Add your user to thedockergroup if needed:sudo groupadd docker sudo usermod -aG docker $USER
Log out and back in for the group change to take effect.
Container Toolkit#
The NVIDIA Container Toolkit enables Docker containers to access the host GPU.
Install the toolkit by following the NVIDIA Container Toolkit installation guide.
Configure Docker to use the NVIDIA runtime by following the Docker configuration steps.
Restart the Docker daemon after configuration:
sudo systemctl restart docker
NIM Container Access#
To download and deploy NIM containers, you need one of the following:
A free NVIDIA Developer Program membership.
An NVIDIA AI Enterprise license. To request a free 90-day evaluation license, refer to Ways to Get Started With NVIDIA AI Enterprise and Activate Your NVIDIA AI Enterprise License.
Generate Access Credentials#
An NGC Personal API key is not required to access most NVIDIA NIM containers and models hosted on NGC. An NGC API key is only required to download Production Branch (PB) models. This Get Started documentation uses a feature branch model as an example, so creating an NGC Personal API key is optional.
If you want to create an NGC Personal API key, do the following:
Generate the Personal API Key on the Setup API Keys page.
When creating the Personal API key, select at least NGC Catalog from the Services Included list. You can also include additional services if you want to use the same key for other purposes.
Warning
Legacy API keys are not supported by NIM. Always use a Personal API Key.
Verify NVIDIA Runtime Access#
To ensure that your setup is correct, run the following command:
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
This command should produce output similar to one of the following, where you can confirm CUDA driver version, and available GPUs.
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05 Driver Version: 580.95.05 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA H100 80GB HBM3 On | 00000000:1B:00.0 Off | 0 |
| N/A 36C P0 112W / 700W | 78489MiB / 81559MiB | 0% Default |
| | | Disabled |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Configuration#
Use environment variables to control authentication and model caching.
Hugging Face Authentication#
If the model repository requires authentication, obtain a Hugging Face token with read access and accept any model access terms. Export the token before starting the container:
export HF_TOKEN="<your-hugging-face-token>"
Export NGC API Key#
Note
An NGC API key is only required to download Production Branch (PB) models. You can skip this section if you did not create an NGC API key.
Export the variable in your shell (temporary), replacing
<VALUE>with your actual API key:export NGC_API_KEY=<VALUE>
Persist the variable (optional):
If using bash:
echo "export NGC_API_KEY=$NGC_API_KEY" >> ~/.bashrc
If using zsh:
echo "export NGC_API_KEY=$NGC_API_KEY" >> ~/.zshrc
Verify the variable is set:
echo "$NGC_API_KEY"
Model Cache#
NIM downloads model weights to a cache on the host that you mount into the container. Artifacts persist across restarts, so you do not pull the full model on every run.
Local Cache#
An essential variable to configure on your host system is the cache path directory. This directory is mapped from the host machine to container; assets (for example, model weights) are downloaded to this host directory and persist across container restarts. Configuring a local cache is highly recommended, as it avoids re-downloading large model files upon subsequent container restarts. You can name the environment variable containing the path to the local cache whatever you want.
Create the cache directory and export an environment variable:
export LOCAL_NIM_CACHE=~/.cache/nim
mkdir -p $LOCAL_NIM_CACHE
# Optionally add sticky bit to avoid issues writing to the cache if the container is running as a different user
chmod -R a+rwxt $LOCAL_NIM_CACHE
When you start the NIM container, you must map your host machine’s local cache directory ($LOCAL_NIM_CACHE) to the container’s internal cache path (/opt/nim/.cache) using a Docker volume mount, such as -v "$LOCAL_NIM_CACHE:/opt/nim/.cache". This mapping ensures that the large model weights downloaded by the container are saved to your host machine. Because containers are ephemeral, any data stored only inside the container is lost when it stops. By using a volume mount, subsequent container runs detect the existing model files in your local cache and skip the lengthy download process, allowing the NIM to start up faster.
Cache Directory Permissions#
The NIM container runs as a non-root user with GID 0 (root group). The cache directory on your host must be writable by GID 0:
sudo chgrp -R 0 "$LOCAL_NIM_CACHE"
sudo chmod -R g+rwX "$LOCAL_NIM_CACHE"
Run the container with the cache mounted:
docker run --gpus all \
-v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
...
To run as a custom user (for example, your host user), pass -u <uid>:0:
docker run --gpus all -u $(id -u):0 \
-v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
...
Important
When using -u <uid>, you must include :0 to set GID 0 (for example,
-u $(id -u):0). The container’s writable directories are group-owned by GID 0.
Without it, the container will fail with PermissionError when writing to
cache, config, or log paths.
Tip
To make this setting permanent across terminal sessions, you can add export LOCAL_NIM_CACHE=~/.cache/nim to your ~/.bashrc or ~/.zshrc profile.
Custom Model Source#
You can configure model-free NIM to download a model from Hugging Face or other supported sources. To do this, specify the directory where the model files should be stored and set the appropriate environment variable.
The vLLM Model-Free NIM container is distributed through NGC. The model weights are supplied separately by the model publisher.
Specify a Hugging Face model directly using the hf:// prefix. Match the
checkpoint to the serving recipe you select for your hardware.
# For H20-3e and H200, FP8, about 650 GB
export NIM_MODEL_PATH="hf://stepfun-ai/Step-5-Preview"
# For B200 and GB200, NVFP4, about 394 GB
export NIM_MODEL_PATH="hf://stepfun-ai/Step-5-Preview-NVFP4"
Both Hugging Face repositories are public. HF_TOKEN avoids anonymous
download rate limits.
The NIM will automatically download the model from Hugging Face and cache it in your configured LOCAL_NIM_CACHE. When running the container, you will map your host machine’s local cache directory to a path inside the container using the -v flag. This ensures that the downloaded model weights persist on your host machine across ephemeral container restarts.
For example, using -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" tells Docker: “Take the folder at $LOCAL_NIM_CACHE on my host machine, and make it available inside the container at the path /opt/nim/.cache.”
Pull the Container Image#
Use the docker pull command to fetch the model-free NIM container from the NGC
registry:
docker pull nvcr.io/nim/nvidia/vllm-model-free-nim-experimental:2.1.6-variant
Download the Serving Recipe#
The container does not select a Step 5 Preview configuration automatically. Load the recipe file that matches your GPU as the NIM tuning config. Without a tuning config file, NIM starts with its generic defaults, which fall outside the validated configuration.
Recipe File |
Precision |
GPU |
GPUs |
Parallelism |
Speculative Decoding |
|---|---|---|---|---|---|
|
FP8 |
H20-3e |
8 |
TP8 |
MTP, 3 tokens |
|
FP8 |
H200 |
8 |
TP8 |
MTP, 3 tokens |
|
NVFP4 |
B200 |
4 |
TP4, DP1, expert parallel |
MTP, 3 tokens |
|
NVFP4 |
GB200 |
4 |
TP4, DP1, expert parallel |
MTP, 3 tokens |
Download the serving recipes from NGC and point
RECIPE at the file for your GPU:
ngc registry resource download-version "nim/nvidia/step5-preview-recipe:2.1.6-variant"
export RECIPE="$PWD/step5-preview-recipe_v2.1.6-variant/step5-preview-nvfp4-gb200-4gpu-tp4-dp1-ep-mtp3.yaml"
chmod 0644 "$RECIPE"
The NGC CLI saves downloaded files with mode 0600, owned by the host user.
The container runs as UID 1000, so it cannot read a 0600 file owned by a
different user and NIM fails to load NIM_CONFIG_FILE with Permission denied. The chmod changes only the file mode, not its contents.
Run NIM#
Mount the recipe file read-only and point NIM_CONFIG_FILE at the mount path.
Use --gpus 8 with the H20-3e and H200 recipes, and --gpus 4 with the B200
and GB200 recipes.
docker run --rm \
--gpus 4 \
--ipc=host \
--ulimit memlock=-1 \
--ulimit stack=67108864 \
-p 8000:8000 \
-v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
-v "$RECIPE:/opt/nim/step5-recipe.yaml:ro" \
-e NIM_MODEL_PATH="$NIM_MODEL_PATH" \
-e NIM_SERVED_MODEL_NAME=stepfun-ai/Step-5-Preview \
-e HF_TOKEN \
-e NIM_CONFIG_FILE=/opt/nim/step5-recipe.yaml \
nvcr.io/nim/nvidia/vllm-model-free-nim-experimental:2.1.6-variant \
nim-serve
On first start, NIM downloads the checkpoint into $LOCAL_NIM_CACHE, so the
cache needs room for the full checkpoint. Later starts reuse the cached copy.
Override a Recipe Setting#
Settings resolve in the following order, from lowest to highest priority: the
tuning config file, environment variables, NIM_PASSTHROUGH_ARGS, and
nim-serve command-line options. To change one value, pass it on the command
line, for example nim-serve --max-num-seqs 128. Changing recipe settings
moves the deployment outside the validated configuration.
Model Identifier#
Every request must send the served model identifier in the model field. The
launch command above sets it explicitly with NIM_SERVED_MODEL_NAME, so the
identifier matches the model ID: stepfun-ai/Step-5-Preview.
Interact with the API#
The NIM exposes OpenAI-compatible inference endpoints:
Chat Completions:
/v1/chat/completionsText Completions:
/v1/completionsResponses:
/v1/responses
Tip
Chat Completions, Text Completions, and Responses support streaming.
Verify Health Endpoints#
Verify that the NIM container is running by checking its health endpoints.
By default, these endpoints are served on port 8000. If you set
NIM_HEALTH_PORT, use that port instead.
Live Endpoint#
Check whether the server is running:
curl -v http://localhost:8000/v1/health/live
Example response:
GET /v1/health/live HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.81.0
Accept: */*
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json
Content-Length: 61
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate
{
"object": "health.response",
"message": "live",
"status": "live"
}
Ready Endpoint#
Check whether the model is fully loaded and ready for inference:
curl -v http://localhost:8000/v1/health/ready
Example response:
GET /v1/health/ready HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.81.0
Accept: */*
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json
Content-Length: 63
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate
{
"object": "health.response",
"message": "ready",
"status": "ready"
}
Send a Chat Completion Request#
After the server is running, you can send a request to the chat completion endpoint:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "stepfun-ai/Step-5-Preview",
"messages": [
{
"role": "user",
"content": "Hello! How are you?"
}
],
"max_tokens": 4096,
"temperature": 1.0,
"top_p": 0.95
}'
The vendor recommends temperature=1.0, top_p=0.95, and top_k=0.
To set vLLM’s top_k parameter explicitly, add "top_k": 0 to the JSON
request. The recipe file enables the step5 reasoning parser; allow enough
output tokens for both reasoning and the visible answer. If a response
ends with finish_reason: "length", increase max_tokens and retry.
Send an Image with a Text Prompt#
Include both text and image_url content parts in the request. The image URL
must be reachable from the container:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "stepfun-ai/Step-5-Preview",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe the image."},
{"type": "image_url", "image_url": {"url": "https://assets.ngc.nvidia.com/products/api-catalog/phi-3-5-vision/example1b.jpg"}}
]
}],
"max_tokens": 4096,
"temperature": 1.0,
"top_p": 0.95
}'
Streaming#
To receive responses incrementally as they are generated, enable streaming by
adding "stream": true to your request payload. Streaming is supported across
the /v1/chat/completions, /v1/completions, and /v1/responses endpoints.
When streaming is enabled, the API returns a sequence of Server-Sent Events (SSE).
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "stepfun-ai/Step-5-Preview",
"messages": [
{
"role": "user",
"content": "Write a short poem about a robot."
}
],
"max_tokens": 4096,
"temperature": 1.0,
"top_p": 0.95,
"stream": true
}'
For Chat Completions and Text Completions, the response streams back in chunks.
Each chunk contains a data JSON object. These streams terminate with a
data: [DONE] message:
data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"stepfun-ai/Step-5-Preview","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":null},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"stepfun-ai/Step-5-Preview","choices":[{"index":0,"delta":{"reasoning_content":"Hmm, the user asked"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"stepfun-ai/Step-5-Preview","choices":[{"index":0,"delta":{"content":"Steel"},"logprobs":null,"finish_reason":null}]}
...
data: [DONE]
For the Responses API, stream events use typed SSE events such as
response.output_text.delta and terminate with response.completed.