Text Generation
Transformers
Safetensors
qwen3
feature-extraction
dflash
speculative-decoding
draft-model
block-diffusion
glm
custom_code
text-generation-inference
Instructions to use UCloud-org/GLM-5.2-FP8-DFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UCloud-org/GLM-5.2-FP8-DFlash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UCloud-org/GLM-5.2-FP8-DFlash", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("UCloud-org/GLM-5.2-FP8-DFlash", trust_remote_code=True) model = AutoModel.from_pretrained("UCloud-org/GLM-5.2-FP8-DFlash", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use UCloud-org/GLM-5.2-FP8-DFlash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UCloud-org/GLM-5.2-FP8-DFlash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UCloud-org/GLM-5.2-FP8-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/UCloud-org/GLM-5.2-FP8-DFlash
- SGLang
How to use UCloud-org/GLM-5.2-FP8-DFlash 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 "UCloud-org/GLM-5.2-FP8-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UCloud-org/GLM-5.2-FP8-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "UCloud-org/GLM-5.2-FP8-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UCloud-org/GLM-5.2-FP8-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use UCloud-org/GLM-5.2-FP8-DFlash with Docker Model Runner:
docker model run hf.co/UCloud-org/GLM-5.2-FP8-DFlash
docs: self-citation, update-clipping recipe note, long-context limitation
Browse files
README.md
CHANGED
|
@@ -84,7 +84,7 @@ Also mirrored on ModelScope:
|
|
| 84 |
- Data: [JessieWei/GLM-5.2-FP8-nemotron-codealpaca](https://huggingface.co/datasets/JessieWei/GLM-5.2-FP8-nemotron-codealpaca)
|
| 85 |
— Nemotron-Post-Training-v2 + CodeAlpaca, ~800K samples (paper-specified recipe),
|
| 86 |
all responses regenerated by GLM-5.2-FP8 (non-thinking mode), max_length 3072
|
| 87 |
-
- Recipe: 6 epochs, AdamW, lr 6e-4 cosine (4% warmup), grad-clip 1.0, num_anchors 512,
|
| 88 |
loss_decay_gamma 7, pure cross-entropy (standard DFlash loss)
|
| 89 |
- Framework: SpecForge (offline hidden-state pipeline), FSDP2
|
| 90 |
|
|
@@ -92,6 +92,8 @@ Also mirrored on ModelScope:
|
|
| 92 |
|
| 93 |
- Trained on non-thinking-mode regenerated data; speedup under thinking-mode inference
|
| 94 |
has not been evaluated yet.
|
|
|
|
|
|
|
| 95 |
- Training corpus is English-dominant: acceptance length on Chinese-language
|
| 96 |
workloads is lower (ceval AL 2.98 vs 4.4-8.0 on English benchmarks).
|
| 97 |
|
|
@@ -104,6 +106,19 @@ GLM-5.2 by Zhipu AI.
|
|
| 104 |
|
| 105 |
## Citation
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
```bibtex
|
| 108 |
@misc{chen2026dflash,
|
| 109 |
title = {DFlash: Block Diffusion for Flash Speculative Decoding},
|
|
|
|
| 84 |
- Data: [JessieWei/GLM-5.2-FP8-nemotron-codealpaca](https://huggingface.co/datasets/JessieWei/GLM-5.2-FP8-nemotron-codealpaca)
|
| 85 |
— Nemotron-Post-Training-v2 + CodeAlpaca, ~800K samples (paper-specified recipe),
|
| 86 |
all responses regenerated by GLM-5.2-FP8 (non-thinking mode), max_length 3072
|
| 87 |
+
- Recipe: 6 epochs, AdamW with update clipping (StableAdamW-style), lr 6e-4 cosine (4% warmup), grad-clip 1.0, num_anchors 512,
|
| 88 |
loss_decay_gamma 7, pure cross-entropy (standard DFlash loss)
|
| 89 |
- Framework: SpecForge (offline hidden-state pipeline), FSDP2
|
| 90 |
|
|
|
|
| 92 |
|
| 93 |
- Trained on non-thinking-mode regenerated data; speedup under thinking-mode inference
|
| 94 |
has not been evaluated yet.
|
| 95 |
+
- Trained with `max_length` 3072: accept length degrades on very long prompts. For
|
| 96 |
+
long-context workloads, benchmark against the built-in MTP before choosing.
|
| 97 |
- Training corpus is English-dominant: acceptance length on Chinese-language
|
| 98 |
workloads is lower (ceval AL 2.98 vs 4.4-8.0 on English benchmarks).
|
| 99 |
|
|
|
|
| 106 |
|
| 107 |
## Citation
|
| 108 |
|
| 109 |
+
If you use this model, please cite:
|
| 110 |
+
|
| 111 |
+
```bibtex
|
| 112 |
+
@misc{ucloud2026glm52dflash,
|
| 113 |
+
title = {GLM-5.2-FP8-DFlash: A DFlash Speculative-Decoding Drafter for GLM-5.2-FP8},
|
| 114 |
+
author = {Wei, Xiaojun and {UCloud AILab}},
|
| 115 |
+
year = {2026},
|
| 116 |
+
howpublished = {\url{https://huggingface.co/UCloud-org/GLM-5.2-FP8-DFlash}}
|
| 117 |
+
}
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
This model is trained with the DFlash method — please also cite:
|
| 121 |
+
|
| 122 |
```bibtex
|
| 123 |
@misc{chen2026dflash,
|
| 124 |
title = {DFlash: Block Diffusion for Flash Speculative Decoding},
|