Downloads · 30 days
13
14% of all-time downloads
blackpirates/NanoHat-360M
NanoHat-360M is a machine learning model from blackpirates. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A lightweight Fedora Linux desktop AI agent fine-tuned from SmolLM2-360M-Instruct for multi-turn system interaction, structured tool calling, and Linux desktop assistance.
Downloads · 30 days
13
14% of all-time downloads
All-time downloads
95
Public
Parameters
362M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.gguf726 MB · 50%
From the Hugging Face model README
A lightweight Fedora Linux desktop AI agent fine-tuned from SmolLM2-360M-Instruct for multi-turn system interaction, structured tool calling, and Linux desktop assistance.
Project: NanoHat
The model is designed to operate through the NanoHat runtime, which provides the smolagents execution harness, FedoraFormatBridge, six consolidated tools, and security-hardened system execution.
<thought> and <tool_call> generation| Tool | Purpose |
|---|---|
calculator(expression) | Mathematical evaluations |
web_search(query) | Live web search queries |
user_memory(action, key, value) | Persistent user preference storage |
reminder(task, time_or_delay) | Desktop notifications and delayed reminders |
system_health(target) | CPU, RAM, disk, process, battery, and system telemetry |
system_action(action, target) | Controlled OS actions including Wi-Fi, Bluetooth, application launching, screenshots, and screen locking |
The training curriculum covers a broad range of desktop and system-administration workflows, including:
ausearchfirewalld configurationdnf5, system upgrades, COPR, and rpm-ostreeThe model was fine-tuned on a curated 1,094-sample golden dataset containing validated multi-turn Fedora/Linux interaction trajectories.
The dataset was generated through a structured curriculum covering:
Multiple generation runs were consolidated into a unified golden dataset using semantic cross-run deduplication and canonical validation.
The validation pipeline includes Fedora-grounded tool outputs, novelty prompting, JSON syntax auto-rescue, argument synonym normalization, turn-structure correction, and deterministic JSON re-serialization.
NanoHat uses a security-hardened subprocess execution model:
os.system()shell=TrueThe model itself should not be treated as a security boundary. Runtime-side validation and authorization remain responsible for enforcing safe system actions.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "blackpirates/NanoHat-360M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=(
torch.bfloat16
if torch.cuda.is_bf16_supported()
else torch.float32
),
device_map="auto",
)
messages = [
{
"role": "system",
"content": (
"You are a helpful AI agent running on Fedora Linux. "
"Available tools: [calculator, web_search, user_memory, "
"reminder, system_health, system_action]."
),
},
{
"role": "user",
"content": "Check my CPU usage and set a reminder to drink water in 20 minutes.",
},
]
input_text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.2,
)
print(
tokenizer.decode(
outputs[0][inputs.input_ids.shape[1]:],
skip_special_tokens=True,
)
)
HuggingFaceTB/SmolLM2-360M-Instruct<thought>, <tool_call>, and assistant responses)This is a 360M-parameter specialized agent model, not a general-purpose frontier language model.
Performance may degrade on:
For real system operations, always validate model-generated actions at the runtime/tool layer before execution.