arch: Gemma 4 31B with z-lab's DFlash drafter

Gemma 4's DFlash drafter moves into arch/common so both Gemma 4 plugins declare it, on the int8
grid too; the 31B declares it beside its w4a8 / w8a8 trunk when the container carries one; the
w4a8 and Q8 -df recipes and compose files; the tests.

Squashed from:

- arch: Gemma 4's DFlash drafter into arch/common, for both Gemma 4 plugins, and on the int8 grid
- arch: z-lab's DFlash drafter beside the 31B's w4a8 / w8a8 trunk, its gqa-8 attention at gqa 4
- data/recipes: gemma4-31b with DFlash, the w4a8 trunk with a block-fp8 drafter, and Q8
- tests: the 31B with its DFlash drafter declares the chains where libr4d's fused ops are not declared
- tests: the 31B's steps with its DFlash drafter lint clean, on both grids, at one, two and four ranks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AshlynandClaude Opus 5.5 authored and StillDeadcode committed 2026-10-21 09:48:20 +02:00
1 parent 239da14d17
commit bdb37d5d16
12 files changed
+1960 -901

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# Gemma 4 31B-it at eight bits: the trunk's linears and its lm_head int8 on Q8_0's grid (symmetric,
# an f16 scale a block of 128 columns, absmax / 127), int8 activations, z-lab's DFlash drafter
# merged in at int8 too (15 tokens a pass), and the vision tower. Converted with
# data/recipes/gemma4-31b-dense-bf16-q8-df.recipe. Sampling defaults are the checkpoint's
# generation_config; thinking is switched per request (chat_template_kwargs).
# 33 GiB of weights: ~16.5 GiB per card at --tp 2, ~8 GiB at --tp 4 on four cards.
name: radiance-gemma4-31b-q8-df
services:
radiance:
extends: { file: common.yaml, service: radiance }
container_name: radiance-gemma4-31b-q8-df
command: >
--model /models/gemma4-31b-dense-q8-df.rad
--host :: --port ${PORT:-8000} --api-key ${RADIANCE_API_KEY:?set RADIANCE_API_KEY in .env}
--tp 2 --max-num-seqs 8 --max-model-len 65536 --kv-cache-dtype fp8
--num-speculative-tokens auto --max-num-batched-tokens 2048 --temp 1.0 --top-p 0.95 --top-k 64
+17
View File
@@ -0,0 +1,17 @@
# Gemma 4 31B-it: int4 trunk (round-to-nearest with a scale search, from the bf16 checkpoint) with
# int8 activations, z-lab's DFlash drafter merged in (block fp8, 15 tokens a pass), and the vision
# tower. Converted with data/recipes/gemma4-31b-dense-bf16-w4a8-df.recipe. Sampling defaults are the
# checkpoint's generation_config; thinking is switched per request (chat_template_kwargs).
# The drafter serves one depth, the block it was trained at (16, so 15 drafts); `auto` asks the
# container. On four cards use --tp 4. --draft-window adaptive lets each sequence verify only as
# much of the block as its own acceptance pays for, worth it at higher --max-num-seqs.
name: radiance-gemma4-31b-w4a8-df
services:
radiance:
extends: { file: common.yaml, service: radiance }
container_name: radiance-gemma4-31b-w4a8-df
command: >
--model /models/gemma4-31b-dense-w4a8-df.rad
--host :: --port ${PORT:-8000} --api-key ${RADIANCE_API_KEY:?set RADIANCE_API_KEY in .env}
--tp 2 --max-num-seqs 8 --max-model-len 65536 --kv-cache-dtype fp8
--num-speculative-tokens auto --max-num-batched-tokens 2048 --temp 1.0 --top-p 0.95 --top-k 64