A Ternarization Toolchain for Mixture-of-Experts Models That Run on a Consumer APU: Three Sizes of a 35B Model, a Ternary MTP Head, and llama.cpp Kernels
We ternarize Ornith-1.5-35B-A3B, a 35B hybrid mixture-of-experts, into three files from a frozen multi-plane ternary checkpoint (the root), with experts from an unpriced forge, trained end to end against the teacher (at least 42 recorded GPU hours); every later step ran on consumer hardware (one APU and, for 2.25 GPU hours, a laptop GPU), except the multitoken-prediction (MTP) head and fold statistics. S (8.82 GiB) and M (12.19 GiB) allocate ternary planes under a byte cap, fold a trained expert correction (zero bytes, unchanged decode speed) and distil scales and float tensors. M keeps 99.34 % of the Q8_0 teacher on full MMLU at the size of Q2_K, not significantly different from it (−0.53 points, cluster 95 % CI −1.46 to +0.48), +2.38 points above Q2_K and level with Q4_K_M on the same engine with 59.9 % of its bytes (−0.10, CI −1.20 to +1.19); it is significantly below the teacher on 1 of 9 likelihood tasks. S keeps 96.59 %, 6.09 points above the larger IQ2_XXS, and leads it on C4 perplexity; on C4 M trails Q2_K on top-1 agreement and KL. Selection on MMLU test questions makes these intervals nominal. Every file carries a working MTP head whose attention, routed and shared experts and eh_proj are ternary: one draft token raises decode speed by 16.8 % (S), 13.2 % (M) and 4.5 % (XS) on the launch engine at 70.1–75.1 % acceptance. A single-plane conversion goes from 65.20 to 73.15 on MMLU-2000 (284/125); a re-run from the root gives 72.75 (p = 0.43). The resulting XS keeps 89.70 % (CI 87.21–92.00 %), scoring 72.29 against 54.14 for the larger IQ1_M; its trits convert bit-exactly to PrismML's PTQ1_0 and upstream Q2_0 with no significant MMLU difference on three runtimes, where our kernels decode them faster (Vulkan: 92.88 against 85.69 tokens/s); the conversions are not released, as those runtimes do not use the head. We add Vulkan TQ1_0 support (merged) and packed multi-plane types to llama.cpp. Caveats are in Sections 5.
Authors
- Angelo Mogavero
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-24
- DOI
- https://doi.org/10.5281/zenodo.24499705
- Primary Topic
- Advanced Neural Network Applications
- Type
- preprint