Text Generation
Transformers
Safetensors
English
Chinese
glm5_next
image-text-to-text
quantized
nvfp4
mxfp8
modelopt
distillation
quantization-aware-distillation
conversational
multimodal
8-bit precision
Instructions to use local-inference-lab/GLM-5.3-Flash-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use local-inference-lab/GLM-5.3-Flash-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="local-inference-lab/GLM-5.3-Flash-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("local-inference-lab/GLM-5.3-Flash-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("local-inference-lab/GLM-5.3-Flash-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use local-inference-lab/GLM-5.3-Flash-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "local-inference-lab/GLM-5.3-Flash-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "local-inference-lab/GLM-5.3-Flash-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/local-inference-lab/GLM-5.3-Flash-NVFP4
- SGLang
How to use local-inference-lab/GLM-5.3-Flash-NVFP4 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 "local-inference-lab/GLM-5.3-Flash-NVFP4" \ --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": "local-inference-lab/GLM-5.3-Flash-NVFP4", "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 "local-inference-lab/GLM-5.3-Flash-NVFP4" \ --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": "local-inference-lab/GLM-5.3-Flash-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use local-inference-lab/GLM-5.3-Flash-NVFP4 with Docker Model Runner:
docker model run hf.co/local-inference-lab/GLM-5.3-Flash-NVFP4
Reshape lil.yaml into serving, kernels, speculators, and override sections
Browse filesThe manifest carries only serving policy, kernel selection, speculators, and conditional launch layers. Architectures, attention heads, stored size, and MTP expert quantization are read by the launcher from config.json and the shard sizes at the resolved commit.
lil.yaml
CHANGED
|
@@ -1,32 +1,25 @@
|
|
| 1 |
schema_version: 1
|
| 2 |
kind: model
|
| 3 |
-
|
| 4 |
description: GLM-5.3 Flash with NVFP4 routed experts and an MXFP8 MTP expert layer
|
| 5 |
-
|
| 6 |
-
served_model_name: zai-org/GLM-5.3-Flash
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
default_tp_size: all
|
| 27 |
-
defaults:
|
| 28 |
-
environment:
|
| 29 |
-
INSTANTTENSOR_BUFFER_SIZE: "67108864"
|
| 30 |
-
INSTANTTENSOR_CHUNK_SIZE: "8388608"
|
| 31 |
-
mtp_moe_quantization: mxfp8
|
| 32 |
-
dflash2_model: local-inference-lab/GLM-5.3-Flash-DFlash2-MXFP8
|
|
|
|
| 1 |
schema_version: 1
|
| 2 |
kind: model
|
| 3 |
+
family: glm
|
| 4 |
description: GLM-5.3 Flash with NVFP4 routed experts and an MXFP8 MTP expert layer
|
| 5 |
+
serving:
|
| 6 |
+
served_model_name: zai-org/GLM-5.3-Flash
|
| 7 |
+
multimodal:
|
| 8 |
+
encoder_tp_mode: data
|
| 9 |
+
processor_cache_gb: 0
|
| 10 |
+
kernels:
|
| 11 |
+
quantization: modelopt_mixed
|
| 12 |
+
block_size: 256
|
| 13 |
+
flashinfer_autotune: false
|
| 14 |
+
speculators:
|
| 15 |
+
default: mtp
|
| 16 |
+
mtp:
|
| 17 |
+
tokens: 5
|
| 18 |
+
moe_quantization: mxfp8
|
| 19 |
+
attention: B12X
|
| 20 |
+
dflash:
|
| 21 |
+
tokens: 7
|
| 22 |
+
model: local-inference-lab/GLM-5.3-Flash-DFlash2-MXFP8
|
| 23 |
+
environment:
|
| 24 |
+
INSTANTTENSOR_BUFFER_SIZE: "67108864"
|
| 25 |
+
INSTANTTENSOR_CHUNK_SIZE: "8388608"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|