Swift Bonsai 2

Swift Bonsai 2 27B β€” MTPLX community build

Swift Bonsai 2 is UkisAI's reasoning-efficient derivative of Prism ML's Ternary Bonsai 2 27B. This pack repackages the Swift trunk to serve locally on Apple Silicon with speculative decoding via MTPLX.

This is a local community build, not an official release from ukisai, Prism ML, Alibaba Cloud, or Youssofal Altoukhi (MTPLX is Apache-2.0 and unaffiliated). For the text-only build see EngineeringWithJay/Swift-Bonsai-2-MLX.

What is inside

  • mtplx-pack/: Swift DPO trunk in Prism's ternary "prism_hadamard_qwen35" format, plus the Qwen3.8-27B int4 g64 MTP sidecar (mtp.safetensors, unchanged from upstream), plus the base Prism-ML vision tower grafted in unchanged to satisfy MTPLX's runtime contract (ukisai released Swift as text-only; the grafted tower is NOT Swift-aligned, and vision outputs are unproven).
  • mtp.safetensors blob SHA256 f803737b0e64bcce54fcfa22f2c7ee342ad37192b8e2a3299fc940387a828c9d.

Architecture

Field Value
Backbone Qwen3.8-27B (GQA, head_dim 256, 24 Q heads, 4 KV heads)
Trunk Ternary weights (one scale per signed 128-block), hadamard-signed 2-bit
Attention Hybrid Gated DeltaNet linear attention + full attention every 4th layer
Hidden 5,120
Layers 64
Context 262,144 native; engine window when served: 8,192
MTP Qwen3.8-27B int4 g64 MTP head (depth 1 default)

Performance

Swift's own benchmark suite is upstream; this pack does not re-measure. From ukisai's published results, vs base Ternary Bonsai 2: GPQA-Diamond 84.34% (vs 84.18%), C-Eval 81.47% (vs 81.37%), IFBench 82.60% (vs 82.13%), AIME 2025 93.33% (vs 92.00%). See ukisai's model card for methodology.

MTP speculative decoding keeps the Swift trunk distribution exact at any temperature (accept/reject with residual sampling), but the MTP head is not Swift-trained; expect lower acceptance than on the base pack.

How to use

# pip install mtplx
pip install mtplx

# Serve the M5-appropriate Swift pack (8K window, MTP depth 1)
mtplx serve --model ./mtplx-pack --port 8001 \
  --reasoning-effort medium --reasoning off --allow-swap

# Endpoints
#   OpenAI:    http://127.0.0.1:8001/v1/chat/completions
#   Anthropic: http://127.0.0.1:8001/v1/messages
#   Health:    http://127.0.0.1:8001/health

Sampling (ukisai's Swift settings): temperature 1.0, top-p 0.95, top-k 20, min-p 0.0. Do not add repetition penalties.

Memory

~8.2 GB wired; 18 GB+ unified memory recommended for agent clients. On 16 GB unified memory this fits only with --allow-swap and severe swap pressure; not viable for agent turn work.

Limitations

  • Experimental research release. Swift is uneven on instruction following, tool use, and open-ended coding β€” validate for your workload.
  • Grafted vision tower is byte-identical to Prism's, not DPO-adapted to Swift.
  • MTP head is off-policy (Swift DPO shift is invisible to the head); exact-sampling holds, acceptance rate regresses.
  • Exact numbers for Swift-on-MTPLX have not been published; do not quote the base pack numbers as Swift's.

License & attribution

Apache-2.0. Created using Bonsai by Prism ML. Swift weights by UkisAI. Qwen3.8-27B MTP by Alibaba Cloud / Qwen team (Apache-2.0). MTPLX by Youssofal Altoukhi (Apache-2.0); if you build a product on this pack, MTPLX's terms require an "Powered by MTPLX" attribution. See NOTICE.txt and LICENSE.

Citation

@misc{swift-bonsai-2-mtplx,
  title  = {Swift Bonsai 2 27B β€” MTPLX community build},
  author = {EngineeringWithJay},
  year   = {2026},
  url    = {https://huggingface.co/EngineeringWithJay/Swift-Bonsai-2-MTPLX}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for EngineeringWithJay/Swift-Bonsai-2-27B-MTPLX

Base model

Qwen/Qwen3.8-27B
Finetuned
(3)
this model