--- license: apache-2.0 base_model: prism-ml/Bonsai-8B-unpacked language: - id - en pipeline_tag: text-generation library_name: gguf --- ![SMAR Zero](smar-zero-header.png) # SMAR Zero **SMAR Zero** is an agentic edge variant of SMAR, fine-tuned from **Bonsai-8B** (PrismML, based on dense Qwen3-8B, 8.19 billion parameters) for tool-using work on your own device. It runs **100% on your hardware** — no server of ours, no inference cost, no account. Download once, run forever. > **Units — read first.** Every size in this card is written in **two > units**: GiB (1 GiB = 1,073,741,824 bytes) and decimal GB > (1 GB = 1,000,000,000 bytes). Do not confuse them. ## Files (two files, not one) | File | Exact bytes | GiB | Decimal GB | SHA256 | |---|---|---|---|---| | `Bonsai-8B-base-Q2_K.gguf` (base) | 3,280,470,720 | 3.06 GiB | 3.28 GB | `f3e9bd7f7291cfcb17e3733ae797765707cd1c5715d2cfe387200dd8d877ec97` | | `smar-zero-v9-lora.gguf` (LoRA adapter) | 174,622,688 | 166.5 MiB | 0.17 GB | `f2f8d8c6269e709253364326d7168cda9904b1887d1becf78eee1bedf78619fe` | | **Total** | **3,455,093,408** | **3.22 GiB** | **3.46 GB** | — | ## Single-file variant (Pro): `smar-zero-v9-Q5_K_M.gguf` One file, no LoRA to attach. The identity-v9 adapter was merged into the FP16 base and the result quantized to Q5_K_M with an importance matrix (`llama-quantize` b12870). This is the strongest single-file build: it passed the full STRICT knowledge battery **12/12**, one point above the two-file release (11/12). It costs more disk and RAM (5.85 GB download, ~7 GB free RAM). | File | Exact bytes | GiB | Decimal GB | SHA256 | |---|---|---|---|---| | `smar-zero-v9-Q5_K_M.gguf` (merged, single file) | 5,849,457,536 | 5.45 GiB | 5.85 GB | `af00cdc494326775d36aa48c69e453efc58c22347b5aef911bde81b3b4e5347f` | Run it with the helper runner: ```bash python3 run_smar_zero.py --model /path/to/smar-zero-v9-Q5_K_M.gguf ``` Or directly with llama.cpp, LM Studio, or Ollama — no LoRA flag needed: ```bash llama-server -m smar-zero-v9-Q5_K_M.gguf -c 4096 --port 8080 ``` ## Why two files (not one merged file)? Every merge-then-quantize attempt failed the same way: the adapter (LoRA) was trained on binary weights, then merged and quantized — and the LoRA signal was erased (Q4_K_M, IQ1_M twice, HQQ 2-bit, naive merged Q2_K). The only configuration that passed: **the base quantized by itself from the same binary snapshot the adapter was trained on, and the adapter attached at runtime without ever passing through a quantizer**. That is this release. One exception: the Q5_K_M single-file variant above. Merging then quantizing at **Q5_K_M with an importance matrix** preserved the adapter signal (STRICT 12/12). The failures were all at lower precision (Q4_K_M, IQ1_M, HQQ 2-bit, naive merged Q2_K), where the quantizer erased the LoRA. So: do not merge and re-quantize below Q5_K_M, and do not change the LoRA scale on the two-file release. Consequence: the LoRA file **must** be attached at runtime with scale 1.0 (`--lora-scaled smar-zero-v9-lora.gguf:1.0`). Do not merge base + LoRA and re-quantize; do not change the scale (sweeps at 0.75 and 1.25 were both worse). ## How to run ### Option A — helper runner (easiest) ```bash python3 run_smar_zero.py ``` Then open **http://127.0.0.1:8765** in your browser. The first run downloads an official llama.cpp binary if needed, then starts a local server. Terminal mode and self-check: ```bash python3 run_smar_zero.py --cli python3 run_smar_zero.py --smoke ``` With the GGUF files in another location: ```bash python3 run_smar_zero.py --base /path/to/Bonsai-8B-base-Q2_K.gguf --lora /path/to/smar-zero-v9-lora.gguf ``` ### Option B — llama.cpp directly ```bash llama-server -m Bonsai-8B-base-Q2_K.gguf \ --lora-scaled smar-zero-v9-lora.gguf:1.0 \ -c 4096 --port 8080 ``` The GGUF files are standard: they also open in **LM Studio** or **Ollama** (`ollama create`), as long as the LoRA is attached at runtime with scale 1.0, not merged. ## Requirements - Python 3.10+ for the runner (stdlib only, no `pip install` needed) - ~5 GB free RAM for comfort (measured RSS: ~2.5 GiB after load, peak ~4.4 GB while generating, mostly mmap file-backed), ~4 GB disk, 4+ CPU cores. Minimum proven to run: a VM with ~2.8 GB usable (slow, ~1–2 tok/s). - GPU optional (the runner is CPU-only by default; it still runs without one). Measured VRAM on NVIDIA L4: peak **3.70 GB at ctx 512** and **4.23 GB at ctx 4096** — a **6 GB GPU is the minimum**, and **8 GB is recommended for agentic use above 16k context**. - Context: declared maximum **65,536 tokens** (from the model file metadata); **tested up to 4,096**. Quality above 4,096 is unproven — training used sequence length 4,096. - Windows / macOS / Linux. No internet needed after both files are present (except weather/stocks — see below). ## What it can do Eight local tools (the model picks the tool and its arguments; the runner executes them): | Tool | Example | Note | |---|---|---| | Calculator | "What is 17 * 8 + 5?" | Safe local evaluation | | Unit conversion | "Convert 5 kilometers to meters." | km/m, kg/g, °C/°F, time units | | Timer | "Set a timer for 10 minutes." | Rings in the terminal | | Calendar | "Add meeting tomorrow 10:00" | Saved locally | | Notes search | "Cari catatan tentang ..." | Local `.txt` notes | | Word translation | "Translate 'kucing' to English." | Small offline dictionary (~60 words) | | Weather | "What is the weather in Jakarta?" | **Offline: not available** | | Stock prices | "Harga saham BBCA?" | **Offline: not available** | General Q&A also works: "Siapa kamu?", "What is AQI?", "Who is the founder of Atharia AGI?". ## Evaluation — honest scores (1 December 2026) ### This release: Q2_K base + LoRA at runtime (llama-server b12870, L4 GPU, temp 0) | Test | Score | |---|---| | Identity ("Siapa kamu?") | **2/2** | | Founder (8 questions) | **8/8** | | Topics (SMAR, AQI, DIGDAIA, neugi.com, webiz.id, ...) | **18/18** | | STRICT knowledge probes (12 questions) | **11/12** | | Serving (SMAR Zero system prompt) | **2/2** | | Tool-use smoke, native format (5 tasks) | **5/5 arguments correct** | | Tool-use smoke, JSON format (5 tasks) | **5/5 arguments correct** | | BFCL-200 | **107/200 = 53.5%** — simple 80%, multiple 86%, parallel 48%, irrelevance 0% | The single STRICT miss: "Apa kepanjangan SMAR?" was answered with garbled text. The expansion of SMAR has never been officially explained — the correct answer is to say so. ### Single-file variant: Q5_K_M merged (llama-server b12870, CPU, temp 0) | Test | Score | |---|---| | Identity ("Siapa kamu?") | **2/2** | | Founder (8 questions) | **8/8** | | Topics (SMAR, AQI, DIGDAIA, neugi.com, webiz.id, ...) | **17/18** | | STRICT knowledge probes (12 questions) | **12/12** | | Serving (SMAR Zero system prompt) | **2/2** | | Tool-use smoke, native format (5 tasks) | **5/5 arguments correct** | | Tool-use smoke, JSON format (5 tasks) | **5/5 arguments correct** | The one topic miss: "What is SMAR?" (English) — the same question passes in Indonesian. The Q5_K_M is the only build that passed all 12 STRICT probes. **Methodology note (BFCL-200):** this is **not the official BFCL harness**. Prompt format is our own TOOL_SYS style, ground truth is the official BFCL v4 `possible_answer`, scoring follows official AST semantics. One post-run correction (multiple_26 false → true) moved the score from 106/200 (53.0%) to 107/200 (53.5%). ### Reference: same base + identity, FP16 merged (evaluated by Reto) | Test | Score | |---|---| | BFCL-200 (Reto's harness) | **118/200 = 59.0%** — simple 88%, multiple 76%, parallel 72%, irrelevance 0% | | Proxy N=40 (tool accuracy / task success) | **90.0% / 87.5%** (control model: 85.0% / 75.0%) | | Pack-150, Indonesian | **42.00%** | | Pack-150, English | **82.69%** | Caution: Reto's prompt format is unknown, so the 59.0% vs 53.5% comparison is only valid if the formats match. The Pack-150 Indonesian score (42.00%) shows this model is strong at identity and tool use, and weak at general Indonesian knowledge. ## Limitations — read before judging 1. **Size 3.46 GB decimal (3.22 GiB).** Not 1 GB, not 2 GB. A 2.00 GB decimal target was proven impossible for an 8.19B-parameter model with llama.cpp: the smallest quantization (IQ1_S) of the base alone is already 2.11 GB decimal, and that base failed evaluation. The files **do not fit on a phone** (about 5 GB free RAM is needed for comfort); they are for laptop/PC. The single-file Q5_K_M variant is larger still — 5.85 GB decimal (5.45 GiB) download, ~7 GB free RAM — also laptop/PC only. 2. **Indonesian general knowledge 42%** (Pack-150 ID) — strong at identity + tool use, weak at general Indonesian knowledge. `translate_word` is only a small dictionary, not a general translator. 3. **The model cannot abstain on its own** (0/50 on the irrelevance probe: it always calls a tool even when none fits). Abstention is handled by a serving-side gate in official serving only — **not in these weights**. The local runner has a simple overlap gate that blocks a tool call when no tool is relevant, but that is not a replacement for the full gate. 4. **Weather and stocks are offline.** The runner answers honestly "not available" instead of inventing numbers. 5. **BFCL-200 53.5% is a non-official harness** (see methodology above). 6. **Known small flaws:** one English founder answer adds a wrong "II, Jr." suffix (the name itself is still correct); one serving answer mentions "AI berbasis JavaScript untuk tugas agenticut" (2-bit quantization noise, not lost knowledge). 7. **No hosted demo.** There is no inference hosting for this model. ## Provenance - Base: `prism-ml/Bonsai-8B-unpacked` — dense Qwen3-8B, 8.19B parameters, 1-bit weights. - Fine-tuning: SFT run A2, 3,066 steps, 32,704-row dataset, LoRA r16 / alpha 32, learning rate 1e-4 cosine, 3 epochs, sequence length 4,096. Identity adapter (identity-v9) verified 2/2 identity, 8/8 founder, 18/18 topics, 12/12 STRICT in FP16. - The product base was quantized in-house from the F16 base-only snapshot with `llama-quantize` (b12870). The LoRA adapter was converted to GGUF unquantized. The proven principle: **an adapter must never pass through a quantizer.** - The Q5_K_M single-file variant was built by merging the identity-v9 adapter into the FP16 merged model and quantizing the result to Q5_K_M with an importance matrix (`llama-quantize` b12870, `--imatrix imatrix-q8.dat`). SHA256 `af00cdc494326775d36aa48c69e453efc58c22347b5aef911bde81b3b4e5347f`. - Developed by Atharia AGI. Founder: Rangga Prayoga Hermawan. - License: Apache 2.0. ## License Apache License 2.0 — see `LICENSE`.