# Trillim CPU benchmarks

**141 text configurations, including 138 llama.cpp comparisons; plus two image models at 4/10/20 threads and two resolutions.**

Apple M3 Ultra, 28 CPU cores, 256 GiB RAM. CPU only; no Metal/GPU execution. The original text matrix used Trillim `e14da4f` plus the seeded-Random matcher fix; llama.cpp is frozen at `a8ad690ca`, Release, Apple Accelerate BLAS enabled, KleidiAI disabled. Eleven text rows were rerun with Trillim `6a48852` plus the current uncommitted NEON kernels. Other text rows retain their original measurements. The runtime worker is unchanged, and kernels were frozen throughout each measurement pass. Lint, strict type checking and all 559 project tests passed before this refresh.

**Kernel refresh:** reran the 11 text configurations where the original TTFT or decode result was more than 1.5× slower than llama.cpp. The original llama.cpp measurements, prompt IDs, generation limits and sampling settings are retained. Existing validated execution plans use the refreshed native library; scratch reservations were updated to its declared requirements. Regenerated BF16 weight bundles matched the original manifests and source hashes and were removed after measurement. The image results below use the same current kernel bank.

Each request combines a randomly chosen 256–512-token prompt with independent autoregressive generation, capped at a randomly chosen 128–256 tokens. EOS is respected. Identical prompt IDs and caps are used for both engines and all rows within a model. Sampling: temperature **0.3**, top-k **5**, top-p **0.9**, seed **42**. RNG implementations differ, so generated continuations need not match. No teacher forcing or forced continuations.

One full warmup is discarded; the table reports the median of two subsequent requests. TTFT runs from request submission to the first sampled token. Decode throughput is `(output_tokens − 1) / (last_token_time − first_token_time)`. Model loading, compilation, input tokenization and output detokenization are excluded; Trillim includes its Python-to-worker request and token-streaming bridge. Only a timestamp and token ID are recorded per emitted token, with logging deferred until completion. Engines, compilation and weight conversion run serially.

**T / L** means Trillim / llama.cpp. Both speedup columns favor higher values: TTFT speedup = llama.cpp latency / Trillim latency; decode speedup = Trillim throughput / llama.cpp throughput. **2× means twice as fast; 0.5× means half as fast.** Ratios use unrounded measurements. Output lengths include the EOS token when emitted. Short natural completions are retained and their actual lengths shown.

Q4 = Q4_0, Q5 = Q5_0, Q6 = Q6_K, Q8 = Q8_0, with the matching Trillim formats. Binary/ternary models use only their native precision. Dense-model GGUFs are repacked from the exact Trillim payloads where supported; Qwen hybrid models use the stock converter's architectural head permutations; their integer formats are independently quantized from the same checkpoint. Attention caches use BF16 in both engines, except Bonsai 2/2.5, which use FP16 in both. Each engine keeps its existing activation arithmetic, including dynamic INT8 activation rounding in quantized kernels. The text plans implement full-model inference; refreshed rows retain the validated graphs with the current kernel bank. Vision inputs are empty for text requests.

**Trillim uses tuned executable plans, not the untuned compiler default.** Competing compute kernels are timed at representative row counts 1, 8 and 64 where shape constraints permit, separately for 4/10/20 threads, before any request measurement. Timing probes use the existing kernel implementations; they do not add a new scalar-equality requirement to previously accepted quantized arithmetic. The default compile flow does not reliably reproduce these selections and can choose a substantially slower generic kernel.

Scope: text-to-text launch models, plus the previously tested binary/ternary Bonsai 1.7B variants and Bonsai 2.5 27B. GPT-OSS 120B and llama-bitnet remain excluded; Parakeet, PocketTTS and Whisper are audio models outside the text tables. Bonsai-Image and FLUX.2 image requests are reported separately below.

Trillim has lower TTFT in **127/138** paired text configurations and higher decode throughput in **124/138**. TTFT speedups range from **0.72× to 2.51×**; decode speedups range from **0.79× to 8.60×**. These counts combine the 11 refreshed rows with the unchanged original rows; they are not a rerun of the entire matrix.

## Homepage comparison

The homepage reports the median of the paired comparisons across all 138 text configurations. Each configuration gets equal weight.

