Downloads · 30 days
67
7% of all-time downloads
alphakek/GLM-4.7-Flash-heretic-NVFP4
GLM-4.7-Flash-heretic-NVFP4 is a text generation model from alphakek. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
NVFP4 post-training quantization of Olafangensan/GLM-4.7-Flash-heretic for long-context multi-GPU inference with vLLM.
Downloads · 30 days
67
7% of all-time downloads
All-time downloads
996
Public
Parameters
17.1B
35.6 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors17.8 GB · 100%
How the weights are stored.
U814.7B · 86%
From the Hugging Face model README
NVFP4 post-training quantization of Olafangensan/GLM-4.7-Flash-heretic for long-context multi-GPU inference with vLLM.
[!IMPORTANT] The Hugging Face UI "Model size" badge is auto-inferred from packed NVFP4 safetensors and may show an incorrect parameter count for this repo. Use the architecture statement below as source of truth: GLM-4.7-Flash (30B-A3B MoE).
This release uses NVFP4 (4-bit) quantization, not 8-bit quantization.
model.safetensors file size is a quantized checkpoint size and does not mean the model is 18B parameters.Known issue on some stock vLLM 0.16.x + vllm-node setups:
content may be nullThis model requires a custom vLLM image.
Do not use stock vllm/vllm-openai as-is.
Save as Dockerfile.vllm-glm4lite:
FROM vllm/vllm-openai:latest
ARG TRANSFORMERS_COMMIT=393b4b3d28e29b4b05b19b4b7f3242a7fc893637
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -U "huggingface_hub==1.4.0"
RUN pip install --no-cache-dir -U --no-deps "git+https://github.com/huggingface/transformers.git@${TRANSFORMERS_COMMIT}"
docker build -t vllm-glm:parser-only-r2 -f Dockerfile.vllm-glm4lite .
docker run --rm --name glm47 --gpus all --ipc=host -p 8000:8000 -v /path/to/hf_cache:/hf_cache -v /path/to/models:/models -e HF_HOME=/hf_cache -e HUGGINGFACE_HUB_CACHE=/hf_cache -e HF_HUB_CACHE=/hf_cache -e TRANSFORMERS_CACHE=/hf_cache -e VLLM_NVFP4_GEMM_BACKEND=marlin vllm-glm:parser-only-r2 --model /models/GLM-4.7-Flash-heretic-NVFP4 --served-model-name glm-4.7-flash --quantization modelopt_fp4 --dtype bfloat16 --tensor-parallel-size 4 --max-model-len 131072 --enable-auto-tool-choice --tool-call-parser glm47 --reasoning-parser glm45 --default-chat-template-kwargs '{"enable_thinking": true}' --generation-config vllm --override-generation-config '{"temperature":0.7,"top_p":1.0}'
curl http://127.0.0.1:8000/v1/models
Expected: model list includes glm-4.7-flash.
These measurements were taken on a 4x RTX 3090 host with vLLM and this NVFP4 export.
--optimization-level 3 (O3), not default O2.CUDA_VISIBLE_DEVICES=0,2 + --tensor-parallel-size 2).--max-model-len 131072 (128k context remains supported).Observed impact (single-session decode):
--speculative-config {"method":"mtp",...}) was slower than baseline.VLLM_MARLIN_USE_ATOMIC_ADD=1 was slightly slower (~4-5%).--kv-cache-dtype fp8--kv-cache-dtype fp8 --calculate-kv-scales--kv-cache-dtype fp8_ds_mla
These failed due to no valid MLA attention backend on this Ampere path.--max-num-seqs / --max-num-batched-tokens improved aggregate throughput significantly.This model repo intentionally contains only serving-required artifacts:
model.safetensorsconfig.jsongeneration_config.jsontokenizer.jsontokenizer_config.jsonchat_template.jinjahf_quant_config.jsonREADME.mdQUANTIZATION.mdLICENSENo training checkpoints, raw calibration corpora, or temporary files are included.
Olafangensan/GLM-4.7-Flash-hereticzai-org/GLM-4.7-FlashPlease review and comply with upstream licenses and terms for your use case.
Quantization recipe, command, and environment details are documented in QUANTIZATION.md.
At a glance:
group_size=16, lm_head excluded)switch_turnflow_sanitized,open_code_reasoning1536,512 (sequence length 2048)curl http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
"model": "glm-4.7-flash",
"messages": [{"role": "user", "content": "hello"}],
"max_tokens": 256
}'
model.safetensors SHA256: 3b5aca2db60c472e9dbcb44e79ab4f69442d9a83315bbfab7a3f39ab8b004116