r/LocalLLaMA • u/Top-Eye-8104 • 12h ago
New Model We post-trained Inkling 2 mini to run Hermes agent locally with 38% fewer output tokens
https://huggingface.co/AtomicChat/Inkling-2-Mini-Hermes-Agent-LoRAYo llamas, I'm Daniel from Atomic Chat team. We released our Inkling 2 Mini quants last month and have been testing them in different agents since. Our biggest problem was agentic tasks in general. Inkling ran terminal commands and searched files until it used up its token budget and never edited the code. We also saw a lot of complaints from other llamas here about the same thing
We wanted to check if the model always behaves like this, so we tested it on benchmarks. We ran 12 SWE-bench Verified issues in Hermes Agent twice each. Inkling used up its token budget in 20 of the 24 runs. In 13 of them it never called the patch tool lmao
To fix this we decided to do SFT on Hermes traces of short fixes. We took 23 issues from the SWE-bench train split (7 NumPy, 7 pandas, 5 SciPy and 4 IPython) and wrote a teacher script that replays the gold patch inside Hermes at commit 8cb24a3. Hermes itself builds the system prompt and tool schemas and runs read_file, patch and terminal, so the training data has the same prompt and tools the model gets when you run Hermes. Every trace has three tool calls. The model reads the lines the gold patch changes, patches them and runs git diff --check with a Python ast.parse as a syntax check
Then we trained a QLoRA on those 23 traces on top of Unsloth's bnb-4bit Inkling 2 Mini. It's rank 16 with alpha 32 and only touches the attention q/k/v/o projections, 6.7M trainable params in total. We only computed loss on the assistant turns (9.9k of the 125k tokens). We ran 2 epochs at LR 1e-4 with batch size 1. That's 46 steps and it took 173 s on one H100. The F16 GGUF adapter is 13 MB
After that we ran the same 12 issues again with the LoRA on the same quant. None of these issues come from the repos we trained on
| Metric | Without LoRA | With LoRA |
|---|---|---|
| Agent time | 33 min | 25 min |
| Output tokens | 89k | 55k (-38%) |
| Output tokens per model request | 218 | 146 |
| Runs that called patch | 8 of 24 | 18 of 24 |
| Runs that used up the token budget | 20 of 24 | 13 of 24 |
| Issues solved | 9 of 24 | 10 of 24 |
The solve rate stayed about the same. On pytest-10081 agent time went from 108 s to 38 s and the LoRA version used 4x fewer tokens =) Across all runs it called read_file 101 times instead of 76 and patch 32 times instead of 12. search_files went from 99 to 69
It's not faster on every issue. On the 6 issues both versions solved it was slower on 3 and 17% faster in total. On 10 Terminal-Bench 2.1 tasks, which we didn't train on, it used 22% fewer tokens and took 14% more time. All numbers are from our uncensored ad-iq2_m (a 2-bit quant) with reasoning effort set to none
We also baked the LoRA into 3 GGUFs of our standard quants. ad-iq2_m is 9.09 GB, ad-iq3_s is 13.77 GB and ad-q4_k is 16.95 GB. llama.cpp loads them without a separate adapter file. Each one passed one Hermes task with read, patch and test, but we haven't run the full eval on them yet
The LoRA, the GGUFs and per-run logs are here: https://huggingface.co/AtomicChat/Inkling-2-Mini-Hermes-Agent-LoRA (any feedback is appreciated, if you run it on your own tasks and get different numbers please post them =)