qwen3.8-4b-empero-v21-Hermes-agentic-subagent-toolcallsqwen3.8-4b-Hermes-agentic-subagent-toolcalls (v21) - DISCONTINUED !!! (for testing, research and development only )DISCONTINUED !!! replaced by V24 - qwen3.8-4b-Hermes-agentic-subagent-toolcalls (v24) next gen from v2.x family
***Distilled model trained on Hermes harness traces, optimized for Ubuntu 22.04. Other OSes: not tested — behavior unknown.
A 4B tool-calling subagent for the Hermes agent harness protocol — LoRA SFT
on empero-ai/Qwen3.8-4B-Distill, trained on ~2.9k examples distilled from
cloud teachers (GLM-5.2/5.3, DeepSeek Pro) on the REAL harness protocol
(multi-turn tool loops, tool responses, verification) + 140 replay-verified
golden trajectories (every command actually executed, errors captured for real).
**NOTE: All cloud teachers performed industrial production workflow with ROOT privileges, performing SUDO commands, debugging at software/hardware level microcontrollers such as: various type of ECU/MCU, embeded android/micropython/linux/Rtos devices, flashing rom, patching firmwares, building (custom roms), custom OS, adding/replacing functions, rebuilding control pannels, driving entire production line autonomous.
***WARNING !! This small 4b class model "qwen3.8-4b-empero-v21-Hermes-agentic-subagent-toolcalls" may behave like teachers, using sudo commands, apply patch, reflash firmware!! Test it with cautions on your own risk using special guardrails !!!
Why v21b
v20 (same family, on HF) scored 9/12 on the canary but leaked a "sudo reflex" and stdin-hang. v21b fixes the data side: normalized paths, no-sudo reads, /dev/null stdin discipline, think-gating, golden replay-verified examples, and a zero-machine-identity guarantee (paths/IPs/hostnames normalized).
Verified results (real harness, artifacts verified — not self-report)
Canary agent-loop12: 11/12 (baseline parity is 9/12; v20 = 9/12). turns_mean = 3.2 — most efficient model in the family.
30-task smoke suite (betaconceptpipeline, artifact verdicts): 13 pass / 15 fail / 2 INVALID, re-scored on artifacts:
| Class | Status |
|---|---|
| B7 fabrication | 0 hits — no invented values in 30 tasks |
| B9 lost-list | 0 hits — 10/10 checklist with real artifacts |
| B3 sudo reflex | 1 hit (SM20) — known limit |
| B11 stdin hang | 1 hit (SM22) — known limit |
| deliverable-discipline | ~7 fails: work done correctly but report file output to wrong path/dir / misspelled name — the main remaining class |
Known limits (v23 targets these): deliverable-discipline (chat-final instead of writing the requested file), sudo reflex edge cases, stdin-fed interactive programs, KB/MB unit errors.
Runs anywhere
- GGUFs: q8_0 / q6_K / q4_K_M + f16 + bf16 safetensors
- Tool-call chat template included (
chat_template.jinja,Modelfile.ollama) ollama create empero-4b-tools-v21 -f Modelfile.ollama
Changelog (v20 → v21b)
- 2,921 training windows (v20: 1,953); golden 140 replay-verified (executed commands, real errors)
- think-gating tuned (41% think windows), no_tool 12%
- sources: local teacher sessions (dspro, glm-5.3), spectrof production sessions, megabit oracle-verified, hermes-function-calling singleshots
- serving recommendation: temp 0.3, num_ctx 64k, num_predict 1024
- training: FRESH LoRA from base (r=32, alpha=64, all-linear), 396 steps, 2 epochs, LR 2e-5, batch 16 — no stacking on previous adapters
Training data
Private (teacher-licensing review) — available on request to serious
contributors: ferry-el-kom/hermes-agentic-tooluse-v21-sft-dataset.
System prompts & tool schema (exact evaluation configuration)
Training — one system prompt per task category (assigned by the dataset builder's classifier; the model sees exactly one of these per window):
| Category | Prompt |
|---|---|
| code | You are Hermes Agent in coding mode. Write correct, version-explicit code (check interpreter/compiler version first). Verify by running before reporting done. |
| files | You are Hermes Agent in file-ops mode. Work with paths exactly as given; quote paths with spaces. Verify files exist (ls/cat) before claiming done. |
| searching | You are Hermes Agent in search mode. Search precisely, report only what you actually found, cite paths and counts. |
| hardware | You are Hermes Agent in hardware mode. Identify devices dynamically (lsusb, /dev/serial/by-id), never assume port numbers; check versions and permissions. |
| general | You are Hermes Agent. Be direct; verify state before claiming completion. |
Benchmark (30-task smoke suite) — single fixed system prompt:
You are Hermes Agent. Be direct; verify state before claiming completion. You work inside a sandbox workdir. Use the tools for real work; never fabricate results. One tool call per turn.
Canary (agent-loop12) — You are Hermes Agent. Use the tools. One tool call per turn.
Tools exposed at evaluation (with parameter schemas):
[
["terminal", "Run a shell command in the workdir (cwd is the workdir).", {"command": "string"}],
["read_file", "Read a text file (line-numbered).", {"path": "string"}],
["write_file", "Create/overwrite a file.", {"path": "string", "content": "string"}],
["patch", "Replace old_string with new_string in a file.", {"path": "string", "old_string": "string", "new_string": "string"}],
["search_files", "Search file contents (pattern) or find files (target=files).", {"pattern": "string", "target": "string"}]
]
Note: the benchmark prompt matches the general training category plus two
extra sentences; results under other prompts may differ (the model is
prompt-sensitive — see SMOKE-RESULTS.md).
Authors & pipeline
Distilled on a single RX 6800 XT (16GB) with the Hermes Agent pipeline. Decision logs, smoke suites and the full lineage: DM @ferry-el-kom on HF. Feedback welcome — especially the harsh kind.