Serve ternary zen6-flash locally on laptop or single GPU

Download and serve ternary zen6-flash (5.95 GB) locally on Apple Silicon or a single GPU with zero cloud egress and OpenAI-compatible /v1/chat/completions.

Run a 27B-class coding and reasoning model offline on a laptop in 5.95 GB of RAM. zen6-flash packs 1.77-bit ternary weights with a 2.06 GB speculative drafter under Apache-2.0.

Architecture & contract

Because local hanzo engine serve exposes the exact same /v1/chat/completions contract as https://api.hanzo.ai/v1/chat/completions, your CLI, SDK, and hanzo dev workflows work unchanged offline or in air-gapped environments.

Primary endpoint: POST /v1/chat/completions · Status: shipped · Level: practitioner

Run it across all four surfaces

# Download Apache-2.0 ternary weights and serve locally
hf download zenlm/zen6-flash --local-dir ./zen6-flash
hanzo engine serve ./zen6-flash
import { Configuration, AiApi } from 'hanzoai';

// Point basePath at local engine or omit for hosted api.hanzo.ai
const ai = new AiApi(new Configuration({
  basePath: process.env.HANZO_BASE_URL ?? 'https://api.hanzo.ai',
  accessToken: process.env.HANZO_API_KEY,
}));
const { data } = await ai.postChatCompletions({
  model: 'zen6-flash',
  messages: [{ role: 'user', content: 'Explain zero-copy serialization in 3 bullets.' }],
});
console.log(data);
import os
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AiApi

cfg = Configuration(
    host=os.environ.get("HANZO_BASE_URL", "https://api.hanzo.ai"),
    access_token=os.environ["HANZO_API_KEY"],
)
print(AiApi(ApiClient(cfg)).post_chat_completions(
    model="zen6-flash",
    messages=[{"role": "user", "content": "Explain zero-copy serialization in 3 bullets."}],
))
# Identical request works against http://127.0.0.1:8731/v1 or https://api.hanzo.ai/v1
curl -s https://api.hanzo.ai/v1/chat/completions \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"zen6-flash","messages":[{"role":"user","content":"Explain zero-copy serialization in 3 bullets."}]}' | jq -r '.choices[0].message.content'
curl -s -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "engine",
      "arguments": {"op": "get_engine_models", "input": {}}
    }
  }'

Verify the outcome

  • Verify tokens/sec throughput locally and assert identical JSON schema when toggling HANZO_BASE_URL.

Production guardrails

  • Pin exact Hugging Face commit revisions in production air-gapped bundles rather than floating main.

Next steps & Hanzo University

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.
Last updated Nov 25, 2026