Technical documentation

Zwen-Prime, in depth

Architecture, the hardware matrix, the complete CLI reference, and the licensing structure. Everything an engineer needs to run Zwen-Prime against a real codebase.

Mission & architecture

Zwen-Prime is a 7B-parameter reasoning engine, not a generic chatbot. It is built via DARE-TIES fusion of three model lineages — Mistral-7B, Dolphin, and ReWiz — into a single coherent mind that reasons in the open, ships the artifact, and says nothing else. It runs entirely on your machine, with a 32,000-token context window for ingesting massive codebases.

Fusion lineage

DARE-TIES selectively edits each expert's weights into the base, preserving what each lineage teaches while suppressing interference. The result keeps every capability without the merge drift that flattens naive merges.

Mistral-7B

Base architecture

The 7B transformer backbone and the v0.3 chat template embedded in the GGUF. Provides the linguistic core.

Dolphin

Alignment & instruction

The dolphin-2.9.3-mistral-7B-32k merge — instruction tuning, tool-calling fluency, and the 32k RoPE scaling we preserve intact.

ReWiz

Reasoning fusion

The reasoning corpus that supplies the step-by-step math, typed Python, and full-stack discipline fused on top.

ChatML-native

Despite the Mistral v0.3 chat template embedded in the GGUF, Zwen-Prime's fusion corpus (Dolphin / ReWiz) is ChatML-formatted. Its native turn format is <|im_start|>system…<|im_end|>. Under Mistral [INST] framing it ignores the user prompt and runs on; under ChatML it reasons cleanly and stops on turn boundaries. The CLI therefore pins ChatMLChatWrapper automatically.

Reasoning structure

Every non-trivial answer opens a <thinking>…</thinking>block — the model's private scratchpad and your guarantee of zero-shot accuracy. Inside it, Zwen-Prime restates the real constraint, lays out the step-by-step logic, and gives a complexity breakdown. The block is followed immediately by the raw deliverable. No transition sentence. No filler. Ever.

<thinking>
Restate the problem's actual constraint.
Step-by-step logic: data flow, state, invariants.
Complexity: time/space Big-O, one-line justification.
</thinking>
<the artifact — no preamble, no sign-off>

The persona enforces it: no greetings, no “Certainly”, no “Hope this helps.” Reason in the open, ship the artifact, stop.

32k context window

32,000 tokens — RoPE scaling preserved

Our base merge is dolphin-2.9.3-mistral-7B-32k, and we kept its 32k RoPE scaling intact. Zwen-Prime officially supports a 32,000-token context window — enough to ingest a massive enterprise codebase, a long transcript, or a thick spec in a single pass and reason over it without drift. The CLI defaults to this full window out of the box.

The hardware matrix

Requirements below are for the Q4_K_M — the 4-bit quantized 7B model distributed by the CLI. Weights occupy roughly 4.2–4.5 GB on disk; the rest is KV cache, which scales with context length.

Weights & memory

Quant

Q4_K_M

Precision

4-bit

Weights on disk

~4.2–4.5 GB

Parameters

7B

Apple Silicon (Mac)

Zwen-Prime targets unified-memory Apple Silicon, riding Metal for matrix ops across the entire M1–M5 lineup — Air and Pro. No discrete GPU, no cloud.

Apple Silicon

Metal-accelerated · unified memory

Chips

M1 · M2 · M3 · M4 · M5

Full Apple Silicon lineup, Air and Pro.

Memory

Unified memory

Weights and KV cache share one fast pool — no discrete GPU required.

Minimum

8 GB unified

Q4_K_M runs, but context is constrained under multitasking or near the 32k limit.

Recommended

16 GB+ unified

Comfortable context windows up to the full 32k, with headroom for tooling and editors.

Acceleration

Metal (native)

node-llama-cpp rides Metal for matrix ops. No cloud, no network round-trip.

Windows & Linux

Two paths on the same card family: a dedicated GPU (RTX 3060 / 4060 class) for throughput, or a CPU fallback on any host with sufficient system RAM.

Windows & Linux

GPU · NVIDIA / AMD · CPU fallback

GPU

NVIDIA RTX 3060 / 4060

Dedicated-GPU path for throughput. Older cards below compute 5.0 are unsupported.

VRAM (GPU)

6–8 GB minimum

Fits the 4.2–4.5 GB weights with room for KV cache at default context.

CPU fallback

16 GB system RAM

Viable on any x86/ARM host without a GPU — considerably slower than the accelerated path.

Compute capability

5.0+

NVIDIA or AMD, via the CUDA / Vulkan backends.

32k context

Requires more VRAM

Utilizing the full 32k dynamically raises KV-cache memory — scale the card to your working context.

KV cache grows with context. A 6 GB card fits the weights comfortably at default context; approaching the full 32k limit dynamically demands more VRAM — scale the card to your working context, not just the weight file.

Server & enterprise

For managed hosting and enterprise deployment at scale — batched inference across multiple GPUs holding the full 32k context for many concurrent sessions.

Server & enterprise

Multi-GPU data-center runtime

Topology

Multi-GPU nodes

Data-center runtime for managed hosting and enterprise deployment at scale.

VRAM

24 GB+ per GPU

Holds the full 32k context with headroom for batched inference.

Context

Full 32k concurrent

Many sessions reasoning over massive codebases in parallel.

Throughput

Batched inference

Maximizes tokens/sec across concurrent enterprise workloads.

Deployment

Licensed via Axora

Commercial use, API exposure, and managed hosting are licensed through Axora AI Solutions.

CLI reference manual

Installation

Install globally with npm. Node 20 or later is required.

npm install -g @zwenailabs13/zwen-cli
zwen --version

Commands

  • npm install -g @zwenailabs13/zwen-cli

    Install the CLI globally. Node 20+ required.

  • zwen run zwen-prime

    One-shot completion — streams the artifact for a single prompt.

  • zwen chat

    Interactive REPL session with the model.

  • zwen list

    List all Zwen GGUF models cached in ~/.zwen/models/ with file sizes.

Flags

  • --gguf <path>

    Path to GGUF weights. Defaults to ~/.zwen/models/Zwen-Prime-Final.gguf.

  • --system-prompt <path>

    Override the bundled persona with a custom prompt file.

  • -t, --temperature <n>

    Sampling temperature. Default 0.2.

  • --ctx <n>

    Context window in tokens. Default 32768 — Zwen-Prime supports up to 32k via RoPE scaling.

  • --max-tokens <n>

    Maximum tokens to generate. Default 2048.

  • --json

    Emit the final response as JSON { prompt, response }.

Models are cached at ~/.zwen/models/. On first run, a missing model is fetched automatically from Hugging Face with a resumable progress bar. Override the default path with ZWEN_GGUF or a custom persona with ZWEN_SYSTEM_PROMPT.

Model constraints & licensing

Zwen-Prime ships under a dual-license structure that keeps it free for builders while funding continued research.

Free — local developer use

Research, community, and local development are free under CC BY-NC 4.0. Run it on your laptop, fuse it into your workflow, build with it — no charge.

  • Research
  • Community use
  • Local development

Commercial — licensed via Axora

Commercial use, API exposure, or enterprise deployment must be licensed through Axora AI Solutions. This includes managed hosting and any paid offering built on the model.

Contact Axora →

The zwen-cliand related open-source tooling are provided “as is” without warranty. Outputs are generated by a statistical model and may contain errors. Always verify generated code before shipping.