This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
AnimusNull bd38e7eced dma lane: the room check drops a reused fence slot and keeps what it once knew read
dma_read takes the end of the last finished list from ends[k % kDmaEnds]. The lane can have
more than kDmaEnds lists behind the engine (the prefill stager and the mover queue far more
than the prefetch's three), and once a later list has taken list k's slot that value would
overstate what the engine has read, letting the host write over a part of the ring not yet
read. The slot is now used only while fewer than kDmaEnds lists are behind it.

The check also keeps the most it has known read, so a list number it can no longer use does
not send it back to a stale written-back read pointer and wedge a ring that has room.
2026-11-05 14:14:24 +00:00
2026-10-16 18:25:18 +02:00
2026-11-02 18:35:02 +01:00
2026-11-02 18:35:02 +01:00
2026-11-04 18:56:58 +01:00
2026-10-30 22:01:01 +01:00
2026-10-04 12:02:41 +02:00
2026-10-16 18:25:18 +02:00
2026-11-04 18:56:58 +01:00
2026-10-16 18:25:18 +02:00
2026-11-02 18:35:02 +01:00
2026-10-04 12:02:41 +02:00
2026-11-04 18:56:58 +01:00
2026-10-30 22:01:01 +01:00

radiance

An inference server for AMD GPUs, in C++ and HIP: language models, and image, video, speech and music generation. Its HTTP API speaks OpenAI's chat, completions, Responses, images, audio and video APIs, Anthropic's Messages API and llama-server's native one, so their clients and SDKs work unchanged. Model architectures, kernel libraries and quantisers are .so plugins; the ones in this tree are built and loaded the same way a third party's are (docs/PLUGIN.md).

The bundled device kernels target AMD RDNA4 (libr4d: gfx1200, gfx1201), RDNA3 (libr3d: gfx11xx) and Strix Halo (libhalo: gfx1151). The serve flags below are for two 32 GB cards (Radeon AI PRO R9700). The engine starts on any AMD GPU family; another card needs a kernel library for it. A machine with no GPU builds the host backend, whose AVX-512/AVX2 kernels (libavx) serve every model here: the small ones (EmbeddingGemma 2, Qwen3-ASR, the 0.8B-3B models) at interactive speed on a desktop CPU, the 27B and larger far more slowly than a card.

To support the development of radiance: Patreon.

Models

model container get it compose file
Qwen3.8-Flash-Next: 4-bit experts, int8 trunk, MTP, vision qwen3.8-next-flash-fp8-iq4r-moe.rad (114 GiB) download flashnext.yaml
Qwen3.8-27B FP8, DFlash2 drafter, vision qwen3.8-27b-fp8.rad (29 GiB) download qwen3.8-27b-fp8.yaml
Qwen3.8-27B MXFP4 (AMD Quark AWQ), DFlash2 drafter, vision qwen3.8-27b-mxfp4.rad (19 GiB) download qwen3.8-27b-mxfp4.yaml
Qwen3.8-27B IQR-V4, 2.5 to 8 bits a weight (docs/IQR.md), DFlash2 drafter, vision qwen3.8-27b-iq2r-v4.rad .. qwen3.8-27b-iq8r-v4.rad (10 to 28 GiB) download qwen3.8-27b-iqr-v4.yaml
Qwen3.6-35B-A3B FP8, MTP qwen3.6-35b-a3b-fp8.rad (35 GiB) download qwen3.6-35b-a3b.yaml
Ornith-1.5-35B-A3B FP8, MTP, vision ornith-1.5-35b-a3b-fp8.rad (35 GiB) download ornith-1.5-35b-a3b.yaml
Ornith-1.5-35B-A3B w4a8: 4-bit experts (GPTQ), MTP, vision, fits one card ornith-1.5-35b-a3b-w4a8.rad (20 GiB) download ornith-1.5-35b-a3b-w4a8.yaml
Ornith-1.5-122B FP8, MTP, vision, four cards ornith-1.5-122b-fp8.rad (118 GiB) download ornith-1.5-122b.yaml
Ornith-1.5-122B FP8, DFlash2 drafter, vision, four cards ornith-1.5-122b-fp8-dflash2.rad (116 GiB) download ornith-1.5-122b-df2.yaml
Ornith-1.5-122B w4a8: 4-bit experts (GPTQ), MTP, vision, four cards ornith-1.5-122b-w4a8.rad (65 GiB) download ornith-1.5-122b-w4a8.yaml
Ornith-1.5-122B w4a8: 4-bit experts (GPTQ), DFlash2 drafter, vision, four cards ornith-1.5-122b-w4a8-dflash2.rad (64 GiB) download ornith-1.5-122b-w4a8-df2.yaml
Sage-A1.5 FP8, MTP, vision sage-a1.5-fp8.rad (35 GiB) download sage-a1.5.yaml, sage-a1.5-tp1.yaml
Sage-A1.5 FP8, DFlash2 drafter, vision sage-a1.5-fp8-df2.rad (34 GiB) download sage-a1.5-df2.yaml
MiniCPM5-2B FP8, DSpark drafter minicpm5-2b-fp8.rad (3 GiB) download minicpm5-2b.yaml
MiniCPM5-2B bf16, DSpark drafter minicpm5-2b-bf16.rad (5 GiB) download minicpm5-2b-bf16.yaml
Spark X2.6 4B bf16: thinking and tool calls, one to four cards spark-x2.6-4b-bf16.rad (8.3 GiB) convert —
Gemma 4 31B: GPTQ int4 trunk, int8 activations, MTP, vision gemma4-31b-w4a8.rad (20 GiB) download gemma4-31b-w4a8.yaml
Gemma 4 31B w5: GPTQ int5 trunk (a scale and a zero point per 128 weights), MTP, vision gemma4-31b-w5.rad (23 GiB) download gemma4-31b-w5.yaml
Gemma 4 31B heretic-ara (refusals removed): GPTQ int4 trunk, int8 activations, MTP, vision gemma4-31b-heretic-ara-w4a8.rad (20 GiB) download gemma4-31b-heretic-ara-w4a8.yaml
Gemma 4 31B: int8 trunk and lm_head (no calibration), MTP, vision gemma4-31b-i8g.rad (33 GiB) download gemma4-31b-i8g.yaml
Gemma 4 31B heretic-ara (refusals removed): int8 trunk and lm_head (no calibration), MTP, vision gemma4-31b-heretic-ara-i8g.rad (33 GiB) download gemma4-31b-heretic-ara-i8g.yaml
Gemma 4 31B: int4 trunk, int8 activations and lm_head, DFlash drafter, vision gemma4-31b-dense-w4a8-df.rad (22 GiB) download gemma4-31b-w4a8-df.yaml
Gemma 4 31B Q8: int8 trunk and lm_head (Q8_0's grid at group 128), int8 DFlash drafter, vision gemma4-31b-dense-q8-df.rad (33 GiB) convert gemma4-31b-q8-df.yaml
Gemma 4 31B on four cards: int4 trunk, int8 activations and lm_head, RedHatAI's DFlash2 drafter, vision gemma4-31b-dense-w4a8-df2-qkv.rad (23 GiB) download gemma4-31b-w4a8-df2-tp4.yaml
Gemma 4 31B on four or two cards: int4 trunk, int8 activations and lm_head, a block-16 DFlash2 drafter (15 drafts a step, verified as a tree), vision gemma4-31b-dense-w4a8-df2b16-qkv.rad (23 GiB) download gemma4-31b-w4a8-df2b16-tp4.yaml, gemma4-31b-w4a8-df2b16-tp2.yaml
Gemma 4 12B bf16: MTP, vision, audio gemma4-12b-bf16.rad (25 GiB) download gemma4-12b-bf16.yaml
Gemma 4 12B int8 (i8a8): MTP, vision, audio gemma4-12b-i8g.rad (14 GiB) download gemma4-12b-i8g.yaml
NVIDIA-Nemotron-3.5-Bolt-E4B bf16 (Gemma 4 E4B), NVIDIA's DFlash drafter, vision, audio nemotron-3.5-bolt-e4b-bf16.rad (17 GiB) download nemotron-3.5-bolt-e4b-bf16.yaml
NVIDIA-Nemotron-3.5-Bolt-E4B int8 (i8a8, Gemma 4 E4B), NVIDIA's DFlash drafter, vision, audio nemotron-3.5-bolt-e4b-i8g.rad (13 GiB) download nemotron-3.5-bolt-e4b-i8g.yaml
NVIDIA-Nemotron-3.5-Bolt-E4B 4-bit (int4 feed-forward, GPTQ, Gemma 4 E4B), NVIDIA's DFlash drafter, vision, audio nemotron-3.5-bolt-e4b-a4.rad (12 GiB) download nemotron-3.5-bolt-e4b-a4.yaml
Ling-3.0-flash-Sante w4a8: 4-bit experts (GPTQ), MTP, four or two cards ling-3.0-flash-sante-w4a8.rad (66 GiB) download ling-3.0-flash-sante-w4a8.yaml, ling-3.0-flash-sante-w4a8-tp2.yaml
NVIDIA-Nemotron-3.5-Bolt-74B-A9B w4a8: 4-bit experts, FP8 trunk, NVIDIA's LiLiCorr drafter, vision, two cards nemotron-3.5-bolt-74b-w4a8.rad (43 GiB) download nemotron-3.5-bolt-74b-w4a8.yaml
NVIDIA-Nemotron-3.5-Bolt-74B-A9B FP8, NVIDIA's LiLiCorr drafter, vision, four cards nemotron-3.5-bolt-74b-fp8.rad (73 GiB) download nemotron-3.5-bolt-74b-fp8.yaml
Qwen-Image 2.1 FP8: text to image and image edits qwen-image-2.1-fp8.rad (16 GiB) download qwen-image-2.1.yaml
Qwen-Image 2.1 Turbo FP8: the same in 8 steps qwen-image-2.1-turbo-fp8.rad (16 GiB) download qwen-image-2.1-turbo.yaml
Krea 2 Turbo FP8: text to image, one card krea-2-turbo-fp8.rad (16 GiB) download krea-2-turbo.yaml
Krea 2 Raw FP8: the same, undistilled krea-2-raw-fp8.rad (16 GiB) download krea-2-raw.yaml
FLUX.3 [klein] FP8: text to image and edits from up to ten pictures, one card flux-3-klein-fp8.rad (9.3 GiB) download flux-3-klein.yaml
FLUX.3 [klein] base FP8 flux-3-klein-base-fp8.rad (9.3 GiB) download flux-3-klein.yaml
LTX-2.5 distilled FP8: video with its stereo soundtrack from text or a first frame, one card ltx-2.5-distilled-fp8.rad (37 GiB) download ltx-2.5.yaml
LTX-2.5 base FP8 ltx-2.5-fp8.rad (37 GiB) download ltx-2.5.yaml
MiniMax-H3 FP8: video with its stereo soundtrack from text minimax-h3-fp8.rad (60 GiB) download minimax-h3.yaml
FastH3 8-Step V2 FP8: the same in eight steps fasth3-8-step-v2-fp8.rad (62 GiB) download fasth3.yaml
MiniMax-Music3 bf16: songs from lyrics and a description minimax-music3-bf16.rad (20 GiB) download minimax-music3.yaml
Unlimited-OCR bf16: document parsing with the DeepEncoder tower unlimited-ocr-bf16.rad (6.2 GiB) download unlimited-ocr-bf16.yaml
Breeze-TTS-2 bf16: speech, whole, streamed or live, one card breeze-tts2-bf16.rad (5.5 GiB) download breeze-tts2.yaml
Fish Audio drama-3: speech with speaker tags and inline direction, voices cloned from reference clips, whole, streamed or live; block-FP8 experts, two cards drama3-fp8.rad (36 GiB) convert drama3.yaml
Qwen3.8-27B ParoQuant int4, int5 or MXFP4 (learned rotations), DFlash2 drafter, vision qwen3.8-27b-paro-int4.rad (19 GiB; int5 22 GiB) convert qwen3.8-27b-paro.yaml
TranslateGemma 27B MXFP4 (GPTQ), translation; optional DFlash2 drafter translategemma-27b-mxfp4-gptq.rad (17 GiB) convert translategemma-27b.yaml
GLM-5.3-Flash: MXFP4 experts and block-FP8 attention (AMD Quark), MTP, vision, eight cards glm53-flash-mxfp4.rad (172 GiB) convert glm53-flash.yaml
Qwen3.8-27B bf16 qwen3.8-27b-bf16.rad (50 GiB) convert qwen3.8-27b-bf16.yaml
Qwen3.8-Flash-Next bf16, a disk-streamed reference qwen3.8-flash-next-bf16.rad (335 GiB) convert flashnext-bf16.yaml
Stable Diffusion XL bf16 and its finetunes (Illustrious, NoobAI, Pony): text to image, one card illustrious-xl-v2.0-bf16.rad (6.4 GiB), from any single-file SDXL checkpoint convert sdxl.yaml
EmbeddingGemma 2 bf16: text, image, video and audio embeddings, one card embeddinggemma2-bf16.rad (1.4 GiB) convert embeddinggemma2.yaml
nomic-embed-text-v2-moe bf16: text embeddings, one card nomic-embed-v2-moe-bf16.rad (959 MB) convert -
Nemotron 3.5 Embed 1B BF16: text and image embeddings, one card the checkpoint as it ships NVIDIA checkpoint —
Nemotron 3.5 Embed 8B BF16: text and image embeddings, one card the checkpoint as it ships NVIDIA checkpoint —
Nemotron 3.5 Rerank 8B BF16: text/image document relevance, one card the checkpoint as it ships NVIDIA checkpoint —
Anima Aesthetic FP8: anime and illustration, text to image, one card (Base and Turbo convert the same way) anima-aesthetic-fp8.rad (3.0 GiB) convert anima.yaml
Qwen3-ASR 1.7B bf16: speech to text, /v1/audio/transcriptions and live over /v1/realtime, 30 languages, one card the checkpoint as it ships (4.1 GiB) Qwen/Qwen3-ASR-1.7B-hf —

A container holds everything the server needs: the weights, the tokeniser, the chat template and any drafter. Each download link's repository has the recipe and the exact command that made the file. Download one into your models directory (the transfer resumes if interrupted):

mkdir -p /srv/models/rad && cd /srv/models/rad
curl -LC - -O https://huggingface.co/StillDeadcode/minicpm5-2b-fp8/resolve/main/minicpm5-2b-fp8.rad

The Gemma 4 container is keptn42's: GPTQ calibrated in transformers, with an int8 lm_head; its repository has the recipe and the calibration step. To convert Google's bf16 checkpoint yourself, data/recipes/gemma4-31b-dense-bf16-w4a8.recipe quantises without calibration (round-to-nearest with a scale search, bf16 lm_head); see Convert a checkpoint. On two R9700s that container decodes at 103 tok/s on prose and 141 on code, against 112 and 150 for keptn42's, and accepts 0.46 of its drafts on prose against 0.50.

TranslateGemma 27B is converted from Google's bf16 checkpoint in three steps: an int8 container to calibrate in, its Gram matrices over translation prompts, then MXFP4 with GPTQ (data/recipes/translategemma-27b-*.recipe, the steps in docs/ARCHITECTURES.md). On two R9700s it decodes 56 tok/s a stream (205 at four) and scores mean KL 0.042 against the bf16 model on held-out translations; with a DFlash2 drafter, 152 a stream. Its chat template takes structured turns naming the two languages and refuses the plain turn the server renders at startup, so translategemma-27b.yaml serves a plain Gemma 3 template (deploy/compose/gemma3.jinja) and a client sends on /v1/completions the prompt the checkpoint's template renders.

GLM-5.3-Flash is converted from AMD's Quark export (amd/GLM-5.3-Flash-Quark-MXFP4) with data/recipes/glm53-mxfp4.recipe, which keeps every weight as stored except the latent attention's small kv_b, decoded to bf16. At 172 GiB it takes eight R9700s (--tp 8), every expert resident, and its own MTP layer drafts. On eight R9700s it prefills 3958 tok/s at 6k tokens, decodes 166 tok/s on one stream and 426 over eight, and 506 under eight streams of agent turns. Pictures go through its own vision tower, up to 4096 tokens an image at the default encoder pass (--mm-max-patches 32000 serves the checkpoint's 8000); the KV cache is bf16. Its template knows the reasoning efforts low and high and renders any other as its maximum, so glm53-flash.yaml maps medium and xhigh to high.

The ParoQuant containers keep the trunk exactly as the ParoQuant releases ship it, with the learned Givens rotations it was trained in. Convert int4 from z-lab/Qwen3.8-27B-PARO, int5 from Launch80/Qwen3.8-27B-PARO-int5 and MXFP4 from MisterSnrub/Qwen3.8-27B-PARO-MXFP4-v2, each with data/recipes/q38-27b-paro-mxfp4-df2.recipe and the DFlash2 drafter. A ParoQuant container made before 1.5.0 is refused at startup; convert it again with the old one as --reuse, which copies every tensor that did not change.

The Qwen-Image containers serve OpenAI's images API (/v1/images/generations, /v1/images/edits): pictures from a prompt, and edits of up to ten pictures with an optional mask, 2048x2048 by default. On two R9700s a 2048x2048 picture takes 61 s at the base model's 40 steps and 13 s with Turbo (56 and 12 s with --tp-wire wht6); 1024x1024 takes 6 s and 2.6 s. Qwen-Image 2.1 is under Qwen's research license, which is non-commercial.

The MiniMax-H3 containers serve OpenAI's video jobs (/v1/videos): a video with its stereo soundtrack from a prompt, 5 to 14 s, up to 1344x768. On two R9700s a 5.17 s clip at 1344x768 takes about 68 s with FastH3 and 8.8 minutes at MiniMax-H3's 50 steps; both read about 39 GiB of pinned host memory. With LBH-123-AI's latent upscaler in the container, "latent_upscale": 2 runs the first steps at half the size and refines at the full size: MiniMax-H3's clip then takes 3.4 minutes (docs/GUIDE.md §5.16). A ComfyUI node, integrations/comfyui/ComfyUI-Radiance-MiniMax, renders through /v1/videos from a ComfyUI graph as a client of the server. MiniMax-H3's license, which FastH3 carries, does not cover the EU, the UK, the Republic of Korea or the USA.

MiniMax-Music3 and Breeze-TTS-2 answer /v1/audio/speech, whole or streamed as they are made: a song from lyrics and a description, 44.1 kHz stereo, made at about the speed it plays on two cards; and speech in a voice the request describes, made in 0.6 of its playing time on one card, its first streamed audio 0.21 s after the request. Breeze-TTS-2 also speaks text while it is being written, over the /v1/audio/speech/stream WebSocket; it is licensed for research and non-commercial use only. Fish Audio's drama-3 speaks a script whose speakers and direction are written in it (<|speaker:1|>, [laughs]), each speaker in the model's voice or one cloned from a reference clip and its transcript, at 0.3 of its playing time on two cards, its first streamed audio 0.23 s after the request; under the Fish Audio Community License a service that lets others generate speech with it needs a licence from Fish Audio, and imitating a real person's voice needs their consent.

Run with Docker

The host needs Docker and an amdgpu driver that supports ROCm 10.1; it does not need ROCm. The card works best with Resizable BAR on (Above 4G Decoding and Resizable BAR in the firmware setup); without it the engine keeps kernel arguments in pinned host memory, and every dispatch reads them over the link. The image is stilldeadcode/radiance, with its kernels built for gfx1201 (RDNA4), gfx11-generic (RDNA3) and gfx1151 (Strix Halo). Pull it, clone this repository for its compose files, then start a model from one of them:

docker pull stilldeadcode/radiance
git clone https://codeberg.org/StillDeadcode/radiance.git
cp -r radiance/deploy/compose ~/radiance-compose && cd ~/radiance-compose
cp .env.example .env                         # set RADIANCE_MODELS, RADIANCE_API_KEY, the GIDs
docker compose -f minicpm5-2b.yaml up -d     # or any file from the table
docker compose -f minicpm5-2b.yaml logs -f
docker compose -f minicpm5-2b.yaml down

Every model listens on the same port and most use both cards, so run one at a time. Running without compose, and the reason for each docker run option, is in docs/DOCKER.md.

To build the image yourself, for example for other cards, run docker/build.sh -t 'gfx1200;gfx1201' in the clone (it needs docker buildx and tests the build as it goes). Then set RADIANCE_IMAGE=radiance:latest in .env.

Build from source

You need Linux, git, a C++20 compiler, CMake 3.21+ and Ninja. For the device kernels you also need ROCm 10.1 or 7.2 (hipcc; set ROCM_PATH if it is not /opt/rocm). Clone the repository and build in it:

git clone https://codeberg.org/StillDeadcode/radiance.git && cd radiance
./build.sh                                   # configure, build for the cards present, run the fast tests
./build.sh --no-hip                          # host backend only
cmake -S . -B build -G Ninja -DRAD_GPU_TARGETS='gfx1201'   # build for cards this machine lacks

To install, name the prefix when the build directory is first configured (-DCMAKE_INSTALL_PREFIX=/opt/radiance), build, then run cmake --install build. The default plugin path, <prefix>/share/radiance, is compiled in from that first configure, so cmake --install build --prefix DIR alone gives a tree that looks for its plugins elsewhere. The prefix gets bin/, include/radiance/, lib/cmake/radiance/, libexec/radiance/, share/radiance/ and share/doc/radiance/.

With ROCm 10.1 the build turns the compiler's VOPD pairing (dual-issue instruction pairs) off: its LLVM 24 pairs in an order that follows heap addresses, so two builds of the same source can differ. The Docker image builds its compiler with the fix and keeps the pairing, which is 1.4-3.5% faster on the fp8 prefill GEMMs; a compiler that has the same fix is declared with -DRAD_HIP_VOPD_REPEATABLE=ON. ROCm 7.2 is unaffected.

Run without Docker

export RADIANCE_HOME=$PWD/build/radiance_home   # the plugins; an install finds its own
build/bin/radiance --model /srv/models/rad/minicpm5-2b-fp8.rad --port 8000 <flags>
build/bin/radiance --model StillDeadcode/minicpm5-2b-fp8 --port 8000 <flags>

--model also takes a Hugging Face repo id, as vLLM does. The server fetches the repo with curl and jq (scripts/hfget.sh) into ~/.cache/radiance/hf (--download-dir puts it elsewhere), serves the container it holds, and checks it for changes at every start; a start that cannot reach the hub serves the copy it has. The Docker image carries both tools; in a container, --download-dir must name a writable mount, since the compose files mount /models read-only.

These rows match the compose files, minus Flash-Next's --prefix-cache-mib; the three- and four-rank rows have no compose file. The other models' flags are in their compose files.

model flags
Qwen3.8-Flash-Next --tp 2 --tp-wire wht6 --max-num-seqs 8 --max-model-len 200000 --placement expert_tiered --host-pool-mib 12288 --gpu-headroom-mib 96 --kv-cache-dtype fp8 --num-speculative-tokens 3 --max-num-batched-tokens 2048
Qwen3.8-Flash-Next, four ranks --tp 4 --max-num-seqs 8 --max-model-len 200000 --placement expert_tiered --host-pool-mib 12288 --gpu-headroom-mib 96 --kv-cache-dtype fp8 --num-speculative-tokens 3 --max-num-batched-tokens 2048
Qwen3.8-Flash-Next, three ranks (the shipped container as it is, docs/TP3.md) --tp 3 --max-num-seqs 8 --max-model-len 200000 --placement expert_tiered --host-pool-mib 8192 --gpu-headroom-mib 96 --kv-cache-dtype fp8 --num-speculative-tokens 3 --max-num-batched-tokens 2048
Qwen3.8-27B FP8 and MXFP4, Qwen3.6-35B-A3B --tp 2 --max-num-seqs 32 --max-model-len 200000 --kv-cache-dtype fp8
Qwen3.8-27B bf16 --tp 2 --max-num-seqs 8 --max-model-len 200000 --kv-cache-dtype fp8
MiniCPM5-2B FP8 and bf16 --tp 2 --max-num-seqs 32 --max-model-len 131072 --kv-cache-dtype fp8 --gpu-headroom-mib 160 --max-num-batched-tokens 512
Qwen3.8-Flash-Next bf16 --tp 2 --max-model-len 32768 --placement expert_tiered --weights-disk-tier --host-pool-mib 12288 --gpu-headroom-mib 768 --deterministic --max-num-seqs 32 --max-num-batched-tokens 32768 --num-speculative-tokens 0
Qwen-Image 2.1 and 2.1 Turbo --tp 2 --tp-wire wht6
MiniMax-H3 and FastH3 --tp 2 --vision-tower-placement ram
MiniMax-Music3 --tp 2
Breeze-TTS-2 --tp 1
Fish Audio drama-3 --tp 2

Every model here runs at up to 32 sequences a step. The Flash-Next rows (except the bf16 reference) and the 27B in bf16 keep 8: on a hybrid model each sequence holds its own recurrent state, and 32 of them take that memory from the attention cache and, on Flash-Next, from the expert slab. See docs/GUIDE.md §4.4.

At --tp 4, decode and verify steps carry the exact all-reduce in the gated residual's write, with the MoE gather in front of it; a prefill chunk runs the unfused chain. That chain's exact all-reduce is one-shot up to 1 MiB a message and two-shot above, which sends half the bytes on a prefill chunk; both produce the same bits. The four-rank row runs exact. At three and four ranks --tp-wire wht6 selects a different lossy wire, tiered int8 over the two-shot, above --tp-wire-min-kb. Eight ranks have no lossy wire, so --tp 8 --tp-wire wht6 stops at startup naming the all-reduce.

Four ranks is a capacity configuration: its per-step rate against --tp 2 on the same cards has not been measured, and its tiering flags are the two-rank recipe carried over. As at two ranks, each rank owns a slice of every expert's width: each parity's 128-column blocks are cut contiguously over the ranks and the odd block alternates with the parity, so every rank's share is whole blocks and every block has one owner. The resident expert bytes per rank are smaller, so the elastic window has a different shape: read the boot log's elastic line and re-derive --host-pool-mib before trusting it.

--host-pool-mib is pinned on every card, so the four-rank row pins 4 × 12 GiB = 48 GiB of RAM that nothing else can use and the kernel cannot swap out. The amdgpu driver caps what all processes together pin at the machine's RAM less 1/64 and 1.5 GiB; the pool is locked user memory, which ttm.pages_limit does not count. A 64 GiB machine serves flashnext-tp1.yaml with 49 GiB pinned (docs/GUIDE.md §7).

Add --api-key KEY to require Authorization: Bearer KEY (or X-Api-Key: KEY). --debug-graph prints every op and the kernel it resolved to, then exits without serving. A chat request:

curl -s localhost:8000/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"m","messages":[{"role":"user","content":"hi"}],"max_tokens":50}'

An image model answers OpenAI's images API instead, with base64 pictures:

curl -s localhost:8000/v1/images/generations -H 'Content-Type: application/json' \
  -d '{"prompt":"a lighthouse on a cliff at sunset, oil painting","size":"1024x1024"}' \
  | python3 -c 'import sys,json,base64; open("out.png","wb").write(base64.b64decode(json.load(sys.stdin)["data"][0]["b64_json"]))'

http://localhost:8000/ is the dashboard. docs/GUIDE.md covers the API, memory budgets, long context, speculative decoding and operating a server.

Convert a checkpoint

rad-convert turns a Hugging Face checkpoint into a container, quantising what a recipe in data/recipes/ names. Download checkpoints with scripts/hfget.sh <org/repo> <dir>.

# Spark X2.6 uses the checkpoint's BF16 weights, tokenizer and chat template; no recipe required.
build/bin/rad-convert /srv/models/hf/XHToken-Spark-X2.6-4B -o spark-x2.6-4b-bf16.rad --max-ctx 4096
build/bin/rad-convert /srv/models/hf/Qwen/Qwen3.8-27B -o qwen3.8-27b-bf16.rad \
    --recipe data/recipes/q38-27b-bf16.recipe
build/bin/rad-convert /srv/models/hf/Qwen/Qwen3.8-Flash-Next -o qwen3.8-flash-next-bf16.rad --max-ctx 4096
build/bin/rad-convert /srv/models/hf/google/gemma-4-31B-it -o gemma4-31b-w4a8.rad \
    --recipe data/recipes/gemma4-31b-dense-bf16-w4a8.recipe \
    --set quantization_config.quant_method=compressed-tensors \
    --draft-model /srv/models/hf/google/gemma-4-31B-it-assistant
build/bin/rad-convert /srv/models/hf/google/gemma-4-31B-it -o gemma4-31b-dense-w4a8-df.rad \
    --recipe data/recipes/gemma4-31b-dense-bf16-w4a8-df.recipe \
    --set quantization_config.quant_method=compressed-tensors \
    --draft-model /srv/models/hf/z-lab/gemma-4-31B-it-DFlash
build/bin/rad-convert /srv/models/hf/google/gemma-4-31B-it -o gemma4-31b-dense-q8-df.rad \
    --recipe data/recipes/gemma4-31b-dense-bf16-q8-df.recipe \
    --set quantization_config.quant_method=compressed-tensors \
    --draft-model /srv/models/hf/z-lab/gemma-4-31B-it-DFlash
build/bin/rad-convert /srv/models/hf/z-lab/Qwen3.8-27B-PARO -o qwen3.8-27b-paro-int4.rad \
    --recipe data/recipes/q38-27b-paro-mxfp4-df2.recipe \
    --draft-model /srv/models/hf/z-lab/Qwen3.8-27B-DFlash2
build/bin/rad-convert /srv/models/hf/ukisai/Swift-1.5-Qwen3.8-27b-W4A16-AWQ -o swift15-27b-w4a16.rad \
    --recipe data/recipes/q38-27b-w4a16.recipe
# Any single-file SDXL checkpoint (SDXL 1.0, Illustrious, NoobAI, Pony, a civitai finetune), with
# CLIP's tokenizer.json from openai/clip-vit-large-patch14
build/bin/rad-convert /srv/models/hf/OnomaAIResearch/Illustrious-XL-v2.0/Illustrious-XL-v2.0.safetensors \
    -o illustrious-xl-v2.0-bf16.rad --recipe data/recipes/sdxl-bf16.recipe \
    --tokenizer /srv/models/hf/openai/clip-vit-large-patch14/tokenizer.json

With Docker, use docker run --rm -v /srv/models:/models --entrypoint rad-convert stilldeadcode/radiance .... In the image the recipes are in /opt/radiance/share/radiance/recipes/. A checkpoint served at its own precision needs no container: radiance --model /srv/models/hf/Qwen/Qwen3.8-27B-FP8. A release someone else quantised is read as it ships when the engine serves its form (block-scaled FP8, Quark's MXFP4), written at its own numbers when the kernels read them in another spelling (an int4 W4A16 release, compressed-tensors' AWQ and GPTQ or AutoRound's, on the 4-bit GEMMs with data/recipes/q38-27b-w4a16.recipe), and converted from its exact dequantisation when no kernel reads it: NVFP4 (compressed-tensors' and NVIDIA ModelOpt's) to the MXFP4 kernels, an AutoRound Flash-Next's int4 block projections to int8. docs/GUIDE.md names the recipes of record with their rad-convert commands.

Spark X2.6 runs BF16 at --tp 1, 2, 3 or 4 -- and 8, the worlds libr4d has an exact all-reduce for -- without a drafter or quantisation recipe. Its checkpoint's chat template enables thinking by default; replies return reasoning in reasoning_content. Set chat_template_kwargs.enable_thinking to false for a non-thinking request. Tool calls use the checkpoint's tagged format and are returned as OpenAI tool_calls.

Test

ctest --test-dir build -L fast -j8         # the inner loop, under 15 s; build.sh runs it
ctest --test-dir build -LE 'gpu|oot' -j8   # everything that runs without a card (about 5 minutes)
ctest --test-dir build -L gpu              # the card tests; they need the cards to themselves
ctest --test-dir build -L oot              # rebuilds every bundled plugin out of tree against an install

CMakePresets.json names the same runs (ctest --preset fast, host, gpu, full, asan), and docs/GUIDE.md §1.3 describes the tiers and the test binaries' options.

Documentation

docs/GUIDE.md installing, converting, serving, the HTTP API, operating a server
docs/TOOLS.md every flag of every tool, and the recipe syntax
docs/DOCKER.md the image and the compose files
docs/PREPARING_YOUR_RIG.md a two-R9700 machine from firmware setup to a serving model
docs/PLUGIN.md writing a kernel library, architecture or quantiser plugin, including one for another AMD card
docs/ARCHITECTURES.md the supported model families and their geometry
docs/TP3.md any world size: the attention world and uneven delta-net heads; three ranks
docs/OPS.md, docs/KERNELS.md the op vocabulary, and what rad-kbench last measured
spec.md the design

License

Apache-2.0, copyright Deadcode and the radiance contributors. Keep NOTICE with any copy or derivative. It credits the authors and lists the MIT-licensed code the tree includes. The model weights are not covered: each keeps the license of the model it was converted from. The Docker image also holds third-party libraries under their own licenses, GPL and LGPL among them; /usr/share/doc/THIRD-PARTY in the image lists each one with its version and source.

S
Description
No description provided
Readme Apache-2.0
85 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 76.1%
HIP 18.5%
C 2.1%
Python 1.4%
Shell 0.6%
Other 1.2%