Instructions to use zai-org/GLM-5.2-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-5.2-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-5.2-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5.2-FP8") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-5.2-FP8", 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]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zai-org/GLM-5.2-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/GLM-5.2-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5.2-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-5.2-FP8
- SGLang
How to use zai-org/GLM-5.2-FP8 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 "zai-org/GLM-5.2-FP8" \ --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": "zai-org/GLM-5.2-FP8", "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 "zai-org/GLM-5.2-FP8" \ --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": "zai-org/GLM-5.2-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-5.2-FP8 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-5.2-FP8
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- model-00104-of-00141.safetensors +3 -0
- model-00105-of-00141.safetensors +3 -0
- model-00108-of-00141.safetensors +3 -0
- model-00109-of-00141.safetensors +3 -0
- model-00110-of-00141.safetensors +3 -0
- model-00111-of-00141.safetensors +3 -0
- model-00112-of-00141.safetensors +3 -0
- model-00113-of-00141.safetensors +3 -0
- model-00114-of-00141.safetensors +3 -0
- model-00115-of-00141.safetensors +3 -0
- model-00116-of-00141.safetensors +3 -0
- model-00117-of-00141.safetensors +3 -0
- model-00118-of-00141.safetensors +3 -0
- model-00119-of-00141.safetensors +3 -0
- model-00120-of-00141.safetensors +3 -0
- model-00121-of-00141.safetensors +3 -0
- model-00123-of-00141.safetensors +3 -0
- model-00124-of-00141.safetensors +3 -0
- model-00125-of-00141.safetensors +3 -0
- model-00126-of-00141.safetensors +3 -0
- model-00127-of-00141.safetensors +3 -0
- model-00128-of-00141.safetensors +3 -0
- model.safetensors.index.json +3 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
.tmpUMarya filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
.tmpUMarya filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
|
model-00104-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7743c92ba1d72440023822615460130129f84446e70c97130fa14a74221fdd75
|
| 3 |
+
size 5364883208
|
model-00105-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:549bb6d2ec8f1c66f48d9ec3c17f1e1fa7014663d3757f94426cc816f666238c
|
| 3 |
+
size 5363207032
|
model-00108-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4241bcc1d489cf8582f4fe011babd101ebe73272ed64af3636408636ed05deab
|
| 3 |
+
size 5366353504
|
model-00109-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca341526629c6bfe480bf4ee4eac263768f7c4881bae52e3775e6bdca8024264
|
| 3 |
+
size 5361736648
|
model-00110-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa159d33e8ee327b2b7205348a8f15df334525555f85be20bc6f08c71e810776
|
| 3 |
+
size 5366353552
|
model-00111-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:241d439b7e9b70569f15b3e2de6ffe2b77833186732acee21a0dafa7efa9d350
|
| 3 |
+
size 5361736512
|
model-00112-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc74fd2104cd556ebcdc67178ac1112ec47badf2897f2bb25621b9d449e3d3e5
|
| 3 |
+
size 5366353688
|
model-00113-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5fced3cfb9e15a16777ca7bdb1db8cd70a15309ff07d76a9df5ac271b9be088
|
| 3 |
+
size 5361736376
|
model-00114-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fe881297d19e0d069124ad93e4adb67a25cf4e4715d7198813a75bd20904716
|
| 3 |
+
size 5363339432
|
model-00115-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36c153acebfbccd8df63ffd4f4fca78b627f92a784616507c71df0337af32fdf
|
| 3 |
+
size 5361736240
|
model-00116-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:155ce818f5f261d4a18f89a15b455e8a9cfa4553658a5d57836f90360d6ed8e6
|
| 3 |
+
size 5366353976
|
model-00117-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60d6418fbf49921f3a779b9de665eac4fa09fd8836d119b9f17e645a67bd1757
|
| 3 |
+
size 5366353488
|
model-00118-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32b0e7cef1f4ff476f9e5023c8030d0ccfe9b6e36f4f5b131ea1e0bb9fcb33c6
|
| 3 |
+
size 5361736696
|
model-00119-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de51f8e7466bb0b81c405402866877e2b76cd26e4597b6488222613cb7f051df
|
| 3 |
+
size 5366353304
|
model-00120-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74f4df573511b7f930353cfbc531ea9625312c0e4f8b7d3b59520bcbe7feb53d
|
| 3 |
+
size 5361735832
|
model-00121-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5cf63f85e5e7a668c26df6b9a079c35b9732ba1eb80d6cc300727c48d5cf092
|
| 3 |
+
size 5366353016
|
model-00123-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:301ae56f7af7e86daf8094a14c4008d1562ffeff0756d18c866e833ab4126abf
|
| 3 |
+
size 5363339256
|
model-00124-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f25bc1e47a5bea3b81ade742bb13cfe8372fc685454fbe00621c37417afaf947
|
| 3 |
+
size 5361736416
|
model-00125-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a4cd0172f2eb3d3f368f002fcffaeef89216d71fc2db87730e302385cdb18b1
|
| 3 |
+
size 5366353784
|
model-00126-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:621d4e7e495ff6901175ba8953a8d0a3ec506290c8603ae75e251655c9066f8d
|
| 3 |
+
size 5361736288
|
model-00127-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b11e9d34e59606e3c5a0f4ffec0059e66b54175c05b0f8028f82a0b1dea8f8cf
|
| 3 |
+
size 5366353920
|
model-00128-of-00141.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4b268efb029712075407238243815ef4165c89561c640054dadea174713e61a
|
| 3 |
+
size 5366353488
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0fe7f28c1f853d4824e4d796374e3dacf1fe470988773952c79b063768134bf
|
| 3 |
+
size 11359251
|