Instructions to use GreenBitAI/Terza-27B-Agent-gbx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use GreenBitAI/Terza-27B-Agent-gbx with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("GreenBitAI/Terza-27B-Agent-gbx") config = load_config("GreenBitAI/Terza-27B-Agent-gbx") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use GreenBitAI/Terza-27B-Agent-gbx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "GreenBitAI/Terza-27B-Agent-gbx"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "GreenBitAI/Terza-27B-Agent-gbx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use GreenBitAI/Terza-27B-Agent-gbx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "GreenBitAI/Terza-27B-Agent-gbx"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default GreenBitAI/Terza-27B-Agent-gbx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use GreenBitAI/Terza-27B-Agent-gbx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "GreenBitAI/Terza-27B-Agent-gbx"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "GreenBitAI/Terza-27B-Agent-gbx" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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
Quantized
Model tree for GreenBitAI/Terza-27B-Agent-gbx
Base model
Qwen/Qwen3.8-27B