- **Effective prefill was 36% faster.** Effective prompt throughput divides prompt tokens by time to first token. Both engines received the same prompt in each pair, so the ratio is llama.cpp TTFT divided by Redwood TTFT. This measure includes producing the first token.
- **Decode was 19% faster.** The per-configuration ratio is Redwood decode throughput divided by llama.cpp decode throughput.
- **Request latency was about 26% lower.** Estimated request latency adds TTFT in seconds to `(output_tokens − 1) / decode_tokens_per_second`. All 138 pairs produced matching output lengths. The estimate uses the reported medians for TTFT and decode.

## Gemma 3 1B IT

Prompt: **499 tokens**; generation limit: **241 tokens**, stopping at EOS.

Q6 uses Q8 for matrix widths that cannot use Q6_K.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 681.9 / 1529.1 | **2.24×** | 135.22 / 114.16 | **1.18×** | 241 / 241 | cap / cap |
| Q4 | 10 | 304.7 / 660.2 | **2.17×** | 190.11 / 111.74 | **1.70×** | 241 / 241 | cap / cap |
| Q4 | 20 | 166.0 / 348.7 | **2.10×** | 242.11 / 109.77 | **2.21×** | 241 / 241 | cap / cap |
| Q5 | 4 | 992.9 / 1180.5 | **1.19×** | 102.14 / 71.95 | **1.42×** | 241 / 241 | cap / cap |
| Q5 | 10 | 490.4 / 710.4 | **1.45×** | 157.35 / 95.89 | **1.64×** | 241 / 241 | cap / cap |
| Q5 | 20 | 314.8 / 565.9 | **1.80×** | 207.57 / 100.42 | **2.07×** | 241 / 241 | cap / cap |
| Q6 | 4 | 681.0 / 1711.6 | **2.51×** | 96.53 / 79.40 | **1.22×** | 241 / 241 | cap / cap |
| Q6 | 10 | 298.4 / 746.8 | **2.50×** | 150.56 / 85.31 | **1.76×** | 241 / 241 | cap / cap |
| Q6 | 20 | 169.8 / 397.6 | **2.34×** | 167.59 / 92.45 | **1.81×** | 241 / 241 | cap / cap |
| Q8 | 4 | 671.8 / 1522.4 | **2.27×** | 109.33 / 85.65 | **1.28×** | 241 / 241 | cap / cap |
| Q8 | 10 | 298.1 / 660.9 | **2.22×** | 145.91 / 86.00 | **1.70×** | 241 / 241 | cap / cap |
| Q8 | 20 | 166.9 / 358.8 | **2.15×** | 164.11 / 82.84 | **1.98×** | 241 / 241 | cap / cap |
| BF16 | 4 | 1458.5 / 1248.8 | **0.86×** | 29.35 / 5.31 | **5.53×** | 241 / 241 | cap / cap |
| BF16 | 10 | 671.2 / 700.3 | **1.04×** | 55.84 / 12.82 | **4.36×** | 241 / 241 | cap / cap |
| BF16 | 20 | 468.8 / 569.5 | **1.21×** | 75.88 / 22.19 | **3.42×** | 241 / 241 | cap / cap |
| FP16 | 4 | 668.4 / 1194.0 | **1.79×** | 48.31 / 47.02 | **1.03×** | 241 / 241 | cap / cap |
| FP16 | 10 | 352.7 / 718.4 | **2.04×** | 84.76 / 59.78 | **1.42×** | 241 / 241 | cap / cap |
| FP16 | 20 | 491.9 / 564.4 | **1.15×** | 85.98 / 70.47 | **1.22×** | 241 / 241 | cap / cap |

## Qwen3 8B

