RedHatAI / GLM-5.2-NVFP4-FP8

huggingface.co
Total runs: 5.8K
24-hour runs: 0
7-day runs: -2.4K
30-day runs: -7.7K
Model's Last Updated: September 16 2026
text-generation

Introduction of GLM-5.2-NVFP4-FP8

Model Details of GLM-5.2-NVFP4-FP8

RedHatAI/GLM-5.2-FP8-NVFP4

This is a quantized version of zai-org/GLM-5.2 with MoE layers quantized to NVFP4 and attention layers quantized to FP8 block

Usage

This model is intended for deployment with vLLM and requires the following fix: https://github.com/vllm-project/vllm/pull/47780 . You can serve the model using

vllm serve RedHatAI/GLM-5.2-FP8-NVFP4 \
    --tensor_parallel_size 4 \
    --reasoning-parser glm45 \
    --tool-call-parser glm47 \
    --enable-auto-tool-choice \
    --kv_cache_dtype=fp8 \
Creation Process

This model was created using LLM Compressor . The example script can be found in examples/quantizing_moe/glm5_example.py [Example] GLM5.2 Example . Quantizing the model with data parallelism and 6xA100 takes about 3 hours.

LLM Compressor Creation Script
import torch
from compressed_tensors.offload import init_dist
from compressed_tensors.quantization.quant_scheme import (
    FP8_BLOCK,
    NVFP4,
    QuantizationScheme,
)
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer

from llmcompressor import oneshot
from llmcompressor.datasets.utils import get_rank_partition
from llmcompressor.modifiers.quantization import QuantizationModifier
from llmcompressor.utils import load_context

# Load the model
init_dist()
model_id = "zai-org/GLM-5.2"
with load_context():
    model = AutoModelForCausalLM.from_pretrained(
        model_id,
        device_map="auto_offload",
        max_memory={},
        offload_folder="/mnt/nvme-data/engine/kylesayrs/offload_folder",
    )
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Select calibration dataset.
DATASET_ID = "HuggingFaceH4/ultrachat_200k"
DATASET_SPLIT = "train_sft"

# Select number of samples. 512 samples is a good place to start.
# Increasing the number of samples can improve accuracy.
NUM_CALIBRATION_SAMPLES = 512
MAX_SEQUENCE_LENGTH = 2048

# Load dataset and preprocess.
ds = load_dataset(
    DATASET_ID, split=get_rank_partition(DATASET_SPLIT, NUM_CALIBRATION_SAMPLES)
)
ds = ds.shuffle(seed=42)


def preprocess(example):
    return {
        "text": tokenizer.apply_chat_template(
            example["messages"],
            tokenize=False,
        )
    }


ds = ds.map(preprocess)


# Tokenize inputs.
def tokenize(sample):
    return tokenizer(
        sample["text"],
        padding=False,
        max_length=MAX_SEQUENCE_LENGTH,
        truncation=True,
        add_special_tokens=False,
    )


ds = ds.map(tokenize, remove_columns=ds.column_names)

# Configure the quantization algorithm to run.
recipe = QuantizationModifier(
    config_groups={
        "attention_shared_experts": QuantizationScheme(
            targets=[r"re:.*self_attn\..*"],
            **FP8_BLOCK,
        ),
        "mlp": QuantizationScheme(
            targets=[r"re:.*mlp\..*"],
            **NVFP4,
        ),
    },
    ignore=[
        r"re:^model\.layers\.[0-2]\..*"
        r"re:.*mlp\.gate.*",  # not technically necessary
        r"re:.*indexer\.weights_proj$",  # sensitive to quantization
        r"lm_head",
    ],
)

# Apply algorithms.
oneshot(
    model=model,
    dataset=ds,
    batch_size=4,
    recipe=recipe,
    shuffle_calibration_samples=False,
)

# Save to disk compressed.
# Note: base checkpoint generation_config needs fixing for newer transformers versions
model.generation_config.top_p = None
SAVE_DIR = (
    "/mnt/nvme-data/engine/kylesayrs/"
    + model_id.rstrip("/").split("/")[-1]
    + "-NVFP4-FP8-fp32scales"
)
model.save_pretrained(SAVE_DIR, save_compressed=True)
tokenizer.save_pretrained(SAVE_DIR)

torch.distributed.destroy_process_group()
Evaluation
Benchmark zai-org/GLM-5.2 RedHatAI/GLM-5.2-NVFP4-FP8
GPQA-Diamond 91.2 89.1

Runs of RedHatAI GLM-5.2-NVFP4-FP8 on huggingface.co

5.8K
Total runs
0
24-hour runs
0
3-day runs
-2.4K
7-day runs
-7.7K
30-day runs

More Information About GLM-5.2-NVFP4-FP8 huggingface.co Model

More GLM-5.2-NVFP4-FP8 license Visit here:

https://choosealicense.com/licenses/mit

GLM-5.2-NVFP4-FP8 huggingface.co

GLM-5.2-NVFP4-FP8 huggingface.co is an AI model on huggingface.co that provides GLM-5.2-NVFP4-FP8's model effect (), which can be used instantly with this RedHatAI GLM-5.2-NVFP4-FP8 model. huggingface.co supports a free trial of the GLM-5.2-NVFP4-FP8 model, and also provides paid use of the GLM-5.2-NVFP4-FP8. Support call GLM-5.2-NVFP4-FP8 model through api, including Node.js, Python, http.

GLM-5.2-NVFP4-FP8 huggingface.co Url

https://huggingface.co/RedHatAI/GLM-5.2-NVFP4-FP8

RedHatAI GLM-5.2-NVFP4-FP8 online free

GLM-5.2-NVFP4-FP8 huggingface.co is an online trial and call api platform, which integrates GLM-5.2-NVFP4-FP8's modeling effects, including api services, and provides a free online trial of GLM-5.2-NVFP4-FP8, you can try GLM-5.2-NVFP4-FP8 online for free by clicking the link below.

RedHatAI GLM-5.2-NVFP4-FP8 online free url in huggingface.co:

https://huggingface.co/RedHatAI/GLM-5.2-NVFP4-FP8

GLM-5.2-NVFP4-FP8 install

GLM-5.2-NVFP4-FP8 is an open source model from GitHub that offers a free installation service, and any user can find GLM-5.2-NVFP4-FP8 on GitHub to install. At the same time, huggingface.co provides the effect of GLM-5.2-NVFP4-FP8 install, users can directly use GLM-5.2-NVFP4-FP8 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

GLM-5.2-NVFP4-FP8 install url in huggingface.co:

https://huggingface.co/RedHatAI/GLM-5.2-NVFP4-FP8

Url of GLM-5.2-NVFP4-FP8

GLM-5.2-NVFP4-FP8 huggingface.co Url

Provider of GLM-5.2-NVFP4-FP8 huggingface.co

RedHatAI
ORGANIZATIONS

Other API from RedHatAI

huggingface.co

Total runs: 26.2K
Run Growth: -15.7K
Growth Rate: -59.90%
Updated:May 18 2026
huggingface.co

Total runs: 20.9K
Run Growth: -11.8K
Growth Rate: -56.48%
Updated:April 29 2026