Instructions to use gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4") model = AutoModelForCausalLM.from_pretrained("gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4", 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 gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gauravmm/GLM-4.5-Air-REAP-82B-A12B-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": "gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4
- SGLang
How to use gauravmm/GLM-4.5-Air-REAP-82B-A12B-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 "gauravmm/GLM-4.5-Air-REAP-82B-A12B-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": "gauravmm/GLM-4.5-Air-REAP-82B-A12B-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 "gauravmm/GLM-4.5-Air-REAP-82B-A12B-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": "gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4 with Docker Model Runner:
docker model run hf.co/gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4
GLM-4.5-Air-REAP-82B-A12B — NVFP4 (W4A16)
NVFP4 weight-only (W4A16) quantization of Cerebras'
GLM-4.5-Air-REAP-82B-A12B
— itself a REAP (router-weighted expert-activation pruning) prune of GLM-4.5-Air from
106B→82B total (12B active, 96 experts). This checkpoint quantizes the weights to NVFP4
(4-bit float E2M1, block-16 FP8-E4M3 micro-scale + FP32 per-tensor global scale, ≈4.5
bits/value) while keeping activations in BF16, so it loads and serves on a single 128 GB
DGX Spark / GB10. It was produced from the BF16 source (Cerebras recommends BF16 for
low-bit quant, avoiding stacked FP8→FP4 rounding) with a custom shard-by-shard streaming
quantizer that reuses compressed-tensors' own pack/scale primitives, emitting the standard
nvfp4-pack-quantized format — so it's a drop-in for vLLM with no custom code. On-disk size
is 51 GB (down from 159 GB BF16); served runtime footprint ≈89 GB. Benchmarked on vLLM at
prefill 163 / decode 158 tok/s (ShareGPT, concurrency 32, 64K context). The fused parallel
projections (q/k/v→qkv, gate/up→gate_up, expert w1/w3) share one weight_global_scale per
group — required for correct output under vLLM's fused MoE/attention layers.
Serving (vLLM)
vllm serve gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4 \
--quantization compressed-tensors \
--moe-backend marlin \
--trust-remote-code \
--max-model-len 65536 \
--kv-cache-dtype fp8
--moe-backend marlinis mandatory on this NVFP4 W4A16 checkpoint — the flashinfer_cutlass MoE backend rejects W4A16 NVFP4 and crashes engine-core init.
Provenance
GLM-4.5-Air (zai-org, MIT) → REAP prune (Cerebras) → NVFP4 W4A16 (this repo). License inherited from upstream: MIT.
- Downloads last month
- 40
Model tree for gauravmm/GLM-4.5-Air-REAP-82B-A12B-NVFP4
Base model
zai-org/GLM-4.5-Air