Prompt: **283 tokens**; generation limit: **140 tokens**, stopping at EOS.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 3407.9 / 4622.0 | **1.36×** | 22.03 / 21.28 | **1.03×** | 140 / 140 | cap / cap |
| Q4 | 10 | 1411.1 / 2037.8 | **1.44×** | 32.30 / 32.73 | **0.99×** | 140 / 140 | cap / cap |
| Q4 | 20 | 753.8 / 1044.0 | **1.39×** | 47.99 / 34.72 | **1.38×** | 140 / 140 | cap / cap |
| Q5 | 4 | 1764.6 / 2782.8 | **1.58×** | 16.06 / 12.94 | **1.24×** | 140 / 140 | cap / cap |
| Q5 | 10 | 1517.7 / 2304.9 | **1.52×** | 34.33 / 20.38 | **1.68×** | 140 / 140 | cap / cap |
| Q5 | 20 | 1531.2 / 1969.6 | **1.29×** | 40.10 / 31.66 | **1.27×** | 140 / 140 | cap / cap |
| Q6 | 4 | 3308.1 / 6955.8 | **2.10×** | 15.91 / 14.08 | **1.13×** | 140 / 140 | cap / cap |
| Q6 | 10 | 1371.0 / 2978.5 | **2.17×** | 28.69 / 20.76 | **1.38×** | 140 / 140 | cap / cap |
| Q6 | 20 | 762.5 / 1558.2 | **2.04×** | 34.46 / 28.53 | **1.21×** | 140 / 140 | cap / cap |
| Q8 | 4 | 3231.9 / 4746.4 | **1.47×** | 18.89 / 18.74 | **1.01×** | 140 / 140 | cap / cap |
| Q8 | 10 | 1388.3 / 2023.6 | **1.46×** | 24.24 / 21.99 | **1.10×** | 140 / 140 | cap / cap |
| Q8 | 20 | 753.6 / 1046.9 | **1.39×** | 27.73 / 23.72 | **1.17×** | 140 / 140 | cap / cap |
| BF16 | 4 | 4205.2 / 3034.4 | **0.72×** | 4.65 / 0.70 | **6.69×** | 140 / 140 | cap / cap |
| BF16 | 10 | 1785.5 / 2384.8 | **1.34×** | 10.50 / 1.65 | **6.37×** | 140 / 140 | cap / cap |
| BF16 | 20 | 1409.6 / 1941.4 | **1.38×** | 13.15 / 3.27 | **4.03×** | 140 / 140 | cap / cap |
| FP16 | 4 | 3644.4 / 2818.0 | **0.77×** | 7.08 / 7.26 | **0.97×** | 140 / 140 | cap / cap |
| FP16 | 10 | 1547.2 / 2364.6 | **1.53×** | 14.20 / 13.29 | **1.07×** | 140 / 140 | cap / cap |
| FP16 | 20 | 1375.4 / 2077.7 | **1.51×** | 14.87 / 14.12 | **1.05×** | 140 / 140 | cap / cap |

## Qwen3.5 4B

Prompt: **265 tokens**; generation limit: **234 tokens**, stopping at EOS.

Refreshed rows: **Q5 / 20 threads**, **BF16 / 4 threads**.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 2007.4 / 2205.2 | **1.10×** | 35.85 / 36.79 | **0.97×** | 234 / 234 | cap / cap |
| Q4 | 10 | 866.8 / 973.3 | **1.12×** | 55.88 / 50.63 | **1.10×** | 234 / 234 | cap / cap |
| Q4 | 20 | 483.8 / 512.6 | **1.06×** | 67.14 / 50.72 | **1.32×** | 234 / 234 | cap / cap |
| Q5 | 4 | 1325.5 / 1401.3 | **1.06×** | 26.89 / 22.19 | **1.21×** | 234 / 234 | cap / cap |
| Q5 | 10 | 1097.3 / 1215.0 | **1.11×** | 52.01 / 33.85 | **1.54×** | 234 / 234 | cap / cap |
| Q5 | 20 | 1029.7 / 1014.4 | **0.99×** | 58.81 / 48.38 | **1.22×** | 234 / 234 | cap / cap |
| Q6 | 4 | 1976.9 / 3329.4 | **1.68×** | 26.49 / 24.58 | **1.08×** | 234 / 234 | cap / cap |
| Q6 | 10 | 844.1 / 1428.7 | **1.69×** | 43.31 / 33.41 | **1.30×** | 234 / 234 | cap / cap |
| Q6 | 20 | 481.5 / 750.7 | **1.56×** | 50.99 / 46.42 | **1.10×** | 234 / 234 | cap / cap |
| Q8 | 4 | 1982.1 / 2197.8 | **1.11×** | 28.99 / 33.67 | **0.86×** | 234 / 234 | cap / cap |
| Q8 | 10 | 855.5 / 961.2 | **1.12×** | 36.96 / 36.09 | **1.02×** | 234 / 234 | cap / cap |
| Q8 | 20 | 483.2 / 512.3 | **1.06×** | 42.92 / 36.95 | **1.16×** | 234 / 234 | cap / cap |
| BF16 | 4 | 1424.0 / 1593.5 | **1.12×** | 8.15 / 1.26 | **6.46×** | 234 / 234 | cap / cap |
| BF16 | 10 | 1105.9 / 1182.4 | **1.07×** | 17.40 / 3.05 | **5.70×** | 234 / 234 | cap / cap |
| BF16 | 20 | 831.4 / 1062.4 | **1.28×** | 21.18 / 5.70 | **3.71×** | 234 / 234 | cap / cap |
| FP16 | 4 | 2007.0 / 1460.2 | **0.73×** | 12.93 / 12.91 | **1.00×** | 234 / 234 | cap / cap |
| FP16 | 10 | 924.1 / 1256.5 | **1.36×** | 23.42 / 22.00 | **1.06×** | 234 / 234 | cap / cap |
| FP16 | 20 | 814.7 / 1113.5 | **1.37×** | 24.64 / 23.14 | **1.06×** | 234 / 234 | cap / cap |

