Views
No views yet
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).
model.safetensors file size is a quantized checkpoint size and does not mean the model is 18B parameters.vLLM 0.16.x + vllm-node setups:content may be nullvllm/vllm-openai as-is.Dockerfile.vllm-glm4lite:1FROM vllm/vllm-openai:latest
2
3ARG TRANSFORMERS_COMMIT=393b4b3d28e29b4b05b19b4b7f3242a7fc893637
4
5RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
6RUN pip install --no-cache-dir -U "huggingface_hub==1.4.0"
7RUN 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/modelsglm-4.7-flash.--optimization-level 3 (O3), not default O2.CUDA_VISIBLE_DEVICES=0,2 + --tensor-parallel-size 2).--max-model-len 131072 (128k context remains supported).--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.model.safetensorsconfig.jsongeneration_config.jsontokenizer.jsontokenizer_config.jsonchat_template.jinjahf_quant_config.jsonREADME.mdQUANTIZATION.mdLICENSEOlafangensan/GLM-4.7-Flash-hereticzai-org/GLM-4.7-FlashQUANTIZATION.md.group_size=16, lm_head excluded)switch_turnflow_sanitized,open_code_reasoning1536,512 (sequence length 2048)1curl http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
2 "model": "glm-4.7-flash",
3 "messages": [{"role": "user", "content": "hello"}],
4 "max_tokens": 256
5 }'model.safetensors SHA256: 3b5aca2db60c472e9dbcb44e79ab4f69442d9a83315bbfab7a3f39ab8b004116