Get Started with GLM-5.3-Flash#
This guide provides the model-specific deployment procedure and request examples for GLM-5.3-Flash. Before proceeding, complete the main Get Started flow.
Prepare FFmpeg 8#
Video inference requires FFmpeg 8 and libavcodec.so.62. Obtain FFmpeg 8
from the FFmpeg 8.0 GitHub branch, and install the runtime
in a directory on the host. Image and text inference do not require FFmpeg.
The examples on this page use $HOME/nim/ffmpeg8. Verify the runtime before
starting the container:
export FFMPEG8_PATH="${FFMPEG8_PATH:-$HOME/nim/ffmpeg8}"
test -x "$FFMPEG8_PATH/bin/ffmpeg"
test -e "$FFMPEG8_PATH/lib/libavcodec.so.62"
Run NIM#
Connected Deployment#
Set the image, cache, and FFmpeg paths:
export NGC_API_KEY=<your-ngc-api-key> # optional for this NIM
export IMG_NAME=nvcr.io/nim/zai-org/glm-5.3-flash
export VERSION=2.1.2-variant
export LOCAL_NIM_CACHE="${LOCAL_NIM_CACHE:-$HOME/.cache/nim}"
export FFMPEG8_PATH="${FFMPEG8_PATH:-$HOME/nim/ffmpeg8}"
mkdir -p "$LOCAL_NIM_CACHE"
Start the container:
docker run -d --rm \
--name="glm-53-$VERSION" \
--gpus all \
--shm-size=16g \
-p 8000:8000 \
-e NGC_API_KEY="$NGC_API_KEY" \
-v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
-v "$FFMPEG8_PATH:/opt/ffmpeg8:ro" \
"$IMG_NAME:$VERSION"
For eligible public-catalog NIMs, you can omit NGC_API_KEY. For more
information, refer to Installation.
Air-Gapped Deployment#
Before starting the container in an air-gapped environment, transfer the
container image, model files, and FFmpeg 8 runtime to the host. Set
MODEL_PATH to the directory that contains the model files:
export IMG_NAME=nvcr.io/nim/zai-org/glm-5.3-flash
export VERSION=2.1.2-variant
export MODEL_PATH=/path/to/GLM-5.3-Flash
export FFMPEG8_PATH="${FFMPEG8_PATH:-$HOME/nim/ffmpeg8}"
Start the container with the local model directory:
docker run -d --rm \
--name="glm-53-$VERSION" \
--gpus all \
--shm-size=16g \
-p 8000:8000 \
-v "$MODEL_PATH:/model:ro" \
-e NIM_MODEL_PATH=/model \
-v "$FFMPEG8_PATH:/opt/ffmpeg8:ro" \
"$IMG_NAME:$VERSION"
The MODEL_PATH mount and NIM_MODEL_PATH setting are specific to the
air-gapped deployment in this guide.
Verify the Deployment#
After the container reports a ready state, query the models endpoint:
curl -s http://localhost:8000/v1/models
For a two-node deployment on DGX Spark, refer to Deploy on DGX Spark.
Control Reasoning Effort#
Thinking is always enabled for GLM-5.3-Flash. Use
reasoning_effort to control the reasoning budget. The default reasoning
effort is max.
Value |
Behavior |
Request Configuration |
|---|---|---|
Max |
Uses the largest reasoning budget and is the default. |
|
High |
Balances reasoning depth and latency. |
|
Low |
Uses a smaller reasoning budget for lower latency. |
|
For example, request low reasoning effort as follows:
curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-5.3-Flash",
"messages": [
{
"role": "user",
"content": "Briefly explain why the sky appears blue."
}
],
"reasoning_effort": "low"
}'
Send an Image Request#
Send an image URL in an OpenAI-compatible chat completion request:
curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-5.3-Flash",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image."
},
{
"type": "image_url",
"image_url": {
"url": "https://assets.ngc.nvidia.com/products/api-catalog/phi-3-5-vision/example1b.jpg"
}
}
]
}
],
"max_tokens": 1024
}'
Send a Video Request#
The container must have the FFmpeg 8 runtime mounted at /opt/ffmpeg8 before
you send a video request.
curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-5.3-Flash",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe what happens in this video."
},
{
"type": "video_url",
"video_url": {
"url": "https://blogs.nvidia.com/wp-content/uploads/2023/04/nvidia-studio-itns-wk53-scene-in-omniverse-1280w.mp4"
}
}
]
}
],
"max_tokens": 1600
}'