## Zeta 7B

Prompt: **295 tokens**; generation limit: **211 tokens**, stopping at EOS.

Refreshed rows: **BF16 / 4 threads**.

Code completion with fill-in-the-middle markers.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 3309.5 / 4280.3 | **1.29×** | 23.88 / 24.81 | **0.96×** | 11 / 11 | EOS / EOS |
| Q4 | 10 | 1357.8 / 1822.6 | **1.34×** | 45.96 / 39.72 | **1.16×** | 11 / 11 | EOS / EOS |
| Q4 | 20 | 735.0 / 946.9 | **1.29×** | 54.22 / 46.90 | **1.16×** | 11 / 11 | EOS / EOS |
| Q5 | 4 | 1822.4 / 2389.8 | **1.31×** | 17.53 / 14.60 | **1.20×** | 11 / 11 | EOS / EOS |
| Q5 | 10 | 1397.6 / 1999.0 | **1.43×** | 37.58 / 23.62 | **1.59×** | 11 / 11 | EOS / EOS |
| Q5 | 20 | 1302.8 / 1815.7 | **1.39×** | 45.02 / 37.98 | **1.19×** | 11 / 11 | EOS / EOS |
| Q6 | 4 | 3207.5 / 6522.7 | **2.03×** | 16.99 / 15.91 | **1.07×** | 11 / 11 | EOS / EOS |
| Q6 | 10 | 1348.5 / 2725.5 | **2.02×** | 33.48 / 24.48 | **1.37×** | 11 / 11 | EOS / EOS |
| Q6 | 20 | 713.3 / 1419.9 | **1.99×** | 38.25 / 33.71 | **1.13×** | 11 / 11 | EOS / EOS |
| Q8 | 4 | 3254.0 / 4403.3 | **1.35×** | 19.06 / 22.72 | **0.84×** | 11 / 11 | EOS / EOS |
| Q8 | 10 | 1367.1 / 1857.5 | **1.36×** | 26.25 / 25.63 | **1.02×** | 11 / 11 | EOS / EOS |
| Q8 | 20 | 738.3 / 928.1 | **1.26×** | 30.61 / 26.82 | **1.14×** | 11 / 11 | EOS / EOS |
| BF16 | 4 | 2123.0 / 2646.3 | **1.25×** | 5.04 / 0.75 | **6.73×** | 11 / 11 | EOS / EOS |
| BF16 | 10 | 1704.5 / 1946.5 | **1.14×** | 11.43 / 1.79 | **6.38×** | 11 / 11 | EOS / EOS |
| BF16 | 20 | 1354.0 / 1622.5 | **1.20×** | 15.09 / 3.58 | **4.21×** | 11 / 11 | EOS / EOS |
| FP16 | 4 | 3211.1 / 2380.2 | **0.74×** | 8.47 / 8.02 | **1.06×** | 11 / 11 | EOS / EOS |
| FP16 | 10 | 1349.8 / 2058.8 | **1.53×** | 15.91 / 14.78 | **1.08×** | 11 / 11 | EOS / EOS |
| FP16 | 20 | 1267.0 / 1747.2 | **1.38×** | 16.43 / 15.48 | **1.06×** | 11 / 11 | EOS / EOS |

## Sweep Next Edit v2 7B

Prompt: **271 tokens**; generation limit: **141 tokens**, stopping at EOS.

Refreshed rows: **Q5 / 20 threads**, **BF16 / 4 threads**.

