What You'll Build
A local, private agentic-coding setup: North Mini Code 1.0 — Cohere Labs' open Apache-2.0 Mixture-of-Experts coding model — served as an OpenAI-compatible endpoint by llama.cpp on a single 32GB RTX 5090, driven by the OpenHands coding agent so the model can read your repo, run shell commands, and edit files. North Mini Code is a 30B-A3B MoE (30B total parameters, ~3B active per token) built for pure agentic coding: it emits native JSON-schema tool calls and supports interleaved thinking (a reasoning stream alongside its tool calls). Unlike the tight-fit 24 GB cards — where Q4_K_M (~17.5 GB) is the only quant that fits with working context — the 5090's 32 GB is roomy enough to step up to the Q5_K_M (20.34 GB) or Q6_K (24.59 GB) quant with a meaningfully longer context window.
Hardware data: RTX 5090 (32GB VRAM) · North Mini Code 1.0 Q6_K GGUF (24.59 GB weights) · roomy fit, longer context · See benchmark data
ℹ️ Apache-2.0 — commercial use is allowed. North Mini Code 1.0 ships under Apache-2.0, which is notable because Cohere's open weights usually land under the non-commercial CC-BY-NC. Apache-2.0 is a permissive license: you may use, modify, and deploy this model commercially. Confirm the terms against the model card before you ship.
ℹ️ An MoE keeps all experts resident — the file size is the VRAM cost. North Mini Code is a 128-expert Mixture-of-Experts that activates 8 experts per token (~3B active parameters). The low active count is a speed property — it does not shrink VRAM. All 128 experts stay loaded, so the memory footprint is the full quant file: ~24.6 GB at Q6_K, not some smaller "active" fraction. Do not expect the ~3B-active figure to reduce the memory requirement.
ℹ️ The 32 GB is the whole point of this tier. The model's context window is 256K tokens (config
max_position_embeddings500000), and its attention interleaves a 4096-token sliding window with periodic global attention — which makes the KV cache at long context large. On the 5090's 32 GB, the Q6_K weights (24.59 GB) leave roughly 7 GB for the KV cache — enough for a genuinely longer working context than the 24 GB cards could hold, though still not the full 256K. Q5_K_M (20.34 GB) trades a little quality for ~11 GB of KV headroom; Q8_0 (30.21 GB) fits but is tight, leaving almost nothing for context. Pick Q5_K_M or Q6_K for this card; read the Running section before you launch.
Requirements
| Component | Minimum | Tested |
|---|---|---|
| GPU | 32GB VRAM (unlocks Q5_K_M / Q6_K over the 24 GB floor) | RTX 5090 (32GB GDDR7, Blackwell GB202, sm_120) |
| Driver | CUDA 12.8+ runtime (Blackwell sm_120) | — |
| RAM | 16GB system RAM (32GB comfortable for the agent + repo) | — |
| Storage | ~26GB (the Q6_K GGUF is 26.4 GB) | 26.40 GB file (North-Mini-Code-1.0-Q6_K.gguf) |
| Software | llama.cpp or Ollama with cohere2_moe support; Python 3.10+ for OpenHands | llama.cpp llama-server (b9626+), OpenHands |
There is no first-party GGUF — Cohere Labs ships safetensors plus fp8 and w4a16 quants only, and points to community quantizations, per the North Mini Code 1.0 model card. This recipe uses the vetted imatrix GGUF from bartowski, per the bartowski/North-Mini-Code-1.0-GGUF file tree. The relevant quants for a 32 GB card are Q4_K_M 18.74 GB (18,744,024,640 bytes → ~17.5 GiB), Q5_K_M 21.85 GB (21,845,253,696 bytes → 20.34 GiB), Q6_K 26.40 GB (26,402,856,512 bytes → 24.59 GiB), and Q8_0 32.44 GB (32,437,263,936 bytes → 30.21 GiB). On the 5090, Q6_K is the recommended default (near-lossless, ~7 GB left for KV); Q5_K_M buys more context; Q8_0 fits but leaves almost no KV headroom, and the bf16 build (~61 GB) is far out of reach.
Installation
1. Install llama.cpp with cohere2_moe support (CUDA 12.8+ / sm_120)
North Mini Code uses the cohere2_moe architecture (Cohere2MoeForCausalLM). Support for this arch was added to llama.cpp in PR #24260 and first shipped in the b9626 build; bartowski quantized the GGUF with release b9630, per the bartowski GGUF model card. You need a llama.cpp new enough to include that arch — an older binary will fail to load the model with an unknown-architecture error. Build from source at a recent commit, or use a b9626-or-later release binary, per the llama.cpp README:
# Build from source with CUDA (guarantees a recent-enough arch table + sm_120 kernels)
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j
The RTX 5090 is Blackwell (GB202, sm_120) — build against a CUDA 12.8+ toolkit so the kernels target sm_120, or use a current pre-built CUDA release binary (recent llama.cpp / Ollama CUDA builds already ship sm_120 kernels). The GGUF quants are integer formats, so no FP8 path is needed here; the 32 GB envelope, not the tensor cores, is what defines this tier.
2. Download the Q6_K GGUF
llama-server can pull the GGUF straight from Hugging Face and cache it locally. The -hf flag takes <user>/<model>:<quant>; name the Q6_K quant explicitly since it is the recommended default for this roomy tier:
# Downloads North-Mini-Code-1.0-Q6_K.gguf (~24.6 GB) into the llama.cpp cache on first use
llama-server -hf bartowski/North-Mini-Code-1.0-GGUF:Q6_K --port 8000
The first launch downloads ~26 GB; subsequent launches reuse the cached file. To download explicitly first, grab North-Mini-Code-1.0-Q6_K.gguf from the GGUF repo files tab and pass it with -m <path> instead. For more context headroom drop to :Q5_K_M (20.34 GB); for maximum fidelity use :Q8_0 (30.21 GB, tight, near-zero KV room).
3. Install the OpenHands coding agent
OpenHands is an open-source agentic-coding client that drives any OpenAI-compatible endpoint:
pip install openhands-ai
Alternatively, run the OpenHands Docker image — in that case point its base URL at http://host.docker.internal:8000/v1 so the container can reach the llama.cpp server running on your host. Aider and Cline are drop-in alternatives; both drive the same OpenAI-compatible endpoint.
Running
1. Serve North Mini Code with the correct chat template
This is the step that makes or breaks tool-calling. North Mini Code ships a custom chat template (chat_template.jinja) that carries tool_call_id and the interleaved-thinking format; the model card documents its tool-calling as JSON-schema function calls with a reasoning field, per the model card. A generic ChatML path will break tool-calling — the model won't emit clean tool calls and OpenHands won't be able to edit files.
Two gotchas the maintainers called out on the arch-support PR (#24260): (a) Cohere ships two conflicting templates — an outdated one in tokenizer_config.json and the current one in chat_template.jinja; some GGUFs embed the wrong one. (b) The reference template for GGUFs lives at models/templates/Cohere2-MoE.jinja in the llama.cpp tree. Serve with --jinja so llama.cpp applies the GGUF's embedded Jinja template rather than a built-in fallback, and if tool-calling still misbehaves, point it explicitly at the reference template with --chat-template-file:
llama-server \
-hf bartowski/North-Mini-Code-1.0-GGUF:Q6_K \
--port 8000 \
--jinja \
-ngl 99 \
-c 32768 \
-fa on \
-ctk q8_0 -ctv q8_0
--jinjaenables the model's own Jinja chat template — required for the interleaved-thinking + tool-call format to work in an agent client.-ngl 99offloads all layers to the GPU (the ~24.6 GB Q6_K file plus the KV cache must sit in VRAM — see the MoE note above).-c 32768caps context at 32K — a comfortable starting point for the 5090 that the 24 GB cards could not hold at Q6_K. This is well under the model's 256K ceiling, which still does not fully fit here. Raise or lower it while watchingnvidia-smi(see Troubleshooting).-fa onenables Flash Attention, and-ctk q8_0 -ctv q8_0quantize the K and V caches to 8-bit — roughly halving KV-cache memory versus the fp16 default, which buys back usable context.
This exposes an OpenAI-compatible API at http://localhost:8000/v1. Ollama is a valid alternative — it too needs a build with cohere2_moe support, and it applies its own template, so verify tool-calling works before relying on it for agent edits.
2. Point OpenHands at the local server
OpenHands routes through LiteLLM, so a custom OpenAI-compatible endpoint uses an openai/ model prefix, per the OpenHands local-LLM docs:
export LLM_MODEL="openai/North-Mini-Code-1.0"
export LLM_BASE_URL="http://localhost:8000/v1"
export LLM_API_KEY="EMPTY" # any non-empty string; local servers don't check it
openhands
OpenHands will now use North Mini Code to plan, run shell commands, and edit files in your workspace. Its interleaved thinking drives planning and its native tool-calling drives the file/shell actions.
Results
- VRAM usage: The Q6_K weights are ~24.6 GB (26.40 GB file) and must stay resident, leaving roughly 7 GB of the RTX 5090's 32 GB for the KV cache and activations — which is why context sits comfortably at 32K where the 24 GB cards were pinned lower. Dropping to Q5_K_M (20.34 GB) frees ~11 GB for longer context; Q8_0 (30.21 GB) leaves almost none. File sizes are verified via the bartowski GGUF file tree.
- Quality notes: Cohere reports North Mini Code 1.0 scoring SWE-Bench Verified 80.2% pass@10, Terminal-Bench v2 55.1% pass@10, and mini-SWE-Agent 61.0% pass@1 on agentic-coding evals, per the model card. Those are the vendor's own benchmarks, not a measurement on this GPU. On this roomy tier the near-lossless Q6_K default preserves essentially all of that quality. Recommended sampling per the model card is temperature 1.0, top_p 0.95.
- Speed: North Mini Code 1.0 is brand-new, so there is no community throughput benchmark for it on the RTX 5090 yet —
/check/north-mini-code-1-0/rtx-5090has no benchmark data. We omit the tok/s figure rather than invent one or borrow one from different hardware.
For the full benchmark data, see /check/north-mini-code-1-0/rtx-5090.
Troubleshooting
"unknown model architecture: cohere2moe" (or the model won't load)
Your llama.cpp is older than the build that added cohere2_moe support. The arch landed in PR #24260 (first in the b9626 build); the GGUF itself was made with release b9630, per the bartowski GGUF card. Rebuild from a recent git pull of llama.cpp, or download a b9626-or-later release binary. The same applies to Ollama — you need a version whose bundled llama.cpp includes the arch.
The agent won't edit files / tool calls come out malformed
Almost always a chat-template problem. North Mini Code needs its custom Jinja template for tool-calling; a generic ChatML fallback breaks it. First, make sure you launched llama-server with --jinja (above). If it still misbehaves, the GGUF may carry the outdated template that Cohere ships in tokenizer_config.json rather than the current chat_template.jinja — a mismatch the maintainers flagged on PR #24260. The fix is to pass the reference template explicitly:
# Download the reference template from the llama.cpp tree, then point the server at it
curl -L -o Cohere2-MoE.jinja \
https://raw.githubusercontent.com/ggml-org/llama.cpp/master/models/templates/Cohere2-MoE.jinja
llama-server -hf bartowski/North-Mini-Code-1.0-GGUF:Q6_K --port 8000 \
--jinja --chat-template-file Cohere2-MoE.jinja -ngl 99 -c 32768 -fa on -ctk q8_0 -ctv q8_0
Out of memory at launch, or the KV cache won't fit
The ~24.6 GB Q6_K weights leave ~7 GB on a 32 GB card. OOM at startup usually means the context is set too high, or you loaded Q8_0 (30.21 GB), which leaves almost nothing for the KV cache. Drop to Q5_K_M (20.34 GB) for a bigger KV budget, lower -c (try -c 16384), keep -ctk q8_0 -ctv q8_0 and -fa on enabled, and close any other GPU app before launching. Watch nvidia-smi during a real agent task — a hard coding problem produces a long interleaved-thinking stream that grows the KV cache mid-generation, so size for the peak, not the idle load. The full 256K context does not fit even on 32 GB without heavier KV-cache quantization.
torch/CUDA or llama.cpp reports no GPU (or the model runs on CPU)
Confirm your llama.cpp build has CUDA enabled (GGML_CUDA=ON when building from source) and was built against CUDA 12.8+ so the kernels target the RTX 5090's Blackwell sm_120 — an older CUDA toolkit will not produce sm_120 kernels and the model may silently fall back to CPU or fail to launch. Make sure -ngl 99 is offloading layers. You do not need FP8 support (the GGUF quants are integer) and you do not need to install flash-attn separately — llama.cpp's -fa on uses its own built-in attention kernels.