Trillim's Tokens
Introducing Redwood
November 29, 2026
We're sunsetting Trillim and launching Redwood: a fully open source inference engine built for the flexibility of PyTorch and the speed of specialized runtimes.
We haven’t shipped in five months. There’s no excuse for that, but we spent that time trying different approaches to a question that kept getting bigger: how do you make running models locally both easy and fast? Today, we’re answering that by sunsetting the old Trillim engine and launching Redwood, our new, infinitely customizable inference engine. And unlike Trillim, it’s fully open source, and it’s staying that way.
What Trillim taught us
Trillim focused on efficient local inference for binary and ternary language models. We built DarkNet, wrote kernels and added models. It worked. It also showed us how much work hides behind “just support this model.”
Every architecture brought more work on computation, memory, caches and processing. Adding models one at a time was too slow, and our focus on ternary models left most of what people wanted to run outside the engine.
Keeping the core proprietary made things worse. People couldn’t fix what they needed or take the engine in directions we hadn’t thought of. We had made ourselves the bottleneck.
And there was much more to run than chat models. Speech recognition, voice generation, image generation, vision, code editing. We wanted room for all of it.
PyTorch gave us that flexibility, but its general purpose execution wasn’t giving us the local inference speeds we wanted. We wanted the freedom of PyTorch with bleeding edge inference performance. That became Redwood.
Describe the model. Let Redwood do the rest.
Start with RDL, a descriptive language in Python. It describes the architecture and the inference procedure, including loops, stopping conditions and persistent caches. Reusable Python functions keep descriptions compact, and new compositions extend what you can express.
The compiler turns that description into an execution plan. It matches operations and subgraphs to kernels, fuses work, plans memory and selects implementations for the target hardware. Prefill and decode can use different kernels because they are different workloads.
The kernel library does the heavy lifting. Hundreds of C kernels already cover scalar, Arm NEON and x86, with more backends to come. Each kernel describes what it computes and what it needs. Compatible implementations compete on speed, and the compiler’s tuning modes measure them on your hardware.
Processing functions handle everything around the tensors. Tokenization, audio, images or bespoke application inputs can live in ordinary Python callbacks. Supply preprocessing and postprocessing functions to Model, then run it through the same small public API, with streaming when you need it.
Whisper transcription, PocketTTS speech generation, Qwen vision inputs and image generation have all run through this toolchain. Some use custom processing or separate model stages. They share the same compiler, runtime and kernel contracts. Redwood truly supports running any model!
And again, all of it is open source, forever. Fork it, contribute, make it your own. The MIT-based Redwood Attribution License allows commercial use too, with attribution. That includes the compiler and runtime.
Built to be changed, especially by AI
AI is getting better at writing kernels. Give it clear contracts and a model implementation, and it can also write the RDL and processing functions. Redwood ships skills for all three.
For a straightforward model, think roughly 50 to 100 lines of RDL, with another 50 lines of processing when the supplied functions don’t fit. Complex architectures take more, but that work belongs in the model description and callbacks, without requiring a new runtime integration. When the operators and checkpoint format are already covered, a new model can be running in minutes instead of days.
Custom kernels work the same way. Add one for a supported backend and describe its computation; the compiler can measure it against the alternatives. A kernel improvement doesn’t need to become a tangle of edits across model implementations. It can come from you, a contributor or your agent.
Run the model you want on hardware you own. Reshape the engine when it gets in your way.
What’s next
This is the worst we expect the compiler to be. Scratch allocation, tensor caching, compilation times and kernel matching all have room to improve.
CPUs are a good start, but larger local models need more compute to feel fast. We’re tackling GPU support next, starting with Apple GPUs this week.
Try it, break it, help build it
Redwood is on PyPI as redwood-trillim, with compiled CPU components for Linux, macOS and Windows on x86-64 and Arm64. The CLI and Python module are named redwood.
Pick a program from the RDL library, get its checkpoint files, and run:
uv add redwood-trillim
uv run redwood compile model.rdl checkpoint=/path/to/weights --depth low --output ./compiled-model
uv run redwood run ./compiled-model
Start with the quick start or custom processing guide.
We’d also really love your help:
- Report bugs on GitHub or in our Discord.
- Point out confusing docs, or help make them clearer.
- Write optimized kernels for existing or new backends.
- Add processing functions for models with unusual inputs and outputs.
- Share RDL programs for models you want others to run.
- Build cool applications on top of Redwood. That’s the point of all this flexibility!
AI is making software easier to mould around what you want. Redwood is our attempt to bring that freedom to local inference, and to make the engine itself just as malleable.
Excited to see what you build with Redwood!
And we’re most definitely not going quiet for another five months. :)
Surely you want to see the numbers…
Here’s the full CPU benchmark matrix. Feel free to jump to any model we measured or scroll through the tables.
How we measured
Everything ran on an M3 Ultra Mac Studio with 28 CPU cores and 256 GiB of RAM, using 4, 10 or 20 threads. CPU only, with no Metal or GPU execution.
For each model, we chose a random 256 to 512-token prompt and a 128 to 256-token generation limit. Both engines received the same prompt tokens and limit. Generation followed prefill in the same request; each engine sampled its own continuation at temperature 0.3, top-k 5, top-p 0.9, seed 42, and stopped naturally at EOS. The prompt length, generation limit and actual output length are listed with each model.
We discarded one full warmup, then took the median of two measured requests for each configuration. Model loading, compilation, tokenization and detokenization are excluded from the text timings. The Python-to-worker request and token-streaming bridge are included in Redwood’s numbers.
The llama.cpp baseline was revision a8ad690ca, built with Apple Accelerate BLAS enabled and KleidiAI disabled. Weight precisions were matched, with the native packing differences noted below. Both engines kept their own activation arithmetic. Image timings use the full-request method described in the image section.
Across 138 paired text configurations, our engine had lower time to first token in 127 and higher decode throughput in 124. The median improvements were 36% faster effective prefill and 19% faster decode, with about 26% lower estimated request latency. Every combination of model, precision and thread count gets equal weight in those medians.
Effective prefill throughput is prompt tokens divided by time to first token. Estimated request latency is first-token time plus (output_tokens − 1) / decode_tokens_per_second. We calculate each engine’s result per configuration, compare the pair, then take the median across configurations.
Reading the tables
- Paired values are always Redwood / llama.cpp.
- First token is time to the first sampled token, in milliseconds. Lower is better.
- Decode is generated tokens per second after the first token. Higher is better.
- Both speedup columns favor higher values: 2× is twice as fast, 1× is equal, and 0.5× is half as fast. First-token speedup is llama.cpp time divided by Redwood time; decode speedup is Redwood throughput divided by llama.cpp throughput. Ratios use the unrounded measurements.
- Q4, Q5, Q6 and Q8 correspond to Q4_0, Q5_0, Q6_K and Q8_0. BF16 and FP16 keep their floating-point precision. Binary and ternary models use their native formats.
The downloadable benchmark report contains the complete records and additional implementation details.
Jump to a model:
- Language models: Gemma 3, Qwen3, Qwen3.5, GPT-OSS, Qwen3.8.
- Code models: Zeta, Sweep.
- Native low-bit models: BitNet, Ternary Bonsai 1.7B, Binary Bonsai 1.7B, Bonsai 2, Bonsai 2.5.
- Image generation: Bonsai-Image, FLUX.2.
Language models
Gemma 3 1B IT
Prompt: 499 tokens. Generation limit: 241 tokens. Both engines generated 241 tokens, reaching the limit in every configuration.
Q6 uses Q8 for matrix widths that cannot use Q6_K.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 681.9 / 1529.1 | 2.24× | 135.22 / 114.16 | 1.18× |
| Q4 | 10 | 304.7 / 660.2 | 2.17× | 190.11 / 111.74 | 1.70× |
| Q4 | 20 | 166.0 / 348.7 | 2.10× | 242.11 / 109.77 | 2.21× |
| Q5 | 4 | 992.9 / 1180.5 | 1.19× | 102.14 / 71.95 | 1.42× |
| Q5 | 10 | 490.4 / 710.4 | 1.45× | 157.35 / 95.89 | 1.64× |
| Q5 | 20 | 314.8 / 565.9 | 1.80× | 207.57 / 100.42 | 2.07× |
| Q6 | 4 | 681.0 / 1711.6 | 2.51× | 96.53 / 79.40 | 1.22× |
| Q6 | 10 | 298.4 / 746.8 | 2.50× | 150.56 / 85.31 | 1.76× |
| Q6 | 20 | 169.8 / 397.6 | 2.34× | 167.59 / 92.45 | 1.81× |
| Q8 | 4 | 671.8 / 1522.4 | 2.27× | 109.33 / 85.65 | 1.28× |
| Q8 | 10 | 298.1 / 660.9 | 2.22× | 145.91 / 86.00 | 1.70× |
| Q8 | 20 | 166.9 / 358.8 | 2.15× | 164.11 / 82.84 | 1.98× |
| BF16 | 4 | 1458.5 / 1248.8 | 0.86× | 29.35 / 5.31 | 5.53× |
| BF16 | 10 | 671.2 / 700.3 | 1.04× | 55.84 / 12.82 | 4.36× |
| BF16 | 20 | 468.8 / 569.5 | 1.21× | 75.88 / 22.19 | 3.42× |
| FP16 | 4 | 668.4 / 1194.0 | 1.79× | 48.31 / 47.02 | 1.03× |
| FP16 | 10 | 352.7 / 718.4 | 2.04× | 84.76 / 59.78 | 1.42× |
| FP16 | 20 | 491.9 / 564.4 | 1.15× | 85.98 / 70.47 | 1.22× |
Qwen3 8B
Prompt: 283 tokens. Generation limit: 140 tokens. Both engines generated 140 tokens, reaching the limit in every configuration.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 3407.9 / 4622.0 | 1.36× | 22.03 / 21.28 | 1.03× |
| Q4 | 10 | 1411.1 / 2037.8 | 1.44× | 32.30 / 32.73 | 0.99× |
| Q4 | 20 | 753.8 / 1044.0 | 1.39× | 47.99 / 34.72 | 1.38× |
| Q5 | 4 | 1764.6 / 2782.8 | 1.58× | 16.06 / 12.94 | 1.24× |
| Q5 | 10 | 1517.7 / 2304.9 | 1.52× | 34.33 / 20.38 | 1.68× |
| Q5 | 20 | 1531.2 / 1969.6 | 1.29× | 40.10 / 31.66 | 1.27× |
| Q6 | 4 | 3308.1 / 6955.8 | 2.10× | 15.91 / 14.08 | 1.13× |
| Q6 | 10 | 1371.0 / 2978.5 | 2.17× | 28.69 / 20.76 | 1.38× |
| Q6 | 20 | 762.5 / 1558.2 | 2.04× | 34.46 / 28.53 | 1.21× |
| Q8 | 4 | 3231.9 / 4746.4 | 1.47× | 18.89 / 18.74 | 1.01× |
| Q8 | 10 | 1388.3 / 2023.6 | 1.46× | 24.24 / 21.99 | 1.10× |
| Q8 | 20 | 753.6 / 1046.9 | 1.39× | 27.73 / 23.72 | 1.17× |
| BF16 | 4 | 4205.2 / 3034.4 | 0.72× | 4.65 / 0.70 | 6.69× |
| BF16 | 10 | 1785.5 / 2384.8 | 1.34× | 10.50 / 1.65 | 6.37× |
| BF16 | 20 | 1409.6 / 1941.4 | 1.38× | 13.15 / 3.27 | 4.03× |
| FP16 | 4 | 3644.4 / 2818.0 | 0.77× | 7.08 / 7.26 | 0.97× |
| FP16 | 10 | 1547.2 / 2364.6 | 1.53× | 14.20 / 13.29 | 1.07× |
| FP16 | 20 | 1375.4 / 2077.7 | 1.51× | 14.87 / 14.12 | 1.05× |
Qwen3.5 4B
Prompt: 265 tokens. Generation limit: 234 tokens. Both engines generated 234 tokens, reaching the limit in every configuration.
These are text requests, with empty vision inputs.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 2007.4 / 2205.2 | 1.10× | 35.85 / 36.79 | 0.97× |
| Q4 | 10 | 866.8 / 973.3 | 1.12× | 55.88 / 50.63 | 1.10× |
| Q4 | 20 | 483.8 / 512.6 | 1.06× | 67.14 / 50.72 | 1.32× |
| Q5 | 4 | 1325.5 / 1401.3 | 1.06× | 26.89 / 22.19 | 1.21× |
| Q5 | 10 | 1097.3 / 1215.0 | 1.11× | 52.01 / 33.85 | 1.54× |
| Q5 | 20 | 1029.7 / 1014.4 | 0.99× | 58.81 / 48.38 | 1.22× |
| Q6 | 4 | 1976.9 / 3329.4 | 1.68× | 26.49 / 24.58 | 1.08× |
| Q6 | 10 | 844.1 / 1428.7 | 1.69× | 43.31 / 33.41 | 1.30× |
| Q6 | 20 | 481.5 / 750.7 | 1.56× | 50.99 / 46.42 | 1.10× |
| Q8 | 4 | 1982.1 / 2197.8 | 1.11× | 28.99 / 33.67 | 0.86× |
| Q8 | 10 | 855.5 / 961.2 | 1.12× | 36.96 / 36.09 | 1.02× |
| Q8 | 20 | 483.2 / 512.3 | 1.06× | 42.92 / 36.95 | 1.16× |
| BF16 | 4 | 1424.0 / 1593.5 | 1.12× | 8.15 / 1.26 | 6.46× |
| BF16 | 10 | 1105.9 / 1182.4 | 1.07× | 17.40 / 3.05 | 5.70× |
| BF16 | 20 | 831.4 / 1062.4 | 1.28× | 21.18 / 5.70 | 3.71× |
| FP16 | 4 | 2007.0 / 1460.2 | 0.73× | 12.93 / 12.91 | 1.00× |
| FP16 | 10 | 924.1 / 1256.5 | 1.36× | 23.42 / 22.00 | 1.06× |
| FP16 | 20 | 814.7 / 1113.5 | 1.37× | 24.64 / 23.14 | 1.06× |
GPT-OSS 20B
Prompt: 472 tokens. Generation limit: 151 tokens. Both engines generated 151 tokens, reaching the limit in every configuration.
Quantization labels apply to embeddings, 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.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 4310.7 / 7700.3 | 1.79× | 41.18 / 39.09 | 1.05× |
| Q4 | 10 | 1835.6 / 3209.8 | 1.75× | 63.00 / 55.95 | 1.13× |
| Q4 | 20 | 1011.1 / 1671.3 | 1.65× | 88.19 / 73.99 | 1.19× |
| Q5 | 4 | 4472.5 / 7431.4 | 1.66× | 37.30 / 32.72 | 1.14× |
| Q5 | 10 | 1951.0 / 3280.3 | 1.68× | 59.08 / 50.42 | 1.17× |
| Q5 | 20 | 1106.4 / 1840.5 | 1.66× | 83.88 / 67.67 | 1.24× |
| Q6 | 4 | 4218.5 / 7876.2 | 1.87× | 35.01 / 33.19 | 1.05× |
| Q6 | 10 | 1760.3 / 3283.6 | 1.87× | 65.94 / 49.46 | 1.33× |
| Q6 | 20 | 989.4 / 1711.9 | 1.73× | 71.73 / 57.87 | 1.24× |
| Q8 | 4 | 4306.2 / 7698.8 | 1.79× | 34.62 / 32.99 | 1.05× |
| Q8 | 10 | 1801.5 / 3211.5 | 1.78× | 64.77 / 50.40 | 1.29× |
| Q8 | 20 | 1008.5 / 1667.4 | 1.65× | 72.50 / 54.65 | 1.33× |
| BF16 | 4 | 4102.0 / 7538.4 | 1.84× | 26.71 / 4.00 | 6.67× |
| BF16 | 10 | 1829.5 / 3296.1 | 1.80× | 45.53 / 9.04 | 5.04× |
| BF16 | 20 | 1085.6 / 1863.5 | 1.72× | 52.05 / 17.31 | 3.01× |
| FP16 | 4 | 3959.3 / 7401.8 | 1.87× | 29.09 / 24.93 | 1.17× |
| FP16 | 10 | 1791.8 / 3289.6 | 1.84× | 49.10 / 39.65 | 1.24× |
| FP16 | 20 | 1080.3 / 1857.3 | 1.72× | 52.81 / 45.39 | 1.16× |
Qwen3.8 27B
Prompt: 451 tokens. Generation limit: 158 tokens. Both engines generated 158 tokens, reaching the limit in every configuration.
All six formats come from the same FP8 checkpoint. FP16 converts directly from that source. Q8 here is integer Q8_0.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 20010.1 / 23570.1 | 1.18× | 6.46 / 6.94 | 0.93× |
| Q4 | 10 | 8246.5 / 9943.5 | 1.21× | 10.83 / 12.04 | 0.90× |
| Q4 | 20 | 4361.1 / 5236.2 | 1.20× | 13.94 / 12.72 | 1.10× |
| Q5 | 4 | 11022.5 / 11880.7 | 1.08× | 4.75 / 4.10 | 1.16× |
| Q5 | 10 | 8170.6 / 10095.9 | 1.24× | 9.93 / 8.07 | 1.23× |
| Q5 | 20 | 8285.0 / 8853.1 | 1.07× | 11.69 / 10.21 | 1.15× |
| Q6 | 4 | 19483.0 / 36259.7 | 1.86× | 4.58 / 4.46 | 1.03× |
| Q6 | 10 | 7992.1 / 14964.3 | 1.87× | 8.29 / 7.69 | 1.08× |
| Q6 | 20 | 4258.4 / 7647.0 | 1.80× | 10.08 / 6.79 | 1.48× |
| Q8 | 4 | 19206.7 / 24273.9 | 1.26× | 5.42 / 6.90 | 0.79× |
| Q8 | 10 | 8151.1 / 10272.4 | 1.26× | 7.29 / 7.61 | 0.96× |
| Q8 | 20 | 4349.7 / 5053.2 | 1.16× | 8.13 / 7.63 | 1.07× |
| BF16 | 4 | 11518.6 / 12640.6 | 1.10× | 1.78 / 0.21 | 8.60× |
| BF16 | 10 | 10230.8 / 10354.6 | 1.01× | 3.57 / 0.50 | 7.09× |
| BF16 | 20 | 7425.7 / 8823.5 | 1.19× | 4.43 / 0.98 | 4.54× |
| FP16 | 4 | 16058.8 / 12218.0 | 0.76× | 2.40 / 2.23 | 1.08× |
| FP16 | 10 | 8422.1 / 10567.7 | 1.25× | 4.27 / 4.33 | 0.99× |
| FP16 | 20 | 7056.1 / 9212.1 | 1.31× | 4.50 / 4.39 | 1.03× |
Code models
Zeta 7B
Prompt: 295 tokens. Generation limit: 211 tokens. Both engines generated 11 tokens, stopping at EOS in every configuration.
Code completion using fill-in-the-middle markers. The short completions below ended naturally at EOS.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 3309.5 / 4280.3 | 1.29× | 23.88 / 24.81 | 0.96× |
| Q4 | 10 | 1357.8 / 1822.6 | 1.34× | 45.96 / 39.72 | 1.16× |
| Q4 | 20 | 735.0 / 946.9 | 1.29× | 54.22 / 46.90 | 1.16× |
| Q5 | 4 | 1822.4 / 2389.8 | 1.31× | 17.53 / 14.60 | 1.20× |
| Q5 | 10 | 1397.6 / 1999.0 | 1.43× | 37.58 / 23.62 | 1.59× |
| Q5 | 20 | 1302.8 / 1815.7 | 1.39× | 45.02 / 37.98 | 1.19× |
| Q6 | 4 | 3207.5 / 6522.7 | 2.03× | 16.99 / 15.91 | 1.07× |
| Q6 | 10 | 1348.5 / 2725.5 | 2.02× | 33.48 / 24.48 | 1.37× |
| Q6 | 20 | 713.3 / 1419.9 | 1.99× | 38.25 / 33.71 | 1.13× |
| Q8 | 4 | 3254.0 / 4403.3 | 1.35× | 19.06 / 22.72 | 0.84× |
| Q8 | 10 | 1367.1 / 1857.5 | 1.36× | 26.25 / 25.63 | 1.02× |
| Q8 | 20 | 738.3 / 928.1 | 1.26× | 30.61 / 26.82 | 1.14× |
| BF16 | 4 | 2123.0 / 2646.3 | 1.25× | 5.04 / 0.75 | 6.73× |
| BF16 | 10 | 1704.5 / 1946.5 | 1.14× | 11.43 / 1.79 | 6.38× |
| BF16 | 20 | 1354.0 / 1622.5 | 1.20× | 15.09 / 3.58 | 4.21× |
| FP16 | 4 | 3211.1 / 2380.2 | 0.74× | 8.47 / 8.02 | 1.06× |
| FP16 | 10 | 1349.8 / 2058.8 | 1.53× | 15.91 / 14.78 | 1.08× |
| FP16 | 20 | 1267.0 / 1747.2 | 1.38× | 16.43 / 15.48 | 1.06× |
Sweep Next Edit v2 7B
Prompt: 271 tokens. Generation limit: 141 tokens. Both engines generated 52 tokens, stopping at EOS in every configuration.
Code editing using the model’s original/current/updated sections. Its end-of-edit marker also stops generation. For Q5 at 20 threads, first-token times ranged from 1.10 to 3.04 seconds across the two measured requests; the table retains their median.
| Weights | Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|---|
| Q4 | 4 | 3046.1 / 3887.5 | 1.28× | 24.11 / 24.95 | 0.97× |
| Q4 | 10 | 1268.5 / 1680.4 | 1.32× | 43.73 / 38.80 | 1.13× |
| Q4 | 20 | 676.3 / 863.9 | 1.28× | 54.24 / 44.22 | 1.23× |
| Q5 | 4 | 1745.0 / 2176.3 | 1.25× | 17.26 / 14.64 | 1.18× |
| Q5 | 10 | 1327.3 / 1808.9 | 1.36× | 38.94 / 23.87 | 1.63× |
| Q5 | 20 | 2067.4 / 1653.4 | 0.80× | 43.22 / 37.04 | 1.17× |
| Q6 | 4 | 2961.6 / 5937.3 | 2.00× | 17.33 / 15.95 | 1.09× |
| Q6 | 10 | 1246.4 / 2504.6 | 2.01× | 31.73 / 23.97 | 1.32× |
| Q6 | 20 | 662.2 / 1303.4 | 1.97× | 38.50 / 33.89 | 1.14× |
| Q8 | 4 | 2955.2 / 3942.4 | 1.33× | 19.08 / 22.95 | 0.83× |
| Q8 | 10 | 1259.9 / 1735.7 | 1.38× | 27.97 / 25.27 | 1.11× |
| Q8 | 20 | 685.8 / 855.4 | 1.25× | 30.65 / 27.05 | 1.13× |
| BF16 | 4 | 2052.2 / 2498.4 | 1.22× | 5.13 / 0.75 | 6.86× |
| BF16 | 10 | 1688.8 / 1883.9 | 1.12× | 11.60 / 1.79 | 6.47× |
| BF16 | 20 | 1349.4 / 1591.3 | 1.18× | 14.92 / 3.57 | 4.17× |
| FP16 | 4 | 2346.5 / 2156.1 | 0.92× | 9.50 / 8.03 | 1.18× |
| FP16 | 10 | 1368.6 / 1983.2 | 1.45× | 15.99 / 14.81 | 1.08× |
| FP16 | 20 | 1307.0 / 1675.9 | 1.28× | 16.46 / 15.34 | 1.07× |
Binary and ternary models
These models keep their native low-bit weights. For Bonsai, Redwood uses groups of 128 with BF16 scales; llama.cpp’s Q1_0/Q2_0 uses FP16 scales with groups of 128/64. Attention caches use FP16 in both engines for Bonsai 2 and 2.5, and BF16 for the other text models.
BitNet b1.58 2B 4T
Prompt: 267 tokens. Generation limit: 175 tokens. Redwood generated 175 tokens, reaching the limit in every configuration.
Native ternary projections, a Q8 output head and BF16 embeddings. The tested stock llama.cpp implementation does not support this checkpoint’s combination of ReLU² and an untied output head; its I2_S GGUF requires the Microsoft fork. These are Redwood-only results, with no stock llama.cpp comparison.
| Threads | First token, ms | Decode, tok/s |
|---|---|---|
| 4 | 1126.4 | 72.97 |
| 10 | 470.6 | 115.61 |
| 20 | 257.5 | 146.14 |
Ternary Bonsai 1.7B
Prompt: 351 tokens. Generation limit: 205 tokens. Both engines generated 205 tokens, reaching the limit in every configuration.
Native ternary weights.
| Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|
| 4 | 1157.9 / 1106.9 | 0.96× | 80.00 / 46.11 | 1.73× |
| 10 | 487.7 / 820.8 | 1.68× | 127.71 / 86.02 | 1.48× |
| 20 | 270.6 / 652.3 | 2.41× | 153.59 / 104.62 | 1.47× |
Binary Bonsai 1.7B
Prompt: 306 tokens. Generation limit: 178 tokens. Both engines generated 178 tokens, reaching the limit in every configuration.
Native binary weights. The binary kernel uses dynamic INT8 activation rounding, matching llama.cpp.
| Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|
| 4 | 1193.6 / 1399.0 | 1.17× | 54.78 / 56.43 | 0.97× |
| 10 | 488.6 / 635.9 | 1.30× | 104.80 / 101.46 | 1.03× |
| 20 | 270.8 / 339.5 | 1.25× | 148.69 / 117.80 | 1.26× |
Ternary Bonsai 2 27B
Prompt: 286 tokens. Generation limit: 132 tokens. Both engines generated 132 tokens, reaching the limit in every configuration.
Native ternary weights.
| Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|
| 4 | 5822.8 / 6387.0 | 1.10× | 6.16 / 4.13 | 1.49× |
| 10 | 6775.4 / 6699.0 | 0.99× | 11.56 / 9.09 | 1.27× |
| 20 | 3602.5 / 5279.8 | 1.47× | 17.16 / 14.22 | 1.21× |
Ternary Bonsai 2.5 27B
Prompt: 258 tokens. Generation limit: 199 tokens. Both engines generated 199 tokens, reaching the limit in every configuration.
Native ternary weights.
| Threads | First token, ms | Speedup | Decode, tok/s | Speedup |
|---|---|---|---|---|
| 4 | 5770.7 / 6186.6 | 1.07× | 6.51 / 4.19 | 1.55× |
| 10 | 6100.4 / 6421.2 | 1.05× | 11.86 / 9.19 | 1.29× |
| 20 | 3246.2 / 5232.3 | 1.61× | 17.05 / 14.51 | 1.17× |
Image generation
These are warm, full image generation requests in a persistent process. They include input processing, text encoding, all four denoising steps, VAE decoding and PNG output. Initial loading is excluded. One initial 256×256 request was discarded, followed by two measurements at each resolution.
- 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 models were recompiled before testing. Repeated requests with the same seed produced identical PNGs at each thread setting. Throughput is sequential images per minute. Lower latency and higher throughput are better.
The tested llama.cpp revision has no full denoiser-and-VAE pipeline for these models, so all image figures below are Redwood-only absolute measurements.
Bonsai-Image 4BT
Packed ternary denoiser, with BF16 text encoder, VAE and remaining floating-point weights. Large ternary projections retain packed storage and use BF16 operands with FP32 accumulation for CPU matrix multiplication.
| Threads | 256×256 seconds | 256×256 images/min | 304×272 seconds | 304×272 images/min |
|---|---|---|---|---|
| 4 | 6.47 | 9.28 | 7.65 | 7.84 |
| 10 | 4.72 | 12.71 | 5.55 | 10.81 |
| 20 | 4.47 | 13.42 | 5.29 | 11.34 |
FLUX.2-klein-4B
BF16.
| Threads | 256×256 seconds | 256×256 images/min | 304×272 seconds | 304×272 images/min |
|---|---|---|---|---|
| 4 | 7.59 | 7.90 | 8.76 | 6.85 |
| 10 | 5.44 | 11.02 | 6.30 | 9.53 |
| 20 | 5.12 | 11.71 | 5.99 | 10.01 |
Bonsai-Image was 1.13 to 1.17× faster than FLUX.2 across the six shared image workloads. These last two tables compare models running in the same engine.