SAVRN
Search Contact SAVRN

Open-weight model · Text generation

Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX

by Nate Sutton nathansutton/Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX

Prism ML's ternary Ternary-Bonsai-2-27B build of Qwen/Qwen3.8-27B, repacked for chad, a Claude-Code-style local coding agent for Apple Silicon, with its speculative decoder bundled in. This is chad's default model. Created using Bonsai by Prism ML.

Parameters26.9B
Context262,144
Weights8.8 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads

Runs On

What it takes to serve Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX (26.9B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 53.8 GB 64.6 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 26.9 GB 32.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 13.4 GB 16.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Nate Sutton, published under apache-2.0, revision 234cc925d77c.

Prism ML's ternary Ternary-Bonsai-2-27B build of Qwen/Qwen3.8-27B, repacked for chad, a Claude-Code-style local coding agent for Apple Silicon, with its speculative decoder bundled in. This is chad's default model. Created using Bonsai by Prism ML. with, already quantized. Nothing is built on first run. Every projection of Qwen3.8-27B (a dense qwen35 hybrid: 64 layers, 48 GatedDeltaNet + 16 full attention) is stored in a Hadamard-rotated basis: multiplied by a fixed sign vector and put through a blockwise Walsh-Hadamard transform offline, then quantized to 2-bit affine group-128 whose three levels reproduce the ternary set {−s, 0, +s}. The rotation costs no extra bits and no extra weight…

Read Nate Sutton's full model card

Prism ML's ternary Ternary-Bonsai-2-27B build of Qwen/Qwen3.8-27B, repacked for chad, a Claude-Code-style local coding agent for Apple Silicon, with its speculative decoder bundled in. This is chad's default model. Created using Bonsai by Prism ML.

One download gets both halves: the ternary target model and the block drafter it decodes with, already quantized. Nothing is built on first run.

What the weights are

Every projection of Qwen3.8-27B (a dense qwen3_5 hybrid: 64 layers, 48 GatedDeltaNet + 16 full attention) is stored in a Hadamard-rotated basis: multiplied by a fixed sign vector and put through a blockwise Walsh-Hadamard transform offline, then quantized to 2-bit affine group-128 whose three levels reproduce the ternary set {−s, 0, +s}. The rotation costs no extra bits and no extra weight traffic, but the matching transform must be applied to the activations at runtime and inverted after the embedding lookup. An ordinary MLX affine loader finds tensors of exactly the right shapes, skips both transforms, and produces plausible garbage without raising. chad routes the pack on its model_type (prism_hadamard_qwen35) to a loader that does the rotation; mlx-lm alone will not run it correctly.

  • Footprint: 7.15 GB of weights + a 1.1 GB bundled drafter; 262k native context.
  • RAM: built for 24 GB Apple Silicon. chad sizes its context window from the live Metal budget: on a 24 GB M4 Pro the compaction threshold lands around 150k tokens, against ~30k on the 3-bit quant this replaces.
  • Speed (M4 Pro, greedy, 512-token prompt, 128-token decode): 21 tok/s serial, 64 tok/s with the drafter (94% of drafted tokens accepted); prefill ~99 tok/s.
  • Quality: teacher-forced NLL on code is unchanged against the pack's own fp32 forward (1.502 vs 1.500); chad's private core and languages eval tiers pass 13/13 and 17/17, the same as the 3-bit quant.

What differs from the Prism pack

  • Text only. The pack's FP16 vision tower (0.92 GB) is dropped; config.json says so (components.vision: false). The language-model tensors, sign vectors and hadamard.json are byte-identical to the source revision recorded in the safetensors header (source_revision).
  • Tokenizer and chat template from the base model. The pack's tokenizer.json has the same vocabulary and added tokens but different merges and pre-tokenizer, which trips transformers' regex warning on every load and diverges on combining marks. This repo ships the base tokenizer, and the chat template with reasoning_effort defaulting to medium (the pack's says xhigh; upstream Qwen's says xhigh). Pass reasoning_effort explicitly to override it.
  • config.json carries the base checkpoint's transformers_version. Without it, transformers' Mistral-regex heuristic treats any checkpoint as a legacy Mistral tokenizer and warns on every load that tokenization is wrong; the key is what the base Qwen3.8-27B config carries, and the tokenizer files here are that checkpoint's.
  • No bundled runtime. The pack ships Python it asks callers to sys.path.insert; chad reimplements the forward and does not import code out of a model download.
  • dflash/: the DFlash2 block drafter, identical to the one bundled with nathansutton/Qwen3.8-27B-UD-Q3_K_XL-DFlash2-MLX.

The bundled DFlash2 drafter (dflash/)

A 1.9B model that reads the target's residual stream at five tapped layers and proposes a whole block of tokens in one forward, quantized to 4-bit group-64 in MLX format. A drafter reads the residual stream, which the weight quantization only perturbs, so the drafter trained against the bf16 base transfers to the ternary target unchanged. chad verifies the block in one batched target forward and accepts by exact rejection sampling, so greedy output is token-identical to unspeculated decoding (to kernel rounding) and sampled output keeps the model's true distribution at any temperature.

It is deliberately in a subdirectory: mlx-lm globs model*.safetensors at the repo root, so dflash/model.safetensors is invisible to the base loader.

The drafter weights are converted from the DFlash2 release for this model (z-lab/Qwen3.8-27B-DFlash2); the method is Chen et al., DFlash: Block Diffusion for Flash Speculative Decoding (arXiv:2602.06036). Only the quantization and the MLX layout are ours; please honor the original release's license and citation terms.

Use it

uvx chad-code            # this is the default model; first run downloads it (~8 GB)

License and attribution

Apache-2.0. The ternary weights are copyright Prism ML, Inc., built from Qwen3.8-27B (copyright Alibaba Cloud, Apache-2.0); LICENSE and NOTICE.txt are the pack's own. Created using Bonsai by Prism ML.

Configuration

Context length (tokens)
262,144
Layers
64
Hidden size
5,120
Feed-forward size
17,408
Attention heads
24
Key/value heads
4
Head dimension
256
Vocabulary size
248,320
Model type
prism_hadamard_qwen35

Identity and Version

Repository
nathansutton/Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX
Publisher
Nate Sutton
Task
Text generation
Modality
Text
Library
mlx
Parameters
26.9B parameters
Languages
mlx
Revision
234cc925d77cd94683e47b1493bd964917aaf43b
First published
2026-09-18
Last updated
2026-09-18

Files and Weights

13 files, 8.8 GB in total. The weights are 2 files totalling 8.8 GB in safetensors.

Weights2 files · 8.8 GB
Configuration4 files · 356.9 KB
Tokenizer2 files · 20.0 MB
Documentation2 files · 15.5 KB
Other2 files · 9.4 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
dflash/model.safetensorsWeights1.1 GB dd7d4c23149c
model.safetensorsWeights7.7 GB 68541bf9c727
config.jsonConfiguration57.7 KB
dflash/config.jsonConfiguration1.1 KB
generation_config.jsonConfiguration202 B
hadamard.jsonConfiguration297.9 KB
LICENSEDocumentation10.2 KB
README.mdDocumentation5.3 KB
NOTICE.txtOther411 B
chat_template.jinjaOther9.0 KB
.gitattributesRepository1.6 KB
tokenizer.jsonTokenizer20.0 MB 06b9509352d2
tokenizer_config.jsonTokenizer1.2 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
8.8 GB
Download from Nate Sutton

Released by Nate Sutton through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published8.8 GB
16-bit53.8 GB
8-bit26.9 GB
4-bit13.4 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX

How much GPU memory does Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX need?

About 64.6 GB at 16-bit and 16.1 GB at 4-bit: the weights (26.9B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX commercially?

Yes. Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is Qwen3.8-27B-Ternary-Bonsai-2-DFlash2-MLX's context length?

262,144 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Benefits high quality CPU inference TQ2 on Llama.cpp and Ollama via QAT - Robotcs, Routing, Coding, Multimedia, Advanced tool calling via JiRackDeltaNetTokenizer - JiRack DeltaNet understand video and images that best for Robotics also A fast and efficient 27B model optimized for CPU inference. Built on a Qwen3.8-style DeltaNet architecture (hybrid attention + SSM), with an updated tokenizer that includes Routing, Media, Vision, Sound, Tool call, and Robotics tags. Ready-to-run GGUF quantizations, and native Ollama support with reasoning disabled by default for fast, direct responses. - JiRack is a cloud-ready model that helps save money on cloud infrastructure. It can be used as an expert…

Open weights mit 27.3B parameters 262,144 tokens

Model · Text generation

Ternary-Bonsai-27B-mlx-2bit

Prism ML

Full 27B-class reasoning in ternary transformer weights — on everyday laptops - \~7.2 GB deployed footprint (down from \~54 GB FP16) — full 27B-class reasoning on a standard laptop or a single GPU - 95% of FP16 intelligence retained: 80.49 average across 15 thinking-mode benchmarks — a higher score than the conventional IQ2XXS build (72.73) at less than two-thirds of its footprint - Retains thinking, reasoning, and agentic behavior deep in the sub-4-bit regime, where conventional low-bit representations collapse: math within two points of full precision (93.40), coding at 85.96, agentic tool use at 74.01 - End-to-end ternary language weights across embeddings, attention projections, MLP…

Open weights apache-2.0 27.4B parameters 262,144 tokens mlx

Model · Text generation

Qwen3.8-27B-OBLITERATED

OBLITERATUS

V3 applies iterative refinement on top of V2's complementary blend, with targeted corpus expansion. The result: genuine liberation — not just removal of hard refusals but elimination of safety-lecture deflections. - Genuinely answers restricted queries — provides real substance instead of safety lectures - 20/20 on code generation tasks — functional implementations, not disclaimers - Thinking ON compatible — no refusals in either thinking mode - Honest scoring — every response manually audited for real substance, not just absence of "I cannot" - -2.1pp MMLU — modest capability cost for genuine liberation If you're using this model in an agent harness (coding agent, pentest framework, etc.)…

Open weights apache-2.0 27.8B parameters 262,144 tokens mlx

Model · Text generation

WaifuGemma4-26b-a4b-v1

HiWaifu Research

Gemma 4 26B-A4B, post-trained with GRPO against a reward model learned from 1.2 million double-blind votes cast by HiWaifu users inside their own role-play conversations. Put back into the same arena, blind, it met GLM-5.1 in 1,430 battles and won 49.6% of the decided votes; against a 13-model field including Gemini, DeepSeek-v4 and Qwen's character models it won 54.7%. Most open role-play models are tuned on preferences that come from an LLM judge, from a handful of annotators, or from synthetic pairs. We had something rarer: a live arena where, inside ordinary chats on our platform, a user is occasionally shown two candidate replies and asked which one they want to continue with. Those…

Open weights gemma 25.8B parameters 262,144 tokens transformers

Model · Text generation

Qwen3-30B-A3B

Qwen

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Built upon extensive training, Qwen3 delivers groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support, with the following key features: - Uniquely support of seamless switching between thinking mode (for complex logical reasoning, math, and coding) and non-thinking mode (for efficient, general-purpose dialogue) within single model, ensuring optimal performance across various scenarios. - Significantly enhancement in its reasoning capabilities, surpassing previous QwQ (in thinking mode) and…

Open weights apache-2.0 30.5B parameters 40,960 tokens transformers

Model · Text generation

Qwen3-30B-A3B-Instruct-2507

Qwen

We introduce the updated version of the Qwen3-30B-A3B non-thinking mode, named Qwen3-30B-A3B-Instruct-2507, featuring the following key enhancements: - Significant improvements in general capabilities, including instruction following, logical reasoning, text comprehension, mathematics, science, coding and tool usage. - Substantial gains in long-tail knowledge coverage across multiple languages. - Markedly better alignment with user preferences in subjective and open-ended tasks, enabling more helpful responses and higher-quality text generation. - Enhanced capabilities in 256K long-context understanding. Qwen3-30B-A3B-Instruct-2507 has the following features: NOTE: This model supports only…

Open weights apache-2.0 30.5B parameters 262,144 tokens transformers