Skip to content

Releases

Ternzip v0.4.0 · Ternary Bonsai 2 27B

Choose a tag to compare

@synthrosai synthrosai released this 24 Nov 14:16

Ternzip for Ternary Bonsai 2 27B

One 5.512 GB archive recreates all three official language GGUFs for Prism ML’s Ternary Bonsai 2 27B. They hold the same weights in three layouts and total 20.779 GB as separate files. Keeping one archive for all three saves 15.267 GB (73.47%) before any storage deduplication. Each restore matched Prism’s published SHA-256.

On our 48 GB M4 Pro, warm startup took 58.74 s from the archive and 1.50 s from a restored PQ2_0 file on the same external drive.

Official language GGUF Original bytes Bytes saved Reduction
PTQ1_0 5,946,648,928 434,362,915 7.30%
PQ2_0 7,206,168,928 1,693,882,915 23.51%
Q2_0 7,626,008,928 2,113,722,915 27.72%

The archive is 5,512,286,013 bytes. With the 26,860,929-byte Mac tools, the two downloads total 5,539,146,942 bytes (73.34% below the three-file total).

Running on a Mac

Both inputs generated about 20 tokens/s on the same Metal backend. All 3,021 generated token IDs matched across 24 paired chats, as did the next-token decision after every reply.

Input on the M4 Pro Median decode Median warm startup Peak process memory
Ternzip direct chat 20.13 tokens/s 58.74 s 8.52–8.54 GB
Prism PQ2_0 GGUF 19.87 tokens/s 1.50 s 8.04 GB

The 0.26 tokens/s difference is within the run-to-run variation we observed. Across the three starts, the median ranged from 19.65 to 20.71 tokens/s for Ternzip and from 19.75 to 20.73 for Prism’s PQ2_0.

Both inputs were on the same external drive with file caching enabled. Startup ends when the inference context and tokenizer are ready. A separate internal SSD check measured 57.66 s (3 starts, median) after a full-file hash. Unpacking took 56.20 s and reading the archive took 0.40 s.

For this short-chat test, eight prompts ran in three fresh processes per input, with a 1,024-token context and a 128-token greedy output cap. Seven replies reached the cap and one ended at 111 on each pass. Decode excludes prompt processing. The 9B test used a 256-token cap.

Both paths loaded 7,195,047,936 bytes of weight tensors. Process peaks are in decimal GB and cover startup and chat. We tested one 48 GB M4 Pro and recommend at least 16 GB of unified memory for direct archive chat. A 16 GB Mac is untested. The measured process peak alone was 7.95 GiB, only 51 MiB below the entire capacity of an 8 GiB Mac. Prism supplies the optional vision projector separately.

How it works

In 97.27% of this checkpoint’s 128-weight ternary blocks, exactly 42 weights are zero. Encoding the count and using it to predict the remaining weights saved 86,002,538 bytes in a full-file comparison with the same probability tables. Once all the zeros in a block appear, only the signs remain to encode. Ternzip also predicts scales from rows and columns, and uses gate weights to predict their paired up weights. It stores the corrections, tokenizer and metadata.

The 27B loader uses six workers to unpack row bands into temporary CPU buffers, then copies them to the Metal runtime. The 9B loader has a dedicated 14-worker direct writer on this Mac.

Restore and chat offline

Use the archive and SHA256SUMS with the matching Ternzip v0.4.0 tools for Apple Silicon. v0.4.0 release · Mac tools (.tar.gz)

shasum -a 256 -c SHA256SUMS
tar -xzf ternzip-27b-tools-macos-arm64.tar.gz
./ternzip-27b-macos-arm64/ternzip-27b restore ternzip-27b-final.trits my-27b-PTQ1_0.gguf

The default restore writes PTQ1_0. Add --format PQ2_0 for Prism’s Apple execution layout or --format Q2_0 for stock llama.cpp b11556 or newer. The matching 27B tools also run chat directly from the archive or from a restored PQ2_0 file.

