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.
Files
radiance-sycl/data/recipes/ling-3.0-tiny-iq8r.recipe
T
keptn42 33f9644701 bailing_hybrid: Ling-3.0-flash on an IQ8R trunk
Flash clamps its SwiGLU in its last layers (routed 35-41, shared 34-41). The plugin and MoeFP8's
check for int8 activations refused a rotated int8 trunk over them, since the int8 gated products
had no clamped form. With the previous commit they have one, so both refusals go. MoeFP8
keeps the refusal for a W5NL down projection: no clamp writes its rotated E4M3 codes.

flash_iq8r_clamps_its_gated_products_then_quantises_them_rotated declares flash's IQ8R container
at one, two and four ranks, every rank: 15 swiglu_step, each followed by had_quant_act_i8g reading
its plane at group 128; against the same container without the clamp lists 15 ops more and 15
gated_had_quant_i8g fewer, and no unrotated int8 or E4M3 quantiser. The steps run lint-clean. It
fails without the previous commit. The graph hashes of the bf16 and four-bit containers stay the
same. bailing_hybrid_arch_test: 9 of 9 pass; ctest -LE 'gpu|oot': 181 of 181 (3 skipped).
2026-11-17 18:26:13 +01:00

45 lines
3.1 KiB
Plaintext

# ling-3.0-tiny-iq8r.recipe -- Ling-3.0-tiny from its bf16 release with an IQ8R trunk and rotated
# int8 experts, served by bailing_hybrid.
#
# rad-convert <Ling-3.0-tiny bf16 checkpoint> --recipe data/recipes/ling-3.0-tiny-iq8r.recipe \
# -o ling-3.0-tiny-iq8r.rad
#
# - IQ8R: the KDA projections (q|k|v fused, forget, gate, output), the MLA output, the dense
# layer's feed-forward and the shared expert's gate/up as int8 codes in -127..127 with one u8
# scale per (row, 256 of K) under one bf16 scale a row, each 128 of K rotated by the
# unnormalised Hadamard before rounding (`transform=fwht128`). Round to nearest with a scale
# search; no calibration data is read.
# - The 128 routed experts of every layer and the shared expert's down projection as int8 on the
# same rotated grid with one bf16 scale per (row, 128 of K): an expert is 512 columns.
# - Kept bf16: the KDA beta projection, the MLA's low-rank q and kv projections and its gate, the
# conv1d weights, the router, the embedding and the lm_head.
#
# Serves at --tp 1 or 2: at 4 the dense layer's 1152-column slice cuts a 256-column scale group.
# Ling-3.0-flash clamps its SwiGLU in its last layers; on this trunk those layers write the bf16
# product and quantise it after, one launch more a layer (docs/ARCHITECTURES.md).
blk.*.attn_qkv.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.attn_forget.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.attn_gate.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.attn_output.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.ffn_gate_up.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.ffn_down.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.ffn_gate_up_shexp.weight rtn codes=i8 group=256 scale=u8 scale2=bf16 block2=1x* transform=fwht128 clamp=sym rule=search
blk.*.ffn_gate_up_exps.*.weight rtn codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search
blk.*.ffn_down_exps.*.weight rtn codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search
blk.*.ffn_down_shexp.weight rtn codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search
# The shared blocks declare their gains and router correction as f32 planes (A_log and dt_bias
# ship f32 in the checkpoint), so they keep the f32 form the plugin reads.
blk.*.attn_norm.weight cast dtype=f32
blk.*.attn_q_a_norm.weight cast dtype=f32
blk.*.attn_kv_a_norm.weight cast dtype=f32
blk.*.ffn_norm.weight cast dtype=f32
blk.*.ssm_norm.weight cast dtype=f32
blk.*.ssm_a cast dtype=f32
blk.*.ssm_dt_bias cast dtype=f32
blk.*.glm_router.weight cast dtype=f32
blk.*.glm_router.correction cast dtype=f32
output_norm.weight cast dtype=f32