12 yesterday

ollama run asimansari-o/nanohat:v4.1

Details

2 weeks ago

ec2726d68d1f ยท 639MB

qwen3
ยท
596M
ยท
Q8_0
{ "num_ctx": 4096, "stop": [ "<|im_end|>", "<|endoftext|>" ], "tempe

Readme

asimansari-o/nanohat

DOI

A 0.6B parameter tool-calling model fine-tuned on Qwen/Qwen3-0.6B to power the NanoHat Linux OS Harness on Fedora Workstation.

asimansari-o/nanohat is the specialized language model curated specifically as the reasoning and tool-calling engine for NanoHat (https://github.com/asimansari-git/NanoHat).

Rather than acting as a standalone general-purpose chatbot, this model was trained to translate on-demand natural language system instructions into structured <tool_call> payloads for the NanoHat runtime. To reach its full potential and execute system commands on your machine, run this model through the official NanoHat CLI Harness (pip install nanohat), which provides the required system prompt, 10-tool JSON schemas, and local execution engine.


๐Ÿท๏ธ Available Tags & Deployment Status

Tag Base Checkpoint Status Notes
latest NanoHat v4.1.2 Stable Flagship Default Official default for the NanoHat harness. 93.98% canonical accuracy, 100% security refusal pass, 100% multi-tool partial coverage, 595.7 ms P50 latency.
v4.1.2 NanoHat v4.1.2 Flagship SOTA Release Explicit flagship tag. 93.98% canonical accuracy (think=ON) / 88.63% (think=OFF), 100.0% security refusal pass, 1.68% read-only violations.
v4.1.1 NanoHat v4.1.1 Prior Checkpoint Hardened security iteration (90.64% canonical accuracy).
v4.1 NanoHat v4.1 Prior Checkpoint Experimental release (87.29% canonical accuracy).
v4.0 NanoHat v4.0 Legacy Baseline Initial production release (88.29% canonical accuracy, 90.0% security pass).

๐ŸŒŸ Production Flagship Default:
asimansari-o/nanohat:latest and asimansari-o/nanohat:v4.1.2 serve our state-of-the-art v4.1.2 weights. Delivering 93.98% canonical accuracy, 100.0% security refusal pass, 100.0% multi-tool coverage, and sub-600ms latency, v4.1.2 is the official production default for the NanoHat harness.


๐Ÿš€ Quickstart & Usage (via NanoHat Harness)

Full installation instructions, source code, and the supported 10-tool catalog are available on the NanoHat GitHub Repository.

1. Pull the Model in Ollama

# Pull the official flagship model (v4.1.2 / latest)
ollama pull asimansari-o/nanohat

# Or pull explicit release tag
ollama pull asimansari-o/nanohat:v4.1.2

2. Install & Run the NanoHat CLI Harness

# Install the NanoHat CLI harness
pipx install nanohat
# or: pip install nanohat

Once installed, use the nanohat CLI to execute on-demand system directives (see github.com/asimansari-git/NanoHat for full usage details):

nanohat "What's my battery percentage?"
nanohat "Check CPU load and temperature"
nanohat "What is my GPU usage?"
nanohat "Switch energy profile to power-saver"
nanohat "Is Wi-Fi turned on?"
nanohat "Is pipewire running?"
nanohat "Check my root disk usage"
nanohat "Switch desktop to dark mode"
nanohat "What is my current power profile and what is my CPU usage?"

๐Ÿ“Š 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 Queries) 82.43% 95.40% 100.0% 100.0% 100.0% 100.0%
Exact Tool Match Rate (239 Queries) 66.95% 76.99% 90.38% 92.47% 92.89% 96.65%
Canonical Argument Match Rate (239 Queries) 51.05% 65.27% 86.19% 87.03% 85.77% 92.89%
Strict Argument Match Rate (239 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 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, Polarity & 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) โ€” 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%
Read-Only Status Queries (119) โ€” Polarity Compliance 73.11% 89.92% 96.64% 97.48% 94.12% 98.32%
True Read-Only Violations โ€” Mutated on Status (Lower is Better) 12.61% 4.20% 3.36% 2.52% 5.88% 1.68%
State-Mutating Commands (120) โ€” Polarity Compliance 74.17% 83.33% 100.0% 100.0% 100.0% 99.17%

๐Ÿ”— Links & Documentation


๐Ÿ“œ 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