./ternzip-27b-macos-arm64/ternzip-27b chat ternzip-27b-final.trits "What is 17 times 6? Reply with only the number."
File SHA-256
Archive (ternzip-27b-final.trits) 3f78ad4a4c6389ab4908eb3b64be80faaf95a48376bfb9bca728d0220aa679a2
Mac tools v0.4.0 (ternzip-27b-tools-macos-arm64.tar.gz) 63983995aeaf3c160014d4346382456e09cdae6af6f9db89d47b8d649129bb8b

Created using Bonsai by Prism ML. Prism derived the model from Qwen/Qwen3.8-27B and identifies the GGUF architecture as qwen35. OptimaTech Labs independently modified the storage format. Apache 2.0 applies, with Prism and Qwen/Alibaba notices included. Prism’s original release Model citation

Ternzip v0.3.1

Choose a tag to compare

@synthrosai synthrosai released this 22 Nov 15:23

Ternzip v0.3.1 loads the 1.834 GB Ternary Bonsai 2 9B archive directly into its final Metal buffers. The archive retains all original weights and metadata and restores Prism’s official 1,997,486,976-byte PTQ1_0 GGUF byte for byte. The download saves 8.18% against PTQ1_0.

Ternzip v0.3.1 on Apple Silicon

The matched v0.3.0 → v0.3.1 comparison reduced median warm startup from 17.51 s to 11.27 s (35.6% less time). Median peak process memory during startup fell from 5.372 GB to 2.876 GB (46.5% lower). The loader unpacks bounded chunks directly into their final Metal buffers. Each version had three fresh starts with a warm filesystem cache. Matched startup measurements

v0.3.1 chat mode Median tokens/s Chats at 60+ CPU used by the chat thread Token streams matching Prism
Ordinary waiting (default) 58.83 6/24 7.9% of one core 24/24
--fast 61.08 23/24 98.9% of one core 24/24

Fast mode gained 2.25 tokens/s and used about one full CPU core during generation. Ordinary waiting uses less CPU on battery. Battery life was unmeasured. Each mode streamed 256 tokens per chat on eight English prompts across three fresh processes. Every generated ID, following-token and stopping decision, and streamed-text hash matched the Prism Q2_0 reference. Per-chat timings and CPU usage

Memory and hardware. The 2 GB budget covers weights, embedding data, cache and decoder reserve. These totaled 1,999,911,846 bytes, leaving 88,154 bytes. The 2.876 GB startup process peak includes other allocations. Direct chat requires Apple Silicon and Metal. We tested one 48 GB M4 Pro running macOS 26.5. 8 GB Macs are untested. A minimum RAM configuration has yet to be established. Allow additional memory for macOS, other apps and longer contexts.

Prism comparison by session

Earlier v0.3.0 three-format session Download size (bytes) Median tokens/s
Prism PTQ1_0 1,997,486,976 50.42
Prism PQ2_0 (Prism’s Mac default) 2,416,851,840 55.16
Prism Q2_0 2,556,640,128 55.09
Ternzip v0.3.0 1,834,157,871 60.12

The three-format session tested all four configurations on the same prompts. PQ2_0 had Prism’s highest median in that session. A separate, earlier v0.3.0 comparison measured 59.33 for Ternzip and 53.09 for Prism Q2_0. The v0.3.1 waiting-mode session compared ordinary waiting with --fast and used saved Prism reference outputs to check exactness. v0.3.0 benchmark data · Prism’s packing guide

Downloads and restore

Prebuilt Apple Silicon CLI · Metal backend · Release asset SHA-256 · 9B model archive · Tagged source

From the extracted CLI or source directory, run ./ternzip restore /path/to/ternzip-9b.trits. The prebuilt CLI uses ad hoc signing and has no Apple notarization. The source launcher requires CPython 3.14 and stable Rust. Mac setup and opening instructions

