Downloads · 30 days
2
2% of all-time downloads
TheHouseOfTheDude/GLM-4.7_Compressed-Tensors
GLM-4.7_Compressed-Tensors is a text generation model from TheHouseOfTheDude. Use it when you need the model to write or continue text. It is set up for vllm. The card lists the license as other.
This repository provides quantized runtime builds of zai-org/GLM-4.7 (a Mixture-of-Experts model), repackaged for vLLM using the compressed-tensors format.
Downloads · 30 days
2
2% of all-time downloads
All-time downloads
98
Public
Repo size
589 GB
Likes
5
Public
Click a slice to open those files.
.md8.5 KB · 85%
From the Hugging Face model README
This repository provides quantized runtime builds of
zai-org/GLM-4.7 (a Mixture-of-Experts model), repackaged for vLLM using the compressed-tensors format.
Why this quant is different (MoE-aware calibration)
- During calibration we activate all experts (not only the few picked by the router for each token).
- This captures worst-case activations across experts, yielding more robust scales and lower quant error drift at inference—especially under prompts that trigger atypical experts.
- The accompanying PR to llm-compressor adds GLM-family modeling hooks to support this MoE-aware flow (router/expert handling aligned with GLM architectures).
- Net effect: cleaner perplexity and stability, fewer edge-case artifacts, and better domain transfer when novel experts fire.
TL;DR
- Quantized with W4A16 (INT4 weights / A16 activations) for vLLM via
--quantization compressed-tensors.- Three branches by group size: W4A16_GS32, W4A16_GS64, W4A16_GS128.
- Calibration: 512 chat samples, 2048 max sequence length, dataset
neuralmagic/LLM_compression_calibration(messages rendered with the model’s chat template).- Weight-only AWQ;
lm_headkept high-precision; exported withsave_compressed=True.
The
mainbranch is a landing page (model card + links). Runnable artifacts live in per-quant branches.
Quick links
*.safetensors) + index (model.safetensors.index.json)config.json with compressed-tensors metadata (weight_format, quantization, quantization_config, etc.)tokenizer.json, tokenizer.model, merges/vocab as applicable)chat_template.jinja (inherits the finetune’s chat style)Exact file lists may differ between branches — see Files and versions for each revision.
Method / flow
llmcompressor oneshot pipeline with an AWQModifier (weight-only).MoE handling (GLM-4.7)
Targets / exclusions
["Linear"] (MHA/FFN and MoE expert linears).lm_head (kept high-precision).Weights / grouping
num_bits=4, type="int", symmetric=True)"group" with group size ∈ {32, 64, 128} depending on branchCalibration dataset & preprocessing
neuralmagic/LLM_compression_calibration, split trainmessages is rendered via the tokenizer’sapply_chat_template(..., tokenize=False), then tokenized with:
max_length=2048, truncation=True, padding=False, add_special_tokens=FalseCompression call
oneshot(..., max_seq_length=2048, num_calibration_samples=512, tokenizer=tokenizer) on the preprocessed datasetExport for vLLM
save_compressed=True so vLLM loads the compressed-tensors runtime layout directlyInstall vLLM (recent version recommended):
pip install vllm
Serve (adjust to your hardware):
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
vllm serve TheHouseOfTheDude/GLM-4.7_Compressed-Tensors \
--quantization compressed-tensors \
--tensor-parallel-size 8 \
--max-model-len 2048 \
--gpu-memory-utilization 0.70 \
--dtype bfloat16
Example Chat Completions:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "TheHouseOfTheDude/GLM-4.7_Compressed-Tensors",
"messages": [
{"role":"system","content":"You are GLM-4.7 — helpful, precise, and safe."},
{"role":"user","content":"Outline a plan for multi-document retrieval with MoE models."}
],
"max_tokens": 512,
"temperature": 0.7,
"top_p": 0.95
}'
Note:
compressed-tensorsis a vLLM runtime format. Loading directly with vanilla 🤗 Transformers is not supported.
For Transformers, use a compatible export (e.g., GPTQ/AWQ for Transformers) or the full-precision finetune.
This package follows the finetuned parent’s chat conventions. If a chat_template.jinja is present, libraries that support apply_chat_template will automatically format messages.
Guidelines:
This quantization:
Apply appropriate content filters / policies for your deployment context.
--max-model-len and batch size.