From 05033f3911cf11b76ad9ca96685e6a83dc54c584 Mon Sep 17 00:00:00 2001 From: keptn42 Date: Sun, 11 Oct 2026 15:18:41 +0000 Subject: [PATCH] readme: the Gemma 4 31B container and its compose file gemma4-31b-w4a8.rad on Hugging Face (keptn/gemma4-31b-w4a8): the bf16 checkpoint's trunk as GPTQ int4 with int8 activations, the assistant head as MTP drafter, the vision tower. The compose file carries the flags the model card's numbers were measured with. --- README.md | 1 + deploy/compose/gemma4-31b-w4a8.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 deploy/compose/gemma4-31b-w4a8.yaml diff --git a/README.md b/README.md index 99d3a69f..fe7c607b 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ If you wish to support the developement of the radiance engine you can do so [he | Qwen3.6-35B-A3B FP8, MTP | `qwen3.6-35b-a3b-fp8.rad` (35 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.6-35b-a3b-fp8) | `qwen3.6-35b-a3b.yaml` | | MiniCPM5-2B FP8, DSpark drafter | `minicpm5-2b-fp8.rad` (3 GiB) | [download](https://huggingface.co/StillDeadcode/minicpm5-2b-fp8) | `minicpm5-2b.yaml` | | MiniCPM5-2B bf16, DSpark drafter | `minicpm5-2b-bf16.rad` (5 GiB) | [download](https://huggingface.co/StillDeadcode/minicpm5-2b-bf16) | `minicpm5-2b-bf16.yaml` | +| Gemma 4 31B: int4 trunk, int8 activations, MTP, vision | `gemma4-31b-w4a8.rad` (20 GiB) | [download](https://huggingface.co/keptn/gemma4-31b-w4a8) | `gemma4-31b-w4a8.yaml` | | Qwen3.8-27B bf16 | `qwen3.8-27b-bf16.rad` (50 GiB) | [convert](#convert-a-checkpoint) | `qwen3.8-27b-bf16.yaml` | | Qwen3.8-Flash-Next bf16, a disk-streamed reference | `qwen3.8-flash-next-bf16.rad` (335 GiB) | [convert](#convert-a-checkpoint) | `flashnext-bf16.yaml` | | EmbeddingGemma 2 bf16: text, image, video and audio embeddings, one card | `embeddinggemma2-bf16.rad` (1.4 GiB) | [convert](#convert-a-checkpoint) | `embeddinggemma2.yaml` | diff --git a/deploy/compose/gemma4-31b-w4a8.yaml b/deploy/compose/gemma4-31b-w4a8.yaml new file mode 100644 index 00000000..962ca8d8 --- /dev/null +++ b/deploy/compose/gemma4-31b-w4a8.yaml @@ -0,0 +1,17 @@ +# Gemma 4 31B-it: int4 trunk (GPTQ from the bf16 checkpoint) with int8 activations, Google's +# assistant head merged in as the MTP drafter (depth 3), and the vision tower. Sampling defaults are +# the checkpoint's generation_config; thinking is switched per request (chat_template_kwargs). +# For the full 262,144-token context use --max-model-len 262144 --max-num-seqs 2. +name: radiance-gemma4-31b-w4a8 +services: + radiance: + extends: { file: common.yaml, service: radiance } + container_name: radiance-gemma4-31b-w4a8 + environment: + # Two-card IPC through KFD instead of DMA-buf; set on every measured run. + HSA_ENABLE_IPC_MODE_LEGACY: "1" + command: > + --model /models/gemma4-31b-w4a8.rad + --host :: --port ${PORT:-8000} --api-key ${RADIANCE_API_KEY:?set RADIANCE_API_KEY in .env} + --tp 2 --p2p on --max-num-seqs 8 --max-model-len 65536 --kv-cache-dtype fp8 + --num-speculative-tokens 3 --temp 1.0 --top-p 0.95 --top-k 64