File SHA-256
Ternzip 9B archive 47f52b0d8e0ec4d38f61d61e7100ec3b17fec6dbe2fe58a7904fa4a57c07a66b
Restored PTQ1_0 GGUF 3561df7ac7d26a71ffa991ac2db740b10841c3a350aa2676ccd3ff5d428b4e8b

Ternzip v0.3.0 · Ternary Bonsai 2 9B

Choose a tag to compare

@synthrosai synthrosai released this 22 Nov 02:00

Ternzip v0.3.0 · Ternary Bonsai 2 9B

Ternzip v0.3.0 packs Prism ML’s 1,997,486,976-byte Ternary Bonsai 2 9B PTQ1_0 checkpoint into 1,834,157,871 bytes (1.834 GB). It saves 163,329,105 bytes (8.18%) and restores the source GGUF byte for byte, including all 427 tensors, original scale bits, tokenizer, metadata and padding.

Size, speed and startup on Apple M4 Pro. Across eight ordinary English prompts and three fresh starts, Ternzip’s custom Metal runtime generated about 60 tokens/s. The median warm load was 17.85 s, compared with 1.29–1.53 s for Prism’s three packings. Loading took 11.7× as long as Prism’s default PQ2_0 (1.52 s) on the same drive with the files already in the OS cache.

The same Ternzip archive saves 24.11% against Prism’s PQ2_0 file and 28.26% against its Q2_0 file. Prism’s fork executes all three packings of the same ternary weights. Prism recommends PQ2_0 by default on Apple Silicon. Q2_0 also runs in upstream llama.cpp b11556 and later. Prism’s packing guide

Apple M4 Pro

The custom Metal runtime measured 60.12 tokens/s and matched the Q2_0 control on 24/24 complete token streams and next or stopping decisions. On this workload its median rate was 9.0% above Prism’s default PQ2_0 and 9.1% above Prism Q2_0. The model uses the same ternary values. Its faster token generation comes from the execution layout and Metal kernels. File compression reduces the download and adds unpacking work at startup. A separate three-start check through the packaged loader matched all 24 streams and measured 59.94 tokens/s. Taken together, the measurements support about 60 tokens/s.

Configuration Download (bytes) Median output tokens/s Median warm load Counted weight bytes Matches vs. Q2_0
Prism PTQ1_0 1,997,486,976 50.42 1.29 s 2,053,638,719 24/24
Prism PQ2_0 (Mac default) 2,416,851,840 55.16 1.52 s 2,473,006,204 24/24
Prism Q2_0 2,556,640,128 55.09 1.53 s 2,612,781,385 reference
Ternzip v0.3.0 1,834,157,871 60.12 17.85 s 1,999,911,846 24/24
Ternzip with 85 denser matrices (experiment) 1,834,157,871 56.89 17.98 s 1,799,371,686 24/24

One Apple M4 Pro, one greedy text stream, eight English prompts repeated across three fresh processes per configuration, up to 256 output tokens per chat. Thinking and speculation were disabled. Median output rate includes streamed detokenization and the next token or stop decision. Startup and prompt processing were timed separately. All files were on the same drive and were read once immediately before each timed load to warm the filesystem cache. Each startup median covers three starts with dependencies installed. The weight count covers model tensors, rotations and, for Ternzip, input tables, row cache and decoder reserve. Total process memory includes additional allocations. Benchmark data

The earlier three-start comparison measured 59.33 against 53.09 tokens/s for Q2_0 (11.75% higher). Median loads there were 21.00 s and 18.61 s, respectively, using different storage paths without the matched cache warm-up. The earlier 17.81 s observation was a single Ternzip start. Across prior sessions Ternzip’s 1.836 GB archive moved from 59.04 to 58.04 tokens/s and Prism Q2_0 from 52.16 to 53.09. Roughly 1 token/s of variation makes the old and new archive timings insufficient to rank those archives. Their execution weights and Metal runtime agree.

What the two-bit slots buy

