Instructions to use HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64") model = AutoModelForCausalLM.from_pretrained("HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64", 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 HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64
- SGLang
How to use HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64 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 "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64" \ --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": "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64", "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 "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64" \ --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": "HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64 with Docker Model Runner:
docker model run hf.co/HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64
GLM-5.3 Int4/Int8 mixed-precision round-to-nearest, group 64
A mixed-precision quantization of GLM-5.3 (754B-parameter MoE, model type glm_moe_dsa) made from the
original BF16 release (zai-org/GLM-5.3-BF16, not the derived FP8 checkpoint). Built for the
DGPP inference engine on four NVIDIA DGX Sparks (TP=4), where the whole model has to fit
in ~100 GiB per rank with room left for context.
| Total size | 398 GiB (≈ 99.8 GiB per rank at TP=4) |
Routed experts, layers 3–77 (mlp.experts.*.{gate,up,down}_proj) |
int4 symmetric, group 64, bf16 scales |
Attention (q_a, q_b, kv_a_proj_with_mqa, kv_b, o_proj) and shared experts, layers 3–77 |
int8 symmetric, group 64, bf16 scales |
Dense layers 0–2, DSA indexers, MoE routers, norms, embeddings, lm_head, the whole MTP block (layer 78) |
bf16, byte-exact from the source |
| Format | compressed-tensors pack-quantized (weight_packed int32, weight_scale bf16, weight_shape), declared in config.json |
Method
Plain round-to-nearest with per-group min-max scales (llm-compressor's QuantizationModifier, no calibration
data, no activation-aware smoothing), one decoder layer at a time. Every layer is independent of every other, and
because nothing is folded into the norms there is no interaction with the router or the DSA indexer. This is the
simplest possible checkpoint in this format and the baseline the AWQ companion is measured against.
Measured error (per layer)
Relative RMS error against the bf16 layer on 32 × 2048 real tokens. "Contribution" is the error of what the layer adds (output minus input); "residual" is the error of the full residual stream leaving the layer, which is the quantity that propagates.
| layer | variant | contribution | residual |
|---|---|---|---|
| 3 | this checkpoint (RTN int4 g64) | 2.40 % | 0.54 % |
| 3 | AWQ int4 g64, fold-corrected (companion) | 2.38 % | 0.53 % |
| 3 | fp8 e4m3 g128 on every projection, for reference | 2.46 % | 0.55 % |
| 3 | int8 g64 on every projection, for reference | 1.49 % | 0.33 % |
| 6 (owns an indexer) | this checkpoint | 3.44 % | 1.58 % |
| 6 | AWQ, fold-corrected (companion) | 3.27 % | 1.50 % |
| 21 | this checkpoint | 11.09 % | 0.59 % |
| 21 | AWQ, fold-corrected (companion) | 10.95 % | 0.58 % |
| 42 (owns an indexer) | this checkpoint | 9.89 % | 2.01 % |
| 42 | AWQ, fold-corrected (companion) | 9.85 % | 2.00 % |
| 63 | this checkpoint | 12.50 % | 2.34 % |
| 63 | AWQ, fold-corrected (companion) | 12.50 % | 2.34 % |
The contribution metric grows with depth because each layer's addition shrinks relative to the residual stream;
the residual error rises from 0.5 % (layer 3) to 2.3 % (layer 63). On this model the int4/int8 mix lands at the error of an all-fp8 recipe at
half the bytes. The AWQ companion (HawkBearPig/GLM-5.3-Int4-Int8Mix-AWQ-g64) improves on this checkpoint by
0.9 / 4.8 / 1.2 / 0.4 / 0.02 % of the error at layers 3 / 6 / 21 / 42 / 63: real in the shallow indexer layer, negligible at depth. Per layer the two checkpoints are equivalent; this one is the simpler artifact (no calibration, no smoothing, no correction step).
No end-to-end evaluation yet (perplexity, benchmarks): the numbers above are per-layer.
Loading
Standard compressed-tensors layout: model.safetensors.index.json, per-layer shards layer-NNN.safetensors,
passthrough.safetensors (embeddings, norms, lm_head, MTP block), config.json with quantization_config,
tokenizer files. Any loader that understands glm_moe_dsa and compressed-tensors pack-quantized W4A16/W8A16
should read it; only DGPP has been exercised. vLLM / transformers loading is untested.
Tooling: llm-compressor 0.13.0, compressed-tensors 0.18.0, transformers 5.14.1, torch 2.13.0, CPU-only build.
License: MIT, inherited from GLM-5.3.
- Downloads last month
- 290
Model tree for HawkBearPig/GLM-5.3-Int4-Int8Mix-RTN-g64
Base model
zai-org/GLM-5.3-BF16