Instructions to use axteam/GLM-4.7-Flash-NVFP4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use axteam/GLM-4.7-Flash-NVFP4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="axteam/GLM-4.7-Flash-NVFP4A16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("axteam/GLM-4.7-Flash-NVFP4A16") model = AutoModelForCausalLM.from_pretrained("axteam/GLM-4.7-Flash-NVFP4A16", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use axteam/GLM-4.7-Flash-NVFP4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "axteam/GLM-4.7-Flash-NVFP4A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axteam/GLM-4.7-Flash-NVFP4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/axteam/GLM-4.7-Flash-NVFP4A16
- SGLang
How to use axteam/GLM-4.7-Flash-NVFP4A16 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 "axteam/GLM-4.7-Flash-NVFP4A16" \ --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": "axteam/GLM-4.7-Flash-NVFP4A16", "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 "axteam/GLM-4.7-Flash-NVFP4A16" \ --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": "axteam/GLM-4.7-Flash-NVFP4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use axteam/GLM-4.7-Flash-NVFP4A16 with Docker Model Runner:
docker model run hf.co/axteam/GLM-4.7-Flash-NVFP4A16
GLM-4.7-Flash Β· NVFP4A16 (W4A16, FP4 weights)
4-bit quantization of zai-org/GLM-4.7-Flash for vLLM serving. Quantized by axteam.
| Base model | zai-org/GLM-4.7-Flash |
| Method | NVFP4A16 (W4A16, FP4 weights) |
| Format | compressed-tensors nvfp4-pack-quantized |
| Weights / activations | W4A16 β FP4 (E2M1) weights group 16 + FP8 scale, BF16 activations |
| Architecture | MoE (GLM-4.7 Lite Β· Glm4MoeLite) Β· 31.2B Β· 202K context Β· text-only |
| Size on disk | ~17.6 GB |
| Calibration | None (data-free, name-based model_free_ptq) |
| License | mit |
Quantization details
- Scheme β W4A16 β FP4 (E2M1) weights group 16 + FP8 scale, BF16 activations, stored as compressed-tensors
nvfp4-pack-quantized. - Kept in BF16 β token embeddings, the LM head, and all RMSNorms. Only attention & MLP projections are quantized. In addition, the MoE router (
mlp.gate) and shared-expert gates are kept in BF16. - Post-training quantization (no retraining). Tokenizer /
chat_templateidentical to the original. - FP4 global scales are shared across the pairs vLLM fuses β
q_a_proj+kv_a_proj_with_mqa(MLA) andgate_proj+up_projof every routed and shared expert.
Revision 2026-10-31: the first upload of this repo (same day) quantized those pairs with separate global scales. vLLM runs each pair as one GEMM with one scale, so that build produced corrupted text. The weights were re-quantized and replaced; if you downloaded this repo before the fix, please download it again.
Usage (vLLM)
vllm serve axteam/GLM-4.7-Flash-NVFP4A16
License
Quantized derivative of zai-org/GLM-4.7-Flash (mit).
νκ΅μ΄ μμ½
zai-org/GLM-4.7-Flash λ₯Ό NVFP4A16 (W4A16, FP4 weights) λ‘ μμνν μλΉμ©(4-bit) λͺ¨λΈμ
λλ€. μμ±: axteam.
λ°©μ β FP4 κ°μ€μΉ 16λ¬Άμ + νμ±ν BF16. 4λΉνΈ μ€ νμ§ μ΅μκΈ. νμ compressed-tensors
nvfp4-pack-quantized.BF16 μ μ§ β μλ² λ©Β·LM ν€λΒ·λͺ¨λ norm. attentionΒ·MLP projection λ§ μμν. μΆκ°λ‘ MoE λΌμ°ν°(
mlp.gate)μ shared-expert κ²μ΄νΈλ BF16 μ μ§.PTQ(μ¬νμ΅ μμ), ν ν¬λμ΄μ Β·chat_template μλ³Έ λμΌ.
μμ 2026-10-31 β κ°μ λ μ²μ μ¬λ¦° λΉλλ vLLM μ΄ ν GEMM μΌλ‘ λ¬Άλ μ(MLA
q_a_proj+kv_a_proj_with_mqa, μ λ¬Έκ°gate_proj+up_proj)μ FP4 global scale μ΄ μλ‘ λ¬λΌ vLLM μμ κΉ¨μ§ μΆλ ₯μ λμ΅λλ€. μλ§λ€ scale μ 곡μ νλλ‘ λ€μ μμνν΄ κ΅μ²΄νμΌλ, μμ μ μ λ°μΌμ ¨λ€λ©΄ λ€μ λ°μ μ£ΌμΈμ.μ¬μ© β
vllm serve axteam/GLM-4.7-Flash-NVFP4A16. λΌμ΄μ μ€ mit.
- Downloads last month
- -
Model tree for axteam/GLM-4.7-Flash-NVFP4A16
Base model
zai-org/GLM-4.7-Flash