Code-edit request using the model card's original/current/updated sections.

The stop set also includes the model's `<|file_sep|>` end-of-edit marker.

Sweep Q5 / 20-thread TTFT varied from **1.10s to 3.04s** across the two measured requests; the table retains their median.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 3046.1 / 3887.5 | **1.28×** | 24.11 / 24.95 | **0.97×** | 52 / 52 | EOS / EOS |
| Q4 | 10 | 1268.5 / 1680.4 | **1.32×** | 43.73 / 38.80 | **1.13×** | 52 / 52 | EOS / EOS |
| Q4 | 20 | 676.3 / 863.9 | **1.28×** | 54.24 / 44.22 | **1.23×** | 52 / 52 | EOS / EOS |
| Q5 | 4 | 1745.0 / 2176.3 | **1.25×** | 17.26 / 14.64 | **1.18×** | 52 / 52 | EOS / EOS |
| Q5 | 10 | 1327.3 / 1808.9 | **1.36×** | 38.94 / 23.87 | **1.63×** | 52 / 52 | EOS / EOS |
| Q5 | 20 | 2067.4 / 1653.4 | **0.80×** | 43.22 / 37.04 | **1.17×** | 52 / 52 | EOS / EOS |
| Q6 | 4 | 2961.6 / 5937.3 | **2.00×** | 17.33 / 15.95 | **1.09×** | 52 / 52 | EOS / EOS |
| Q6 | 10 | 1246.4 / 2504.6 | **2.01×** | 31.73 / 23.97 | **1.32×** | 52 / 52 | EOS / EOS |
| Q6 | 20 | 662.2 / 1303.4 | **1.97×** | 38.50 / 33.89 | **1.14×** | 52 / 52 | EOS / EOS |
| Q8 | 4 | 2955.2 / 3942.4 | **1.33×** | 19.08 / 22.95 | **0.83×** | 52 / 52 | EOS / EOS |
| Q8 | 10 | 1259.9 / 1735.7 | **1.38×** | 27.97 / 25.27 | **1.11×** | 52 / 52 | EOS / EOS |
| Q8 | 20 | 685.8 / 855.4 | **1.25×** | 30.65 / 27.05 | **1.13×** | 52 / 52 | EOS / EOS |
| BF16 | 4 | 2052.2 / 2498.4 | **1.22×** | 5.13 / 0.75 | **6.86×** | 52 / 52 | EOS / EOS |
| BF16 | 10 | 1688.8 / 1883.9 | **1.12×** | 11.60 / 1.79 | **6.47×** | 52 / 52 | EOS / EOS |
| BF16 | 20 | 1349.4 / 1591.3 | **1.18×** | 14.92 / 3.57 | **4.17×** | 52 / 52 | EOS / EOS |
| FP16 | 4 | 2346.5 / 2156.1 | **0.92×** | 9.50 / 8.03 | **1.18×** | 52 / 52 | EOS / EOS |
| FP16 | 10 | 1368.6 / 1983.2 | **1.45×** | 15.99 / 14.81 | **1.08×** | 52 / 52 | EOS / EOS |
| FP16 | 20 | 1307.0 / 1675.9 | **1.28×** | 16.46 / 15.34 | **1.07×** | 52 / 52 | EOS / EOS |

## GPT-OSS 20B

Prompt: **472 tokens**; generation limit: **151 tokens**, stopping at EOS.

