docs, recipes, compose: TranslateGemma 27B

The gemma3 section of ARCHITECTURES.md (geometry, traps, KV groups, linears, calibration,
measurements, the DFlash2 drafter), the calibration variable and the conversion of record in
GUIDE.md, the README's models table. Recipes: the int8 calibration container (KL 0.003),
MXFP4 + GPTQ (KL 0.042, 56 tok/s a stream on two R9700s), and with a drafter. The compose file
serves a plain Gemma 3 template: TranslateGemma's own refuses the startup render's plain turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mici81andClaude Opus 5.5 authored and StillDeadcode committed 2026-10-19 10:44:46 +02:00
1 parent a91a2837ff
commit f2c0468335
8 files changed
+194

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
{{ bos_token }}{% for message in messages %}{% set role = "model" if message["role"] == "assistant" else "user" %}<start_of_turn>{{ role }}
{{ message["content"] | trim }}<end_of_turn>
{% endfor %}{% if add_generation_prompt %}<start_of_turn>model
{% endif %}
+20
View File
@@ -0,0 +1,20 @@
# TranslateGemma 27B, MXFP4 by GPTQ (data/recipes/translategemma-27b-mxfp4-gptq.recipe; the -df2
# recipe adds a DFlash2 drafter, whose depth the server takes from the container).
#
# The checkpoint's chat template takes structured turns naming the source and target languages and
# refuses the plain turn the server renders at startup (a user turn must read
# <<<source>>>en<<<target>>>cs<<<text>>>...), so a plain Gemma 3 template (gemma3.jinja, beside this
# file) stands in, and a client sends on /v1/completions the prompt the checkpoint's template renders
# ("You are a professional English (en) to Czech (cs) translator. ..."; its README shows it whole).
name: radiance-translategemma-27b
services:
radiance:
extends: { file: common.yaml, service: radiance }
container_name: radiance-translategemma-27b
volumes:
- ./gemma3.jinja:/templates/gemma3.jinja:ro
command: >
--model /models/translategemma-27b-mxfp4-gptq.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 16384 --kv-cache-dtype fp8
--override-chat-template /templates/gemma3.jinja