GLM-5.1-NVFP4 / README.md
frida-a's picture
Update README.md
5398cfa verified
---
pipeline_tag: text-generation
base_model:
- zai-org/GLM-5.1
license: mit
library_name: Model Optimizer
tags:
- nvidia
- ModelOpt
- quantized
- 4-bit precision
- FP4
- fp4
---
# Model Overview
## Description:
The NVIDIA GLM-5.1 NVFP4 model is the quantized version of ZAI’s GLM-5.1 model, which is an auto-regressive language model that uses an optimized transformer architecture. For more information, please check [here](https://huggingface.co/zai-org/GLM-5.1). The NVIDIA GLM-5.1 NVFP4 model is quantized with [Model Optimizer](https://github.com/NVIDIA/Model-Optimizer).
This model is ready for commercial/non-commercial use. <br>
## Third-Party Community Consideration
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to Non-NVIDIA [(GLM-5.1) Model Card](https://huggingface.co/zai-org/GLM-5.1) from ZAI.
## References
Nvidia Model Optimizer: https://github.com/NVIDIA/Model-Optimizer
### License/Terms of Use:
[MIT License](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md)
### Deployment Geography:
Global <br>
### Use Case: <br>
Developers looking to take off-the-shelf, pre-quantized models for deployment in AI Agent systems, chatbots, RAG systems, and other AI-powered applications. <br>
### Release Date: <br>
Huggingface 05/19/2026 via https://huggingface.co/nvidia/GLM-5.1-NVFP4 <br>
## Model Architecture:
**Architecture Type:** Transformers <br>
**Network Architecture:** GLM-5.1 <br>
**Number of Model Parameters:** 754B in total and 40B activated <br>
## Input:
**Input Type(s):** Text <br>
**Input Format(s):** String <br>
**Input Parameters:** One-Dimensional (1D) <br>
**Other Properties Related to Input:** Context length up to 200K <br>
## Output:
**Output Type(s):** Text <br>
**Output Format:** String <br>
**Output Parameters:** 1D (One-Dimensional): Sequences <br>
**Other Properties Related to Output:** None <br>
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA’s hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions. <br>
## Software Integration:
**Supported Runtime Engine(s):** <br>
* SGLang <br>
* vLLM <br>
**Supported Hardware Microarchitecture Compatibility:** <br>
* NVIDIA Blackwell <br>
**Preferred Operating System(s):** <br>
* Linux <br>
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
## Model Version(s):
The model version is NVFP4 1.0 version and is quantized with nvidia-modelopt **v0.45.0** <br>
## Training, Testing, and Evaluation Datasets:
We calibrated the model using the dataset noted below, and performed evaluation using the benchmarks noted under Evaluation Datasets.
We did not perform training or testing for this Model Optimizer release. The methods noted under Training and Testing Datasets below represent the data collection and labeling methods used by the third-party to train and test the underlying model.<br>
## Calibration Dataset:
**Link:** [Nemotron-SFT-Instruction-Following-Chat-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Instruction-Following-Chat-v2), [Nemotron-Science-v1](https://huggingface.co/datasets/nvidia/Nemotron-Science-v1), [Nemotron-Competitive-Programming-v1](https://huggingface.co/datasets/nvidia/Nemotron-Competitive-Programming-v1), [Nemotron-SFT-Agentic-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Agentic-v2), [Nemotron-Math-v2](https://huggingface.co/datasets/nvidia/Nemotron-Math-v2), [Nemotron-SFT-SWE-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-SWE-v2), [Nemotron-SFT-Multilingual-v1](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Multilingual-v1) <br>
**Data Collection Method by dataset:** Hybrid: Human, Synthetic, Automated. <br>
**Labeling method:** Hybrid: Human, Automated. <br>
**Properties:** Nemotron-SFT-Instruction-Following-Chat-v2 contains ~2M synthetic chat samples designed to strengthen open-ended chat and precise instruction following capabilities. Nemotron-Science-v1 is a synthetic science reasoning dataset with ~226K samples covering GPQA-style science questions and chemistry problems to enhance LLM reasoning in scientific domains. Nemotron-Competitive-Programming-v1 is a large-scale synthetic coding dataset with 2M+ Python and 1M+ C++ samples spanning 34K+ competitive programming questions for code completion and critique. Nemotron-SFT-Agentic-v2 contains ~992K samples of tool-calling trajectories, customer service conversations, and web-search trajectories to train interactive, tool-using agents. Nemotron-Math-v2 is a large-scale mathematical reasoning dataset with ~347K problems and 7M model-generated reasoning trajectories across multiple reasoning modes and tool-use configurations. Nemotron-SFT-SWE-v2 contains ~256K software engineering samples including agentic SWE trajectories and agentless code localization, repair, and test generation samples for SWE-Bench style tasks. Nemotron-SFT-Multilingual-v1 contains ~3M multilingual reasoning samples translated from math, code, and STEM data into German, French, Japanese, Italian, Chinese, and Spanish. <br>
## Training Dataset:
**Data Modality:** Undisclosed <br>
**Data Collection Method by dataset:** Undisclosed <br>
**Labeling Method by dataset:** Undisclosed<br>
**Properties:** Undisclosed
## Testing Dataset:
**Data Collection Method by dataset:** Undisclosed <br>
**Labeling Method by dataset:** Undisclosed <br>
**Properties:** Undisclosed <br>
## Evaluation Dataset:
**Datasets:** GPQA Diamond, SciCode, AIME 2026, IFBench, AA-LCR <br>
**Data Collection Method by dataset:** Hybrid: Automated, Human <br>
**Labeling Method by dataset:** Hybrid: Human, Automated <br>
**Properties:** We evaluated the model on text-based reasoning, coding, agentic tool-use, and multimodal benchmarks: GPQA Diamond contains 448 graduate-level multiple-choice questions written by domain experts in biology, physics, and chemistry; SciCode evaluates scientific coding capabilities; AIME 2026 consists of 30 olympiad-level math problems from the 2026 American Invitational Mathematics Examination, testing mathematical reasoning across algebra, geometry, number theory, combinatorics, and probability; IFBench is a benchmark for evaluating instruction-following capabilities across diverse and structured task constraints; AA-LCR (Artificial Analysis Long Context Recall) evaluates a model's ability to accurately retrieve and recall information from long input contexts. <br>
## Inference:
**Acceleration Engine:** SGLang, vLLM <br>
**Test Hardware:** B300, B200 <br>
## Post Training Quantization
This model was obtained by quantizing the weights and activations of GLM-5.1 to NVFP4 data type, ready for inference with SGLang and vLLM. Only the weights and activations of the linear operators within transformer blocks in MoE experts are quantized. The shared expert is not quantized.
## Usage
### SGLang
To serve this checkpoint with [SGLang](https://github.com/sgl-project/sglang), you can start the docker `lmsysorg/sglang:dev-cu13` (the `cu13` variant is required for B300; for other GPUs, use the corresponding build) and run the sample command below:
```sh
python3 -m sglang.launch_server \
--model nvidia/GLM-5.1-NVFP4 \
--tensor-parallel-size 8 \
--quantization modelopt_fp4 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--trust-remote-code \
--chunked-prefill-size 131072 \
--mem-fraction-static 0.80
```
### vLLM
To serve this checkpoint with [vLLM](https://github.com/vllm-project/vllm), you can use the docker image `vllm/vllm-openai:v0.19.1` and run the sample command below:
```sh
vllm serve nvidia/GLM-5.1-NVFP4 \
--tensor-parallel-size 8 \
--trust-remote-code \
--gpu-memory-utilization 0.95 \
--port 8000
```
To enable expert parallel, reasoning, and tool calling:
```sh
vllm serve nvidia/GLM-5.1-NVFP4 \
--tensor-parallel-size 8 \
--pipeline-parallel-size 1 \
--data-parallel-size 1 \
--enable-expert-parallel \
--trust-remote-code \
--gpu-memory-utilization 0.9 \
--reasoning-parser glm45 \
--tool-call-parser glm47 \
--enable-auto-tool-choice \
--enable-chunked-prefill \
--max-num-batched-tokens 8192 \
--max-num-seqs 1024 \
--model-loader-extra-config '{"enable_multithread_load": true, "num_threads": 128}' \
--chat-template-content-format string \
-cc.pass_config.fuse_allreduce_rms=False \
--host 0.0.0.0 \
--port 8000
```
## Evaluation
The accuracy benchmark results are presented in the table below (evaluated using vLLM):
<table>
<tr>
<td><strong>Precision</strong>
</td>
<td><strong>SciCode</strong>
</td>
<td><strong>IFBench</strong>
</td>
<td><strong>GPQA Diamond</strong>
</td>
<td><strong>Amie2026</strong>
</td>
<td><strong>LCR</strong>
</td>
</tr>
<tr>
<td>baseline (FP8)
</td>
<td>47.14
</td>
<td>76.56
</td>
<td>85.61
</td>
<td>96.67
</td>
<td>67.25
</td>
</tr>
<tr>
<td>NVFP4
</td>
<td>47.34
</td>
<td>76.33
</td>
<td>85.02
</td>
<td>96.67
</td>
<td>66.75
</td>
</tr>
</table>
> Baseline: [GLM-5.1-FP8](https://huggingface.co/zai-org/GLM-5.1-FP8).
> Benchmarked with vLLM (vllm/vllm-openai:v0.19.1), temperature=1.0, top_p=0.95, max num tokens 64000
## Model Limitations:
The base model was trained on data that contains toxic language and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
## Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://app.intigriti.com/programs/nvidia/nvidiavdp/detail).