Instructions to use destr8803/GLM-5.2-224E-FP8-REAP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use destr8803/GLM-5.2-224E-FP8-REAP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="destr8803/GLM-5.2-224E-FP8-REAP") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("destr8803/GLM-5.2-224E-FP8-REAP") model = AutoModelForCausalLM.from_pretrained("destr8803/GLM-5.2-224E-FP8-REAP", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use destr8803/GLM-5.2-224E-FP8-REAP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "destr8803/GLM-5.2-224E-FP8-REAP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "destr8803/GLM-5.2-224E-FP8-REAP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/destr8803/GLM-5.2-224E-FP8-REAP
- SGLang
How to use destr8803/GLM-5.2-224E-FP8-REAP 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 "destr8803/GLM-5.2-224E-FP8-REAP" \ --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": "destr8803/GLM-5.2-224E-FP8-REAP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "destr8803/GLM-5.2-224E-FP8-REAP" \ --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": "destr8803/GLM-5.2-224E-FP8-REAP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use destr8803/GLM-5.2-224E-FP8-REAP with Docker Model Runner:
docker model run hf.co/destr8803/GLM-5.2-224E-FP8-REAP
GLM-5.2-224E-FP8-REAP
This is an independently produced, expert-pruned derivative of
zai-org/GLM-5.2-FP8. It is not
an official Z.ai release.
The checkpoint reduces each sparse MoE layer from 256 routed experts to 224 while preserving 8 active experts per token. Experts were selected with REAP scores computed from actual router weights and unweighted expert-output norms. The weights retain the source model's block-scaled FP8 format.
Model Details
| Property | Value |
|---|---|
| Base model | zai-org/GLM-5.2-FP8 |
| Architecture | GlmMoeDsaForCausalLM |
| Routed experts | 224 per sparse layer, reduced from 256 |
| Active experts | 8 per token |
| Hidden layers | 78 |
| Weight format | FP8, block size 128 x 128 |
| Weight shards | 141 Safetensors files |
| Weight payload | 663,759,907,008 bytes (618.17 GiB) |
| Source payload | 755,617,140,416 bytes |
| Payload reduction | 12.2% |
| License | MIT, inherited from the base model |
Pruning Method
REAP calibration used 12,228 samples and 15,425,969 tokens across general, code, reasoning, and agentic data. For every routed expert, the score was the conditional mean of:
actual_router_weight * L2(unweighted_expert_output)
The 32 lowest-scoring experts in each of the 75 sparse layers were removed. The derivative was built directly from the immutable 256-expert source; it was not produced by repeatedly pruning another derivative.
Keep-map SHA-256:
6845c6d68d39934a5866b12b1222cd29da214b1080485cf39d8a9986b7c203f6
Validation
- Deep checkpoint validation: 104,037 of 104,037 tensors passed, with zero errors.
- Runtime functional checks: 4 of 4 passed, covering arithmetic, exact instruction following, long-context retrieval, and structured tool calling.
- Maximum context validated on the tested runtime: 131,072 tokens with BF16 KV cache.
- Aggregate context matrix passed at 16 x 8K, 8 x 16K, 4 x 32K, 2 x 64K, and 1 x 126K.
- Sequential decode: 20.8689 output tokens/s on the tested 8-HPU setup.
- Concurrent decode: 263.5073 aggregate output tokens/s for 16 requests with 128 output tokens each.
Preliminary GPQA Check
A 10-question GPQA Diamond smoke sample scored 9/10 (90.0%) with no request
errors or malformed answers. The published base-model score is 91.2%, but this
small sample is not statistically sufficient for an exact quality comparison.
It used the OpenAI simple-evals zero-shot chain-of-thought prompt with
temperature=1.0 and top_p=0.95.
Deployment
The checkpoint was qualified with vLLM-Gaudi using tensor parallel 8, expert parallel 8, BF16 KV cache, and MTP disabled. A representative configuration is:
vllm serve destr8803/GLM-5.2-224E-FP8-REAP \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--kv-cache-dtype auto \
--max-model-len 131072
Hardware capacity, graph configuration, and supported context length depend on the inference backend. The architecture advertises a larger nominal context, but this derivative has only been runtime-qualified through 131,072 tokens.
GLM-5.2 uses thinking by default. Keep the default maximum reasoning effort for benchmark reproduction; explicitly configure the serving framework if a lower reasoning effort or disabled thinking is desired.
Limitations
- This is a structural MoE pruning derivative. Removing experts can affect quality unevenly across domains even when aggregate smoke tests pass.
- The full official GLM-5.2 benchmark suite has not been reproduced.
- The preliminary 10-question GPQA result must not be interpreted as a complete benchmark result.
- Only the BF16 KV-cache runtime profile is quality-qualified. FP8 KV cache was not accepted for this release.
- Deployment requires substantial storage and accelerator memory.
The base model's intended-use, safety, and language limitations continue to
apply. Review the
zai-org/GLM-5.2 model card before
deployment.
License and Attribution
This derivative is distributed under the MIT license included in the repository. GLM-5.2 was created by Z.ai and Tsinghua University. Please cite the original technical report:
@misc{glm5team2026glm5vibecodingagentic,
title={GLM-5: from Vibe Coding to Agentic Engineering},
author={GLM-5-Team},
year={2026},
eprint={2602.15763},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2602.15763}
}
- Downloads last month
- 19
Model tree for destr8803/GLM-5.2-224E-FP8-REAP
Base model
zai-org/GLM-5.2-FP8