The guarded decoder’s 85 matrices contain 4,278,190,080 ternary weights. Each block has 128 weights and one 16-bit scale. PTQ1_0 uses 28 bytes per block (1.75 bits/weight). PQ2_0 uses 34 bytes (2.125). We checked the conversion against every byte of both official layouts. The unused fourth slot occurred zero times in the original PQ2_0 payload. The isolated dot-product graphs used identical activations, alternated the order of the two kernels, and waited for the GPU before recording elapsed time.

Format for the 85 matrices Matrix payload Dot products, one sweep Effective payload GB/s Billion weights/s
PTQ1_0 935,854,080 B 9.61 ms 97.4 445.2
PQ2_0 1,136,394,240 B 8.13 ms 139.8 526.2

The denser format saved 200,540,160 counted bytes and took 1.48 ms longer per isolated sweep. In live chat, switching exactly those 85 matrices changed the median from 60.12 to 56.89 tokens/s, and 24/24 outputs still matched Q2_0. The ordinary mixed plan uses 86 two-bit-slot matrices. We held its additional gate matrix fixed across the two test arms. The bandwidth calculation divides logical weight bytes by elapsed time. Physical DRAM traffic was not measured. Comparing all 782,336 floating-point dot outputs, the largest numerical difference was 0.00002360. The stored weights and scales were bit-identical after conversion.

Research on prediction from an external float checkpoint

Separately, the public Qwen3.5-9B BF16 weights predicted symbols in one complete first-layer feed-forward matrix. Coding the corrections took 0.5546 bits per weight compared with the standalone 1.5605, and recovered every symbol. That figure covers one 50,331,648-weight tensor out of 202 ternary tensors. Two other matrices were sampled. The decoder for that experiment needs the external BF16 weights. The release archive is self-contained.

Archive compatibility

This archive requires Ternzip v0.3.0. The new launcher also accepts the existing 8B and v0.2.0 9B archives. With an unknown 9B size it reports an archive-version or incomplete-download error and directs the reader to the model card and checksum. Known-size files with incorrect contents fail SHA-256 verification. The v0.2.0 release is pinned to the earlier 1,860,057,576-byte 9B file.

The release CLI restored Prism’s PTQ1_0 SHA-256, 3561df7ac7d26a71ffa991ac2db740b10841c3a350aa2676ccd3ff5d428b4e8b. The research restorer also reproduced the official PQ2_0 and Q2_0 SHA-256 digests from the same archive. The v0.3.0 Metal bundle and model card both pin the matching loader version. 9B model card · Matching loader

Created using Bonsai by Prism ML. Optimatech Labs modified the distribution by recompressing the official model and supplying a loader. This is an unofficial third-party release under Apache 2.0. The model distribution includes Prism’s notice and the Qwen/Alibaba license. The Metal backend carries the llama.cpp MIT license. Prism’s notice · Metal backend license

Ternzip v0.2.0

Choose a tag to compare

@synthrosai synthrosai released this 21 Nov 15:05

Ternzip v0.2.0 adds byte-exact restoration and direct Apple Silicon text generation for Prism ML’s Ternary Bonsai 2 9B. The 1.860 GB archive saves 137.43 MB against the official PTQ1_0 language checkpoint. One command restores the complete original file and verifies Prism’s published SHA-256.

./ternzip restore /path/to/ternzip-9b.trits

The release also retains the 8B encoder, restore command and loader. Created using Bonsai by Prism ML.

Ternzip v0.1.0

Choose a tag to compare

@synthrosai synthrosai released this 20 Nov 23:29

Ternzip packs Prism ML’s complete 2.18 GB ternary checkpoint into a 1.624 GB download. One command restores the official GGUF byte for byte. On Apple Silicon, the custom loader can also run the archive directly. Download the archive · Official source file · Launch post on X

File Bytes on disk
Prism’s Ternary-Bonsai-8B-Q2_0.gguf 2,182,184,672
ternzip-8b.trits 1,623,736,952
Saved 558,447,720 (558.45 MB, 25.59%)