Quant labels apply to embedding, output and attention projections. Experts stay native **MXFP4**, and router weights stay BF16 in both engines. Q6 uses Q8 for matrix widths that cannot use Q6_K.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 4310.7 / 7700.3 | **1.79×** | 41.18 / 39.09 | **1.05×** | 151 / 151 | cap / cap |
| Q4 | 10 | 1835.6 / 3209.8 | **1.75×** | 63.00 / 55.95 | **1.13×** | 151 / 151 | cap / cap |
| Q4 | 20 | 1011.1 / 1671.3 | **1.65×** | 88.19 / 73.99 | **1.19×** | 151 / 151 | cap / cap |
| Q5 | 4 | 4472.5 / 7431.4 | **1.66×** | 37.30 / 32.72 | **1.14×** | 151 / 151 | cap / cap |
| Q5 | 10 | 1951.0 / 3280.3 | **1.68×** | 59.08 / 50.42 | **1.17×** | 151 / 151 | cap / cap |
| Q5 | 20 | 1106.4 / 1840.5 | **1.66×** | 83.88 / 67.67 | **1.24×** | 151 / 151 | cap / cap |
| Q6 | 4 | 4218.5 / 7876.2 | **1.87×** | 35.01 / 33.19 | **1.05×** | 151 / 151 | cap / cap |
| Q6 | 10 | 1760.3 / 3283.6 | **1.87×** | 65.94 / 49.46 | **1.33×** | 151 / 151 | cap / cap |
| Q6 | 20 | 989.4 / 1711.9 | **1.73×** | 71.73 / 57.87 | **1.24×** | 151 / 151 | cap / cap |
| Q8 | 4 | 4306.2 / 7698.8 | **1.79×** | 34.62 / 32.99 | **1.05×** | 151 / 151 | cap / cap |
| Q8 | 10 | 1801.5 / 3211.5 | **1.78×** | 64.77 / 50.40 | **1.29×** | 151 / 151 | cap / cap |
| Q8 | 20 | 1008.5 / 1667.4 | **1.65×** | 72.50 / 54.65 | **1.33×** | 151 / 151 | cap / cap |
| BF16 | 4 | 4102.0 / 7538.4 | **1.84×** | 26.71 / 4.00 | **6.67×** | 151 / 151 | cap / cap |
| BF16 | 10 | 1829.5 / 3296.1 | **1.80×** | 45.53 / 9.04 | **5.04×** | 151 / 151 | cap / cap |
| BF16 | 20 | 1085.6 / 1863.5 | **1.72×** | 52.05 / 17.31 | **3.01×** | 151 / 151 | cap / cap |
| FP16 | 4 | 3959.3 / 7401.8 | **1.87×** | 29.09 / 24.93 | **1.17×** | 151 / 151 | cap / cap |
| FP16 | 10 | 1791.8 / 3289.6 | **1.84×** | 49.10 / 39.65 | **1.24×** | 151 / 151 | cap / cap |
| FP16 | 20 | 1080.3 / 1857.3 | **1.72×** | 52.81 / 45.39 | **1.16×** | 151 / 151 | cap / cap |

## Qwen3.8 27B

Prompt: **451 tokens**; generation limit: **158 tokens**, stopping at EOS.

Refreshed rows: **BF16 / 4 threads**.

All six formats are derived from the same Qwen3.8 FP8 source checkpoint. FP16 converts directly from that source. Q8 here is integer Q8_0, not FP8.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| Q4 | 4 | 20010.1 / 23570.1 | **1.18×** | 6.46 / 6.94 | **0.93×** | 158 / 158 | cap / cap |
| Q4 | 10 | 8246.5 / 9943.5 | **1.21×** | 10.83 / 12.04 | **0.90×** | 158 / 158 | cap / cap |
| Q4 | 20 | 4361.1 / 5236.2 | **1.20×** | 13.94 / 12.72 | **1.10×** | 158 / 158 | cap / cap |
| Q5 | 4 | 11022.5 / 11880.7 | **1.08×** | 4.75 / 4.10 | **1.16×** | 158 / 158 | cap / cap |
| Q5 | 10 | 8170.6 / 10095.9 | **1.24×** | 9.93 / 8.07 | **1.23×** | 158 / 158 | cap / cap |
| Q5 | 20 | 8285.0 / 8853.1 | **1.07×** | 11.69 / 10.21 | **1.15×** | 158 / 158 | cap / cap |
| Q6 | 4 | 19483.0 / 36259.7 | **1.86×** | 4.58 / 4.46 | **1.03×** | 158 / 158 | cap / cap |
| Q6 | 10 | 7992.1 / 14964.3 | **1.87×** | 8.29 / 7.69 | **1.08×** | 158 / 158 | cap / cap |
| Q6 | 20 | 4258.4 / 7647.0 | **1.80×** | 10.08 / 6.79 | **1.48×** | 158 / 158 | cap / cap |
| Q8 | 4 | 19206.7 / 24273.9 | **1.26×** | 5.42 / 6.90 | **0.79×** | 158 / 158 | cap / cap |
| Q8 | 10 | 8151.1 / 10272.4 | **1.26×** | 7.29 / 7.61 | **0.96×** | 158 / 158 | cap / cap |
| Q8 | 20 | 4349.7 / 5053.2 | **1.16×** | 8.13 / 7.63 | **1.07×** | 158 / 158 | cap / cap |
| BF16 | 4 | 11518.6 / 12640.6 | **1.10×** | 1.78 / 0.21 | **8.60×** | 158 / 158 | cap / cap |
| BF16 | 10 | 10230.8 / 10354.6 | **1.01×** | 3.57 / 0.50 | **7.09×** | 158 / 158 | cap / cap |
| BF16 | 20 | 7425.7 / 8823.5 | **1.19×** | 4.43 / 0.98 | **4.54×** | 158 / 158 | cap / cap |
| FP16 | 4 | 16058.8 / 12218.0 | **0.76×** | 2.40 / 2.23 | **1.08×** | 158 / 158 | cap / cap |
| FP16 | 10 | 8422.1 / 10567.7 | **1.25×** | 4.27 / 4.33 | **0.99×** | 158 / 158 | cap / cap |
| FP16 | 20 | 7056.1 / 9212.1 | **1.31×** | 4.50 / 4.39 | **1.03×** | 158 / 158 | cap / cap |

