radiance 1.8.0

- video: MiniMax-H3 and FastVideo's FastH3 8-Step V2, a video with its stereo soundtrack from text
  on OpenAI's /v1/videos, block fp8 on two cards
- music: MiniMax-Music3, songs from lyrics and a description on /v1/audio/speech
- speech: Breeze-TTS-2 on /v1/audio/speech and vLLM-Omni's realtime WebSocket
- runtime LoRA adapters beside the base model, picked per request by `model` (baKon, #105)
- several agent streams keep their cached history: --checkpoint-slots auto, the new default, sizes
  the snapshot store by --max-num-seqs (#108)
- the Swift 1.5 27B W4 releases convert and serve: compressed-tensors AWQ and GPTQ int4, AutoRound,
  ModelOpt NVFP4 (#110)
- the image's host tests pass where perf_event_open is refused, as in BuildKit's sandbox (#106)
- plugin ABI 21: out-of-tree plugins must be rebuilt
This commit is contained in:
Deadcode committed 2026-10-18 11:38:37 +02:00
1 parent 91127395ee
commit 7a7707a955
179 files changed
+37542 -1892

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# breeze-tts2-bf16.recipe -- Breeze-TTS-2 served at bf16, the precision its reference runs the
# text encoder, the backbone and the depth decoder at.
#
# rad-convert <Breeze-TTS-2 directory> \
# --recipe data/recipes/breeze-tts2-bf16.recipe -o breeze-tts2-bf16.rad
#
# The directory holds the model and, in audio_tokenizer/, the codec it plays frames through; both
# are read as one checkpoint. The model ships bf16 and is kept. The depth decoder's heads are
# stored (in, out) and are transposed here. The codec ships f32: its linears and convolutions are
# cast to bf16 here, its codebooks divided by their usage first (an EMA codebook), while its norms,
# layer scales and snake parameters stay f32 -- read once a pass or less.
dep.heads.weight cast dtype=bf16
codec.*.n1.weight cast dtype=f32
codec.*.n2.weight cast dtype=f32
codec.*.ls1.weight cast dtype=f32
codec.*.ls2.weight cast dtype=f32
codec.norm.weight cast dtype=f32
codec.up*.ln.* cast dtype=f32
codec.up*.gamma cast dtype=f32
codec.*.alpha cast dtype=f32
codec.*.beta cast dtype=f32
codec.* cast dtype=bf16
+46
View File
@@ -0,0 +1,46 @@
# minimax-h3-fp8.recipe -- MiniMax-H3 (text to video and audio) with block-scaled fp8 linears.
#
# rad-convert <MiniMax-H3 pipeline directory> --recipe data/recipes/minimax-h3-fp8.recipe \
# -o minimax-h3-fp8.rad
#
# The directory needs the text-to-video-and-audio components only: text_encoder/, transformer/,
# vae/, audio_vae/, the processor or tokenizer and both scheduler folders (transformer_ref/ and
# the original-layout FL2VA/ and Ref2VA/ are not read).
#
# FastVideo's FastH3 releases (the denoiser distilled to eight steps with video sparse attention)
# take the same recipe: their text encoder and decoders are MiniMax-H3's files, so a container of
# the base model can supply them, with every transformer tensor listed as changed:
#
# rad-convert <FastH3 directory> --recipe data/recipes/minimax-h3-fp8.recipe \
# --reuse minimax-h3-fp8.rad --changed <the transformer's tensor names, "transformer." first> \
# -o fasth3-8step-fp8.rad
#
# Every linear of the text encoder's first 50 layers, of the token refiner and of the DiT's 50
# blocks, and the per-modality modulation projections, become E4M3 codes with a bf16 scale a
# 128 x 128 block, read by the fp8a8 GEMMs. What keeps the checkpoint's precision is read once a
# step or less: the embedding table, context_embedder and norm_out (bf16), the timestep MLP and the
# four patch projections (f32), every norm and bias. The video decoder's linears are cast to bf16
# from the checkpoint's f32, its norms, layer scales, biases and register tokens stay f32; the
# audio decoder stays f32 (its weight norms folded at convert).
te.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
te.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
te.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
te.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
te.blk.*.attn_norm.weight cast dtype=f32
te.blk.*.ffn_norm.weight cast dtype=f32
ref.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
ref.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
ref.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
ref.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dit.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dit.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dit.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dit.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dit.blk.*.ada*.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
vae.blk.*.attn_qkv.weight cast dtype=bf16
vae.blk.*.attn_out.weight cast dtype=bf16
vae.blk.*.ffn_up.weight cast dtype=bf16
vae.blk.*.ffn_down.weight cast dtype=bf16
vae.proj_out.* cast dtype=bf16
aud.*.weight cast dtype=f32
+18
View File
@@ -0,0 +1,18 @@
# minimax-music3-bf16.recipe -- MiniMax-Music3 served at bf16, the precision diffusers runs it at.
#
# rad-convert <MiniMax-Music3 pipeline directory> \
# --recipe data/recipes/minimax-music3-bf16.recipe -o minimax-music3-bf16.rad
#
# The language model and the depth decoder ship bf16 and are kept. The DiT, the condition encoder
# and the vocoder ship f32: their linears and convolutions are cast to bf16 here, once (the
# vocoder's weight norm folded in f32 first, rad_builder.h's RAD_MAP_WNORM), while their norms, the
# snake alphas, the Fourier projection and the layer mix stay f32 -- read once a pass or less.
dit.*.ln1.* cast dtype=f32
dit.*.ln2.* cast dtype=f32
dit.t.fourier cast dtype=f32
dit.* cast dtype=bf16
cond.mix.* cast dtype=f32
cond.* cast dtype=bf16
voc.*.alpha cast dtype=f32
voc.* cast dtype=bf16
@@ -0,0 +1,39 @@
# q38-27b-modelopt-nvfp4.recipe -- an NVIDIA ModelOpt NVFP4 release of Qwen3.8-27B (or a finetune of
# it, such as ukisai's Swift 1.5 NVFP4): FP8 attention and delta-net projections, NVFP4 MLPs and head.
#
# rad-convert <ModelOpt NVFP4 release> --recipe data/recipes/q38-27b-modelopt-nvfp4.recipe -o model.rad
#
# The release is ModelOpt's MIXED_PRECISION: the attention q, k, v and output and the delta net's
# qkv, z and output projections are FP8 with one f32 scale per tensor; the MLPs and the lm_head are
# NVFP4 (e2m1 codes, an e4m3 scale per 16 of K, times an f32 weight_scale_2 per tensor); the delta
# net's a/b projections, the norms, the embedding, the vision tower and the MTP head are bf16. Its
# static input scales are not read: activations are quantised from their own values.
#
# - The FP8 projections keep their codes. The import rule writes each tensor's scale as the
# block plane the block-fp8 GEMM reads, rounded to bf16: one factor for the whole tensor, off
# by at most 2^-8 (3.3e-3 on Swift 1.5's 208 tensors); qkv and z keep their own scales, each
# a whole number of 128-row blocks.
# - No kernel reads NVFP4, so the MLPs are made OCP-MXFP4 (`fp4_e2m1`, an e8m0 scale per 32 of
# K, the encoding and kernel of q38-27b-quark-mxfp4-df2.recipe) from their exact values. That
# rounds twice (e4m3 scales per 16 to a power of two per 32): 0.116 relative error against
# the release's NVFP4 values on Swift 1.5, and unsloth's NVFP4 release made MXFP4 this way
# scores mean KL 0.287 against the block-fp8 base, AMD's Quark MXFP4 0.206.
# `codes=fp8_e4m3 block=128x128 scale=bf16` on the two MLP rules instead keeps them within
# 0.027 of the release at 28.2 GiB of weights against 20.8.
# - The head is block fp8 from its exact NVFP4 values, as in the other 27B recipes.
# - The MTP head stays bf16 as shipped (blk.64 is its layer); it drafts through a 2-bit copy of
# the head (u2 with a u8 zero, least-squares clip search) rescored against the fp8 head.
blk.*.attn_qg.weight import block=128x128 scale=bf16
blk.*.attn_k.weight import block=128x128 scale=bf16
blk.*.attn_v.weight import block=128x128 scale=bf16
blk.*.attn_output.weight import block=128x128 scale=bf16
blk.*.ssm_inz.weight import block=128x128 scale=bf16
blk.*.ssm_out.weight import block=128x128 scale=bf16
blk.64.ffn_*.weight cast dtype=bf16
blk.*.ffn_gate_up.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
blk.*.ffn_down.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
mtp.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search
+27
View File
@@ -0,0 +1,27 @@
# q38-27b-w4a16.recipe -- an int4 W4A16 release of Qwen3.8-27B (or a finetune of it, such as
# ukisai's Swift 1.5 W4A16-AWQ, INT4 and W4A16-AutoRound), served at the 4-bit weights it ships.
#
# rad-convert <int4 release> --recipe data/recipes/q38-27b-w4a16.recipe -o model.rad
#
# The releases read are compressed-tensors' pack-quantized int4 in groups of 128, symmetric or
# asymmetric with a zero point per group (llm-compressor's AWQ, W4A16_ASYM), act-order none or
# `static`, and AutoRound's `auto_round:auto_gptq` export (symmetric, group 128). rad-convert
# imports each linear as it ships and the import rule writes it in the form the 4-bit GEMMs read:
# u4 codes, an f16 scale and a u4 zero point per 128 of K, a symmetric grid's codes made unsigned
# under a zero of 8. The numbers are the release's: every code and zero point as shipped, every
# f16 scale as shipped, and a bf16 scale converted to f16, which holds it exactly unless it lies
# below f16's normal range (2^-14); rad-convert reports how many it rounded.
#
# Served by the family's quantised plugin (qwen35_fp8): w4a16_asym over the input cast to f16 at
# up to 64 rows a step, w4a8i8_asym over an int8 activation with a scale per (row, 128) above.
#
# What the release keeps in bf16 stays bf16: the delta net's a/b projections, the norms, the
# embedding, the vision tower and the MTP head. Its head is made block fp8 as in the other 27B
# recipes (the widest GEMM, read every step, at half the bytes), and the MTP head drafts through a
# 2-bit copy of it (u2 with a u8 zero, least-squares clip search) whose top candidates the engine
# rescores against the fp8 head.
blk.*.weight import codes=u4 zero=u4 scale=f16
output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
mtp.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search