Instructions to use djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700") model = AutoModelForMultimodalLM.from_pretrained("djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700
- SGLang
How to use djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 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 "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700" \ --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": "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700" \ --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": "djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 with Docker Model Runner:
docker model run hf.co/djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700
Download README.md from djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700: direct link, hf CLI and curl.
- Browser
- Download file 3.81 kB
-
https://huggingface.co/djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700/resolve/925e1158fdfdca1aead9af64cb96cb7f91be63db/README.md
- Command line
-
hf download hf://djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700@925e1158fdfdca1aead9af64cb96cb7f91be63db/README.md
-
curl -L -o README.md https://huggingface.co/djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700/resolve/925e1158fdfdca1aead9af64cb96cb7f91be63db/README.md
license: mit
base_model: zai-org/GLM-5.3-Flash
tags:
- glm
- mla
- linear-attention
- moe
- multimodal
- rocm
- rdna4
- gfx1201
- rfa
- rfi
- amd
- text-generation
GLM-5.3-Flash RFA-RFI8 β FOR INFERENCE ON 8Γ R9700 (RDNA4/gfx1201)
A self-quantized derivative of zai-org/GLM-5.3-Flash (321B MoE, β18B active), quantized with a RFA + RFI8 composite and validated for serving on 8Γ AMD Radeon R9700 (gfx1201 / RDNA4).
β οΈ Not compatible with stock vLLM. This checkpoint uses the
rficomposite quantizer and theGlm5NextForConditionalGenerationarchitecture on the RDNA4 path, which requires the patched vLLM + overlay in djdeniro/GLM-5.3-Flash-rocm-r9700.
Model
- Base: zai-org/GLM-5.3-Flash β MIT license.
- Architecture: 321B MoE, β18B active; 45 layers = 34 KDA (linear attention) + 11 DSA (sparse-MLA); mHC hidden-state compression; native multimodal (image + video); 1 nextn MTP layer; 288 routed experts (top-8) + 1 shared expert.
- Paper: arXiv:2602.15763.
Quantization
| Scheme | Applied to | bpw |
|---|---|---|
| RFA | MoE routed experts | 4.5 |
| RFI8 (int8 W8A8) | attention / shared / dense linears (structural) | 8.25 |
| BF16 | dense copies + MTP layer | 16 |
Total β197.8 GB (25 safetensors shards). Full recipe (archspec, source patches, kda-remap,
run scripts) is in the code repo: djdeniro/GLM-5.3-Flash-rocm-r9700 (quant/).
Quick start (8Γ R9700)
git clone https://huggingface.co/djdeniro/GLM-5.3-Flash-rocm-r9700 overlay
huggingface-cli download djdeniro/GLM-5.3-Flash-RFA-RFI8-8xR9700 --local-dir ./models
docker run --rm --tty --ipc=host --shm-size=128g \
--device /dev/kfd:/dev/kfd --device /dev/dri:/dev/dri \
-v "$PWD/models":/models:ro -v "$PWD/overlay":/overlay:ro \
--entrypoint bash tcclaviger/vllm:latest \
-c "/overlay/apply_overlay.sh && exec vllm serve /models \
--served-model-name glm53-flash --trust-remote-code --quantization rfi \
--tensor-parallel-size 8 --gpu-memory-utilization 0.95 \
--max-model-len 190080 --max-num-seqs 4 --kv-cache-dtype auto"
Use overlay/run-glm53.sh (or denet-large.sh via llama-swap) for the full production command.
Performance (8Γ R9700, gfx1201)
- Decode: β 34β37 t/s at bs=1 (FULL cudagraph).
- TTFT: β 0.13β0.6 s (prompt-dependent,
reasoning_effort="low"). - Context: 190k tokens with bf16 KV.
Multimodal
Images are resized preserving aspect ratio: min 384Γ384 (upscale) / max 1280Γ1280 (downscale). The processor/video tower is the native Glm5Next multimodal path.
Known limitations
- MTP is OFF β the nextn drafter is blocked by vLLM's kv-cache-group assertion.
- Do NOT enable fp8 KV (
--kv-cache-dtype fp8+--calculate-kv-scales): runtime scale calibration runs through an unwarmed KDA recurrent state on the profile dummy-run, producing wrong_k_scaleβ hard output looping (upstream vLLM issue #37554). The checkpoint ships no static KV scales β serve with bf16 KV (--kv-cache-dtype auto). - Chat: send
reasoning_effort="low"(the GLM-5.3 chat template defaults to Reasoning Effort Max and over-thinks on long generations).
License & attribution
- License: MIT.
- Original model: zai-org/GLM-5.3-Flash β Β© Z.ai (zai-org), MIT license.
- Paper: arXiv:2602.15763.