Terza 27B Agent

Terza, after terza rima, the verse of Dante's Divine Comedy: three lines to a stanza, three values to a weight.

GreenBit AI's 27B model with ternary weights for long-horizon terminal and coding-agent work, 8.6 GB on disk. It is post-trained by GreenBit AI from Prism ML's Bonsai 2 27B and keeps the format, the size and the runtime of GreenBitAI/Ternary-Bonsai-2-27B-gbx, draft head included, so it runs in gbx-lm as a drop-in replacement for it.

On Terminal-Bench 2.1 it solves 35.2% of the tasks per attempt, against 26.6% for Bonsai 2 -- about half of the way to the full-precision Qwen3.8-27B (44.6%), at the same 8.6 GB.

Evaluation

Bonsai 2 27B this model Qwen3.8-27B (BF16)
Terminal-Bench 2.1, pass@1 26.6 35.2 44.6
Terminal-Bench 2.1, pass@3 38.2 52.8 65.2

Success rate in percent on the 89 tasks of Terminal-Bench 2.1, three runs each: pass@1 is the mean over the runs, pass@3 a task solved in any of them. Every model was measured with the same harness and settings: Harbor with the Terminus-2 agent, thinking on, temperature 1.0 / top-p 0.95 / top-k 20, agent time limits ×3, served with vLLM. gbx-lm's kernels round differently; the scores have not been re-measured in gbx-lm.

Speed

The format and the size are those of GreenBitAI/Ternary-Bonsai-2-27B-gbx, and so is the draft head in mtp/: it accepts as many of its proposals with this model as with Bonsai 2, so the speed-up is the same. Decode speed in tokens/s on a Mac Studio (M2 Ultra), greedy, 2,048 tokens generated:

code maths chat prose after a 33k-token prompt
without the draft head 62 62 62 62 47
GBX_QWEN35_MTP=on 103 103 79 110 74

See the base card for prompt processing, memory and the DGX Spark.

Requirements

Mac

macOS 15.0 or later
chip Apple Silicon (arm64). There is no Intel build.
Python none -- the binary carries what it needs

Linux

machine NVIDIA DGX Spark (GB10). Other Linux machines are not supported yet.
system arm64, glibc 2.39 or later (DGX OS / Ubuntu 24.04)
driver an NVIDIA driver with CUDA 13 support. No CUDA toolkit is needed: the binary carries the CUDA libraries it uses.
Python none

The model and its draft head take about 10 GB of memory, plus the conversation's cache.

It needs gbx-lm v0.8.4 or later, which keeps an agent's session cache across turns when the client sends the model's reasoning back.

Install

# upgrading? clear the previous version's unpack directory first
rm -rf ~/.libra/cache/onefile/gbx_lm

# on a DGX Spark, use gbx_lm-linux-arm64.tar.gz in place of gbx_lm-darwin-arm64.tar.gz
curl -fL -o gbx_lm-darwin-arm64.tar.gz 'https://github.com/GreenBitAI/gbx-lm/releases/latest/download/gbx_lm-darwin-arm64.tar.gz' \
  && tar -xzf gbx_lm-darwin-arm64.tar.gz gbx_lm \
  && mkdir -p "$HOME/.local/bin" \
  && mv gbx_lm "$HOME/.local/bin/gbx_lm" \
  && chmod +x "$HOME/.local/bin/gbx_lm"

gbx_lm -h

command not found -- $HOME/.local/bin is not on your PATH:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc     # zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile   # bash

Killed: 9 (Mac) -- a previous version's files are still in the unpack directory, and macOS refuses to mix two builds. Run the rm -rf line above, then try again.

Run

GBX_QWEN35_MTP=on gbx_lm --model GreenBitAI/Terza-27B-Agent-gbx

That serves an OpenAI-compatible API on port 11688, its default. The weights download on first use into ~/.libra/cache/models; set HF_HOME to put them elsewhere. Leave out GBX_QWEN35_MTP=on to run without the draft head. A request that does not set its own sampling gets the model's generation config (temperature 1.0, top-p 0.95, top-k 20), as in the evaluation above.

Thinking. The scores above are with thinking on, which gbx-lm leaves off unless asked. For agent work, turn it on for every request from the server side:

GBX_QWEN35_MTP=on GBX_ENABLE_THINKING=1 GBX_REASONING_EFFORT=medium gbx_lm --model GreenBitAI/Terza-27B-Agent-gbx

or per request with "enable_thinking": true. reasoning_effort takes low, medium or xhigh, the template's default. On the hardest tasks the model can think for tens of thousands of tokens before acting; medium, used above, or low keeps that shorter.

curl http://127.0.0.1:11688/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"GreenBitAI/Terza-27B-Agent-gbx","messages":[{"role":"user","content":"Hello"}]}'

The model reads images as well as text, through the vision tower Prism ML ships with it.

From the command line

GBX_QWEN35_MTP=on gbx_lm generate --model GreenBitAI/Terza-27B-Agent-gbx --prompt "Hello" --max-tokens 2048
GBX_QWEN35_MTP=on gbx_lm chat --model GreenBitAI/Terza-27B-Agent-gbx --max-tokens 2048

Keep --max-tokens generous: the model reasons before it answers, and that counts against it.

Coding agents

The server speaks three wire protocols on the same port:

path for
/v1/chat/completions anything written against the OpenAI API
/v1/responses Codex
/v1/messages Claude Code

Codex -- a provider in ~/.codex/config.toml:

[model_providers.gbx]
name = "gbx-lm"
base_url = "http://127.0.0.1:11688/v1"
wire_api = "responses"

and a profile in ~/.codex/gbx.config.toml:

model_provider = "gbx"
model = "GreenBitAI/Terza-27B-Agent-gbx"
model_context_window = 262144

Claude Code -- ~/.claude/gbx.settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:11688",
    "ANTHROPIC_AUTH_TOKEN": "local",
    "ANTHROPIC_MODEL": "GreenBitAI/Terza-27B-Agent-gbx",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "GreenBitAI/Terza-27B-Agent-gbx"
  }
}

Both clients ask for a small model for their own background work, so every name in the settings has to be one this server is serving.

What is in here

  • model.safetensors: post-trained by GreenBit AI from prism-ml/Ternary-Bonsai-2-27B-mlx-2bit, in the same layout. Apache 2.0, copyright Prism ML; modifications by GreenBit AI. Created using Bonsai by Prism ML.
  • mtp/mtp.safetensors: the draft head of GreenBitAI/Ternary-Bonsai-2-27B-gbx, unchanged. Apache 2.0.
  • Everything else (configuration, rotation metadata, tokenizer, chat template) is Prism ML's, unchanged.

See NOTICE.txt.

Downloads last month
2
Safetensors
Model size
27B params
Tensor type
F32
·
U32
·
F16
·
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 GreenBitAI/Terza-27B-Agent-gbx

Base model

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

Collection including GreenBitAI/Terza-27B-Agent-gbx