CoolFace
Modelpublic

dtometzki/GLM-4.7-Flash-FP8-Dynamic

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes30downloads
Model Card

GLM-4.7-Flash

<div align="center"> <img src=https://raw.githubusercontent.com/zai-org/GLM-4.5/refs/heads/main/resources/logo.svg width="15%"/> </div> <p align="center"> ๐Ÿ‘‹ Join our <a href="https://discord.gg/QR7SARHRxK" target="blank">Discord</a> community. <br> ๐Ÿ“– Check out the GLM-4.7 <a href="https://z.ai/blog/glm-4.7" target="blank">technical blog</a>, <a href="https://arxiv.org/abs/2508.06471" target="_blank">technical report(GLM-4.5)</a>. <br> ๐Ÿ“ Use GLM-4.7-Flash API services on <a href="https://docs.z.ai/guides/llm/glm-4.7">Z.ai API Platform. </a> <br> ๐Ÿ‘‰ One click to <a href="https://chat.z.ai">GLM-4.7</a>. </p>

Introduction

GLM-4.7-Flash is a 30B-A3B MoE model. As the strongest model in the 30B class, GLM-4.7-Flash offers a new option for lightweight deployment that balances performance and efficiency.

Performances on Benchmarks

BenchmarkGLM-4.7-FlashQwen3-30B-A3B-Thinking-2507GPT-OSS-20B
AIME 2591.685.091.7
GPQA75.273.471.5
LCB v664.066.061.0
HLE14.49.810.9
SWE-bench Verified59.222.034.0
ฯ„ยฒ-Bench79.549.047.7
BrowseComp42.82.2928.3

Evaluation Parameters

Default Settings (Most Tasks)

  • โ€”temperature: 1.0
  • โ€”top-p: 0.95
  • โ€”max new tokens: 131072

For multi-turn agentic tasks (ฯ„ยฒ-Bench and Terminal Bench 2), please turn on Preserved Thinking mode.

Terminal Bench, SWE Bench Verified

  • โ€”temperature: 0.7
  • โ€”top-p: 1.0
  • โ€”max new tokens: 16384

ฯ„^2-Bench

  • โ€”Temperature: 0
  • โ€”Max new tokens: 16384

For ฯ„^2-Bench evaluation, we added an additional prompt to the Retail and Telecom user interaction to avoid failure modes caused by users ending the interaction incorrectly. For the Airline domain, we applied the domain fixes as proposed in the Claude Opus 4.5 release report.

Serve GLM-4.7-Flash Locally

For local deployment, GLM-4.7-Flash supports inference frameworks including vLLM and SGLang. Comprehensive deployment instructions are available in the official Github repository.

vLLM and SGLang only support GLM-4.7-Flash on their main branches.

vLLM

  • โ€”using pip (must use pypi.org as the index url):
shell
pip install -U vllm --pre --index-url https://pypi.org/simple --extra-index-url https://wheels.vllm.ai/nightly
pip install git+https://github.com/huggingface/transformers.git

SGLang

  • โ€”Install the supported versions of SGLang and Transformers (using uv is recommended):
shell
uv pip install sglang==0.3.2.dev9039+pr-17247.g90c446848 --extra-index-url https://sgl-project.github.io/whl/pr/
uv pip install git+https://github.com/huggingface/transformers.git@76732b4e7120808ff989edbd16401f61fa6a0afa

transformers

using with transformers as

shell
pip install git+https://github.com/huggingface/transformers.git

and then run:

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL_PATH = "zai-org/GLM-4.7-Flash"
messages = [{"role": "user", "content": "hello"}]
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt",
)
model = AutoModelForCausalLM.from_pretrained(
    pretrained_model_name_or_path=MODEL_PATH,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
inputs = inputs.to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
output_text = tokenizer.decode(generated_ids[0][inputs.input_ids.shape[1]:])
print(output_text)

vLLM

shell
vllm serve dtometzki/GLM-4.7-Flash-FP8-Dynamic \
     --speculative-config.method mtp \
     --speculative-config.num_speculative_tokens 1 \
     --tool-call-parser glm47 \
     --reasoning-parser glm45 \
     --enable-auto-tool-choice \
     --served-model-name glm-4.7-flash