qwen3.8-4b-Hermes-agentic-subagent-toolcalls (v20) - DISCONTINUED !!! (for testing, research and development only )DISCONTINUED !!! replaced by V21 - qwen3.8-4b-Hermes-agentic-subagent-toolcalls (v21) 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 tool-calling subagent model trained on the real Hermes harness protocol — the first model of our distillation pipeline that performs real work on the live harness (verified by artifact inspection, not self-report).
- Base: Qwen3.8-4B "empero" (distilled) — 4B parameters (Qwen3.8 architecture, MTP).
- Training: LoRA SFT, fresh from base, 244 steps (2 epochs), LR 2e-5, SEQ 768, ACCUM 16, bf16, ~6.3 h on AMD RX 6800 XT (ROCm), loss 1.30, bucket loss [1.78→1.48].
- Data: 2,122 examples (1,953 train / 169 valid) built from 4 cloud teachers
(GLM-5.2/5.3, DeepSeek) + 450
NousResearch/hermes-function-calling-v1single-shot examples + 44 discipline trajectories (JSON Mode, portability, version-explicitness)-
smoltalk. Zero machine identity in the data (paths/user/IPs/MACs normalized).
-
**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-v20-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 !!!
Capabilities
- Multi-turn tool calling on the Hermes harness protocol (6-tool catalog: terminal, execute_code, read_file, write_file, search_files, patch) — parse-retry, loop-guard, verify-gate.
- Category system prompts (code / file-ops / search / hardware / general) trained into the weights — respond to a per-task prompt router (MoPs-style).
- JSON Mode: strict structured outputs without tools.
- Verification-before-done: trained to check real state (ls/cat/rerun) before declaring completion — anti-fabrication.
- Portability: no machine identity in training data; dynamic device/port addressing (lsusb → /dev/serial/by-id), python3 version checks.
Benchmarks (vs our lineage)
| Metric | v20 | v9 (champion) | v13 | v15 | v17 | v18 |
|---|---|---|---|---|---|---|
| agent-loop12 (ollama) | 9/12 (4.4 turns) | 9/12 | 7/12 | 11/12* | 11/12* | 10/12* |
| Harness smoke (7 real tasks, artifacts verified) | 5/7 real | — | — | fabricated | — | derailed |
| Grammar: ident / json | 5/5 / True | — | — | — | — | — |
- sandbox eval (pre-harness era) — not comparable to harness scores.
External references on the same harness smoke suite: hermes3-3b (Nous, 3B) = instant fabrication; qwen3.8-9b-hermes-function-calling-v2 = derailed (Windows paths, prompt extraction). v20 is the only 4B-class model that performed the tasks with real tools.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("ferry-el-kom/qwen3.8-9b-Hermes-agentic-subagent-toolcalls",
trust_remote_code=True, fix_mistral_regex=True)
model = AutoModelForCausalLM.from_pretrained("ferry-el-kom/qwen3.8-9b-Hermes-agentic-subagent-toolcalls",
trust_remote_code=True, dtype="auto")
The tool-call chat template (ChatML + <tools>/<tool_call> blocks + thinking tags) is
embedded in tokenizer_config.json and also shipped as chat_template.jinja.
Ollama (from the q8_0 GGUF in this repo)
ollama create qwen38-hermes-agentic-v20 -f Modelfile.ollama
Method (pipeline summary)
- State-window extraction from 4 cloud-teacher sessions (attribution-gated).
- Display-proof builder (render markers derived at runtime from a probe render; P5 filters dead/self-doubt/corrected turns) — 938 clean examples.
- Universal normalization (paths →
~, hostname →(hostname), private IPs/MACs redacted) — 0/4,405 residues. - v20 mix: Hermes-real protocol windows + 450 hermes-FC single-shots (their FC system prompt) + 44 discipline trajectories (incl. 8 JSON Mode) + smoltalk; 5 category system prompts assigned per example.
- LoRA fresh from base (rank r=16, target q,k,v,o,g,u,d), cosine LR 2e-5, watchdog + checkpoints every 10 steps.
- Merge (Qwen3_5ForCausalLM) + MTP restore + GGUF q8_0 export; eval on ollama only (NF4/bf16 generate is broken on ROCm).
Known limits
- Final-report fabrication still occurs when the model reports without verifying — mitigate with artifact-gated reporting at the harness level.
- Workdir discipline (writes outside the assigned dir) — supervise or constrain via harness config.
- 4B reasoning: long chains of reasoning degrade; use thinking gating (33.7% of turns).
License
Apache-2.0. Training datasets are published as private HF datasets
(ferry-el-kom/qwen3.8-v20-hermes-agentic-sft, ferry-el-kom/qwen3.8-v20-sft-sources).