Image-Text-to-Text
Transformers
Safetensors
glm5_next
vllm
llm-compressor
nvfp4
fp4
conversational
8-bit precision
compressed-tensors
Instructions to use RedHatAI/GLM-5.3-Flash-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/GLM-5.3-Flash-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="RedHatAI/GLM-5.3-Flash-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RedHatAI/GLM-5.3-Flash-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("RedHatAI/GLM-5.3-Flash-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RedHatAI/GLM-5.3-Flash-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/GLM-5.3-Flash-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/GLM-5.3-Flash-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/RedHatAI/GLM-5.3-Flash-NVFP4
- SGLang
How to use RedHatAI/GLM-5.3-Flash-NVFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RedHatAI/GLM-5.3-Flash-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/GLM-5.3-Flash-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RedHatAI/GLM-5.3-Flash-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/GLM-5.3-Flash-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use RedHatAI/GLM-5.3-Flash-NVFP4 with Docker Model Runner:
docker model run hf.co/RedHatAI/GLM-5.3-Flash-NVFP4
| base_model: | |
| - zai-org/GLM-5.3-Flash | |
| tags: | |
| - vllm | |
| - llm-compressor | |
| - nvfp4 | |
| - fp4 | |
| - glm5_next | |
| pipeline_tag: image-text-to-text | |
| library_name: transformers | |
| # RedHatAI/GLM-5.3-Flash-NVFP4 | |
| This model is a quantized version of [zai-org/GLM-5.3-Flash](https://huggingface.co/zai-org/GLM-5.3-Flash). | |
| # Model Optimizations | |
| This model was obtained by quantizing the weights of zai-org/GLM-5.3-Flash to NVFP4, ready for inference with vLLM. | |
| Weights are quantized to FP4 with a group size of 16, and activations are quantized to FP4 with local per-group scaling. Only the weights and activations of the linear operators within transformer blocks are quantized using [LLM Compressor](https://github.com/vllm-project/llm-compressor). Vision tower, embedding, and output head layers are kept in their original precision. | |
| # vLLM Serving | |
| ```bash | |
| docker run --gpus all \ | |
| --privileged --ipc=host -p 8000:8000 \ | |
| -v ~/.cache/huggingface:/root/.cache/huggingface \ | |
| -e VLLM_ENGINE_READY_TIMEOUT_S=3600 \ | |
| vllm/vllm-openai:glm53-flash RedHatAI/GLM-5.3-Flash-NVFP4 \ | |
| --tensor-parallel-size 4 \ | |
| --no-enable-flashinfer-autotune \ | |
| --tool-call-parser glm47 \ | |
| --enable-auto-tool-choice \ | |
| --reasoning-parser glm45 | |
| ``` | |
| ## Enable Speculative Decoding | |
| ``` | |
| docker run --gpus all \ | |
| --privileged --ipc=host -p 8000:8000 \ | |
| -v ~/.cache/huggingface:/root/.cache/huggingface \ | |
| -e VLLM_ENGINE_READY_TIMEOUT_S=3600 \ | |
| -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \ | |
| vllm/vllm-openai:glm53-flash RedHatAI/GLM-5.3-Flash-NVFP4 \ | |
| --tensor-parallel-size 4 \ | |
| --no-enable-flashinfer-autotune \ | |
| --tool-call-parser glm47 \ | |
| --enable-auto-tool-choice \ | |
| --reasoning-parser glm45 \ | |
| --gpu-memory-utilization 0.85 \ | |
| --disable-custom-all-reduce \ | |
| --speculative-config '{"method":"mtp","num_speculative_tokens":5}' | |
| ``` | |
| # Evaluations | |
| | Benchmark | Metric | Avg Score | | |
| |---|---|---| | |
| | GPQA Diamond | `gpqa_pass@k:k=1` (3 seeds) | **90.57%** | | |
| | AIME25 | `pass@k:k=1&n=1` (8 seeds) | **86.67%** | | |
| | GSM8K Platinum CoT | `exact_match,strict-match` (3 seeds) | **97.74%** | | |
| | MATH-500 | `pass@k:k=1&n=1` (3 seeds) | **94.87%** | |