# 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 --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, which the int8 gated products have no form # for, so this recipe's forms do not serve it. 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