## BitNet b1.58 2B 4T

Prompt: **267 tokens**; generation limit: **175 tokens**, stopping at EOS.

Trillim uses native ternary projections with a Q8 output head and BF16 embeddings. Stock llama.cpp's BitNet implementation uses SiLU and a tied output head; this checkpoint requires ReLU² and an untied head. Its native I2_S GGUF also requires the Microsoft fork, so no stock comparison is reported.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| TERNARY | 4 | 1126.4 / N/A | N/A | 72.97 / N/A | N/A | 175 / N/A | cap / N/A |
| TERNARY | 10 | 470.6 / N/A | N/A | 115.61 / N/A | N/A | 175 / N/A | cap / N/A |
| TERNARY | 20 | 257.5 / N/A | N/A | 146.14 / N/A | N/A | 175 / N/A | cap / N/A |

## Ternary Bonsai 1.7B

Prompt: **351 tokens**; generation limit: **205 tokens**, stopping at EOS.

Native binary/ternary weights only. Trillim uses groups of 128 with BF16 scales; stock Q1_0/Q2_0 uses FP16 scales (groups of 128/64 respectively). These are native model packing differences, not Q4/Q6 promotion.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| TERNARY | 4 | 1157.9 / 1106.9 | **0.96×** | 80.00 / 46.11 | **1.73×** | 205 / 205 | cap / cap |
| TERNARY | 10 | 487.7 / 820.8 | **1.68×** | 127.71 / 86.02 | **1.48×** | 205 / 205 | cap / cap |
| TERNARY | 20 | 270.6 / 652.3 | **2.41×** | 153.59 / 104.62 | **1.47×** | 205 / 205 | cap / cap |

## Binary Bonsai 1.7B

Prompt: **306 tokens**; generation limit: **178 tokens**, stopping at EOS.

Refreshed rows: **BINARY / 4 threads**, **BINARY / 10 threads**, **BINARY / 20 threads**.

Native binary/ternary weights only. Trillim uses groups of 128 with BF16 scales; stock Q1_0/Q2_0 uses FP16 scales (groups of 128/64 respectively). These are native model packing differences, not Q4/Q6 promotion.

The refreshed binary kernel uses dynamic INT8 activation rounding, matching llama.cpp. Its sampled continuation can differ from the original Trillim run.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| BINARY | 4 | 1193.6 / 1399.0 | **1.17×** | 54.78 / 56.43 | **0.97×** | 178 / 178 | cap / cap |
| BINARY | 10 | 488.6 / 635.9 | **1.30×** | 104.80 / 101.46 | **1.03×** | 178 / 178 | cap / cap |
| BINARY | 20 | 270.8 / 339.5 | **1.25×** | 148.69 / 117.80 | **1.26×** | 178 / 178 | cap / cap |

## Ternary Bonsai 2 27B

Prompt: **286 tokens**; generation limit: **132 tokens**, stopping at EOS.

Refreshed rows: **TERNARY / 4 threads**.

