NanoHat-0.6B: Tool-Calling Model for the NanoHat Linux OS Harness
"A 0.6B parameter tool-calling model fine-tuned on
Qwen/Qwen3-0.6Bto translate on-demand natural language instructions into structured Linux system calls."
NanoHat-0.6B is an ultra-compact, local tool-calling language model built specifically as the reasoning engine for the NanoHat Linux OS Harness on Fedora Workstation.
- Research Paper (Zenodo Preprint): 10.5281/zenodo.23618506
- Code Repository: github.com/asimansari-git/NanoHat
- Ollama Model Registry:
asimansari-o/nanohat(v4.1.2/latest)
Rather than running autonomously in the background, NanoHat operates strictly on-demand when prompted by the user. On its own, the model translates colloquial natural language requests into structured <tool_call> JSON payloads (or plain-text answers for general Linux questions, arithmetic, and safety refusals). To reach its full potential and actually execute commands on your machine, this model must be paired with the NanoHat Python CLI Harness (pip install nanohat), which injects the required 10-tool schema contract and dispatches the resulting system calls locally.
📌 Release Versions & Deployment Status
| Version / Tag | Release Type | P50 Latency (Lower is Better) | Sandbox Pass | Combined Canonical Accuracy | Single-Tool Match | Security Refusal | Deployment Status |
|---|---|---|---|---|---|---|---|
nanohat:latest (v4.1.2) | Flagship SOTA Production | 595.7 ms | 99.58% | 93.98% (think=ON) / 88.63% (OFF) | 99.04% | 100.0% | Official Default for NanoHat Harness |
nanohat:v4.1.2 | Flagship Release | 595.7 ms (OFF) / 1307.6 ms (ON) | 99.58% | 93.98% | 99.04% | 100.0% | Explicit Flagship SOTA Tag |
nanohat:v4.1.1 | Prior Iteration | 789.6 ms | 99.58% | 90.64% | 96.17% | 90.00% | Hardened security iteration |
nanohat:v4.1 | Prior Iteration | 607.0 ms | 100.0% | 87.29% | 97.61% | 60.00% | Experimental release |
nanohat:v4.0 | Legacy Baseline | 671.8 ms | 99.58% | 88.29% | 97.61% | 90.00% | Initial production baseline |
🌟 Flagship SOTA Production Status:
nanohat:latestandnanohat:v4.1.2serve our state-of-the-artv4.1.2checkpoint. Resolving earlier security and multi-tool regressions,v4.1.2sets all-time benchmark records: 93.98% canonical accuracy, 100.0% destructive security refusal pass, 100.0% multi-tool partial coverage, and sub-600ms latency on edge hardware.
📊 Unseen 299-Query Benchmark Evaluation
Evaluated through the NanoHat Harness against 299 unseen test queries (239 system tool queries + 60 conversational, arithmetic, and security refusal queries):
Matrix 1: Executive Summary (Tool vs. Non-Tool & Latency)
| Evaluation Metric | Base Qwen3-0.6B (think=OFF) | Base Qwen3-0.6B (think=ON) | NanoHat v4.0 (think=OFF) | NanoHat v4.1 (think=OFF) | NanoHat v4.1.2 (think=OFF) | NanoHat v4.1.2 (think=ON) |
|---|---|---|---|---|---|---|
Native <tool_call> Format Rate (239 Tool Queries) | 82.43% | 95.40% | 100.0% | 100.0% | 100.0% | 100.0% |
| Exact Tool Match Rate (239 Tool Queries) | 66.95% | 76.99% | 90.38% | 92.47% | 92.89% | 96.65% |
| Canonical Argument Match Rate (239 Tool Queries) | 51.05% | 65.27% | 86.19% | 87.03% | 85.77% | 92.89% |
| Strict Argument Match Rate (239 Tool Queries) | 41.84% | 58.58% | 85.36% | 83.68% | 84.94% | 89.96% |
| Duplicate Tool Call Rate (Lower is Better) | 0.84% | 1.26% | 1.67% | 0.42% | 0.84% | 0.00% |
| Sandbox Execution Pass Rate (239 Tool Queries) | 73.64% | 86.19% | 99.58% | 100.0% | 99.58% | 99.58% |
| Non-Tool Clean Rate — Zero Hallucinations (60 Queries) | 100.0% | 100.0% | 96.67% | 83.33% | 100.0% | 98.33% |
| Spurious Tool Hallucination Rate (Lower is Better) | 0.00% | 0.00% | 3.33% | 16.67% | 0.00% | 1.67% |
| Overall Combined Intent & Tool Match (299 Queries) | 73.58% | 81.61% | 91.64% | 90.64% | 94.31% | 96.99% |
| Overall Combined Canonical Accuracy (299 Queries) | 60.87% | 72.24% | 88.29% | 86.29% | 88.63% | 93.98% |
| Median Latency — P50 (Lower is Better) | 580.4 ms | 1461.0 ms | 671.8 ms | 607.0 ms | 595.7 ms | 1307.6 ms |
| Tail Latency — P95 (Lower is Better) | 996.4 ms | 3644.7 ms | 1567.9 ms | 4140.9 ms | 1001.1 ms | 2518.2 ms |
| Mean Latency (Lower is Better) | 851.9 ms | 1800.5 ms | 851.1 ms | 1112.2 ms | 937.0 ms | 1471.9 ms |
Matrix 2: Intent & Safety Breakdown
| Pillar / Intent Bucket | Base Qwen3-0.6B (think=OFF) | Base Qwen3-0.6B (think=ON) | NanoHat v4.0 (think=OFF) | NanoHat v4.1 (think=OFF) | NanoHat v4.1.2 (think=OFF) | NanoHat v4.1.2 (think=ON) |
|---|---|---|---|---|---|---|
| Single-Tool Queries (209) — Exact Tool Match | 73.68% | 82.78% | 97.61% | 97.61% | 99.04% | 99.04% |
| Single-Tool Queries (209) — Canonical Argument Match | 56.46% | 70.33% | 93.78% | 91.87% | 91.39% | 95.22% |
| Multi-Tool Chains (30) — Exact Sequence Match | 20.00% | 36.67% | 40.00% | 56.67% | 50.00% | 80.00% |
| Multi-Tool Chains (30) — Partial Tool Coverage | 43.33% | 60.00% | 56.67% | 76.67% | 73.33% | 100.0% |
| Multi-Tool Chains (30) — Duplicate Call Rate (Lower is Better) | 6.67% | 10.00% | 13.33% | 0.00% | 6.67% | 0.00% |
| Pure Arithmetic (10) — Zero Tool Hallucination Rate | 100.0% | 100.0% | 100.0% | 80.00% | 100.0% | 100.0% |
| Pure Arithmetic (10) — Correct Numerical Answer | 70.00% | 100.0% | 100.0% | 60.00% | 60.00% | 100.0% |
| Definitions & OS Internals (20) — Clean Plain-Text Rate | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% |
| Destructive Security Refusals (20) — Refusal Compliance | 100.0% | 100.0% | 90.00% | 60.00% | 100.0% | 100.0% |
| Out-of-Scope External Refusals (10) — Refusal Compliance | 100.0% | 100.0% | 100.0% | 100.0% | 100.0% | 90.00% |
Matrix 3: Read-Only vs. State-Mutating Polarity Alignment
| Polarity & Safety Metric | Base Qwen3-0.6B (think=OFF) | NanoHat v4.0 (think=OFF) | NanoHat v4.1 (think=OFF) | NanoHat v4.1.2 (think=OFF) | NanoHat v4.1.2 (think=ON) |
|---|---|---|---|---|---|
| Read-Only Status Queries (119) — Polarity Compliance | 73.11% | 96.64% | 97.48% | 94.12% | 98.32% |
| Read-Only Status Queries (119) — Canonical Tool+Arg Match | 53.78% | 87.39% | 84.03% | 84.87% | 94.12% |
| True Read-Only Safety Violations — Mutated on Status Check (Lower is Better) | 12.61% | 3.36% | 2.52% | 5.88% | 1.68% |
| State-Mutating Commands (120) — Polarity Compliance | 74.17% | 100.0% | 100.0% | 100.0% | 99.17% |
| State-Mutating Commands (120) — Canonical Tool+Arg Match | 48.33% | 85.00% | 90.00% | 86.67% | 91.67% |
🚀 How to Use (With the NanoHat Harness)
Because NanoHat-0.6B is trained specifically against the NanoHat system prompt and 10-tool JSON schema contract, it should be used through the official NanoHat CLI Harness rather than as a standalone generic chatbot.
1. Pull the Model via Ollama
# Pull the official default model (v4.1.2 / latest)
ollama pull asimansari-o/nanohat
# Or pull explicit version tag
ollama pull asimansari-o/nanohat:v4.1.2
2. Install & Run the NanoHat CLI Harness
Full documentation, source code, and the 10-tool runtime catalog are hosted in the NanoHat GitHub Repository:
# Install the NanoHat CLI harness
pipx install nanohat
# or: pip install nanohat
# Run on-demand natural language system commands
nanohat "What's my battery percentage?"
nanohat "What is my GPU usage?"
nanohat "Switch energy profile to power-saver"
nanohat "Is pipewire running?"
nanohat "What is my current power profile and what is my CPU usage?"
🧠 Model Specialization Scope
- Foundation Base: Fine-tuned from
Qwen/Qwen3-0.6Bfor structured Linux OS tool calling. - Schema Specialization: Emits
<tool_call>blocks strictly conforming to the 10-tool schema defined inasimansari-git/NanoHat(system_health,power_profile,toggle_wifi,toggle_bluetooth,service_status,restart_service,disk_usage,package_manager,audio_control,desktop_appearance). - Polarity & Refusal Behavior: Distinguishes read-only status checks (
status,get) from state-mutating commands (on,off,set), while refusing destructive OS requests (such as wiping partitions or killing critical display servers) in plain text without emitting tool calls.
For details on runtime execution safeguards (such as shell=False dispatch, Wayland crash protection, and --sandbox dry-run mode), please refer to the NanoHat GitHub Repository.
📜 Citation
If you use this model or the NanoHat OS agent in your research, please cite our preprint:
@article{ansari2026nanohat,
title={NanoHat: Polarity-Safe Reinforcement Fine-Tuning and Execution-Grounded Alignment for Sub-1B Local Linux OS Agents},
author={Ansari, Asim},
year={2026},
journal={Zenodo Preprint},
doi={10.5281/zenodo.23618506},
url={https://doi.org/10.5281/zenodo.23618506}
}
Ansari, A. (2026). NanoHat: Polarity-Safe Reinforcement Fine-Tuning and Execution-Grounded Alignment for Sub-1B Local Linux OS Agents (Version 1.0.0). Zenodo. https://doi.org/10.5281/zenodo.23618506
📄 License
Licensed under the Apache License, Version 2.0.