Native binary/ternary weights only. Trillim uses groups of 128 with BF16 scales; stock Q1_0/Q2_0 uses FP16 scales (groups of 128/64 respectively). These are native model packing differences, not Q4/Q6 promotion.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| TERNARY | 4 | 5822.8 / 6387.0 | **1.10×** | 6.16 / 4.13 | **1.49×** | 132 / 132 | cap / cap |
| TERNARY | 10 | 6775.4 / 6699.0 | **0.99×** | 11.56 / 9.09 | **1.27×** | 132 / 132 | cap / cap |
| TERNARY | 20 | 3602.5 / 5279.8 | **1.47×** | 17.16 / 14.22 | **1.21×** | 132 / 132 | cap / cap |

## Ternary Bonsai 2.5 27B

Prompt: **258 tokens**; generation limit: **199 tokens**, stopping at EOS.

Refreshed rows: **TERNARY / 4 threads**.

Native binary/ternary weights only. Trillim uses groups of 128 with BF16 scales; stock Q1_0/Q2_0 uses FP16 scales (groups of 128/64 respectively). These are native model packing differences, not Q4/Q6 promotion.

| Quant | Threads | TTFT T / L (ms) | TTFT speedup | Decode T / L (tok/s) | Decode speedup | Output T / L (tokens) | Stop T / L |
|---|---:|---:|---:|---:|---:|---:|---|
| TERNARY | 4 | 5770.7 / 6186.6 | **1.07×** | 6.51 / 4.19 | **1.55×** | 199 / 199 | cap / cap |
| TERNARY | 10 | 6100.4 / 6421.2 | **1.05×** | 11.86 / 9.19 | **1.29×** | 199 / 199 | cap / cap |
| TERNARY | 20 | 3246.2 / 5232.3 | **1.61×** | 17.05 / 14.51 | **1.17×** | 199 / 199 | cap / cap |

## Bonsai-Image 4BT

Warm full `trillim run` requests, measured from one completed PNG to the next in a persistent process. These image timings include input processing, text encoding, all four denoising steps, VAE decoding and PNG output; initial model loading is excluded. One initial 256×256 request is discarded, followed by two measurements at each resolution. Image throughput is `60 / request_seconds`, in images per minute, for sequential requests. Image TTFT is not applicable because the output is a completed image. Unlike the text tables, these timings include pre/post processing.

256×256: "A red cube on a white table, studio photography.", seed 42. 304×272: "A small yellow sailboat on a calm blue sea.", seed 17. Both use four denoising steps. Both models were recompiled before testing. Repeated requests with the same seed produced identical PNGs at each thread setting.

The tested stock llama.cpp revision has no executable FLUX.2/Bonsai-Image denoiser-and-VAE pipeline, so its latency, throughput and speedup are **N/A**. Native image precisions are reported here; no image Q4/Q5/Q6/Q8/FP16 sweep was run.

Precision: **Native packed ternary denoiser; BF16 text encoder, VAE and remaining float weights**.

| Threads | 256×256 latency T / L (s) | 256×256 throughput T / L (images/min) | 304×272 latency T / L (s) | 304×272 throughput T / L (images/min) | Trillim / llama.cpp speedup |
|---:|---:|---:|---:|---:|---:|
| 4 | 6.47 / N/A | 9.28 / N/A | 7.65 / N/A | 7.84 / N/A | N/A |
| 10 | 4.72 / N/A | 12.71 / N/A | 5.55 / N/A | 10.81 / N/A | N/A |
| 20 | 4.47 / N/A | 13.42 / N/A | 5.29 / N/A | 11.34 / N/A | N/A |

Large ternary projections retain packed model storage and use exact BF16 operands with FP32 accumulation for CPU matrix multiplication.

## FLUX.2-klein-4B

Same image workloads and full-request measurement method as Bonsai-Image above.

Precision: **BF16**.

| Threads | 256×256 latency T / L (s) | 256×256 throughput T / L (images/min) | 304×272 latency T / L (s) | 304×272 throughput T / L (images/min) | Trillim / llama.cpp speedup |
|---:|---:|---:|---:|---:|---:|
| 4 | 7.59 / N/A | 7.90 / N/A | 8.76 / N/A | 6.85 / N/A | N/A |
| 10 | 5.44 / N/A | 11.02 / N/A | 6.30 / N/A | 9.53 / N/A | N/A |
| 20 | 5.12 / N/A | 11.71 / N/A | 5.99 / N/A | 10.01 / N/A | N/A |

Bonsai-Image is **1.13–1.17× faster than FLUX.2** across these six image workloads. This compares two models running in Trillim, not Trillim against llama.cpp.
