Instructions to use harness-hub/Inkling-2-Mini-hermes-adapted with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use harness-hub/Inkling-2-Mini-hermes-adapted with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("thinkingmachines/Inkling-2-Mini") model = PeftModel.from_pretrained(base_model, "harness-hub/Inkling-2-Mini-hermes-adapted") - HERMES
How to use harness-hub/Inkling-2-Mini-hermes-adapted with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
A LoRA adapter for thinkingmachines/Inkling-2-Mini, trained
with reinforcement learning in TRL to work as the model behind the
Hermes Agent, at the default reasoning effort (high).
More SWE-bench Pro tasks solved, with far fewer tokens. Under Hermes, this adapter solves 84.0% of SWE-bench Pro (hard 51) tasks in at least one of 3 attempts, against 72.0% for the base model (+12.0 points), while using 37% fewer output tokens and a quarter fewer tool calls on the tasks both solve. On Terminal-Bench 2.1, accuracy is the same as the base model's; the gain there is efficiency.
- SWE-bench Pro (hard 51), 2 h per task: 72.0% β 84.0% pass@3 (+12.0 Β± 10.7 points); avg@3 59.5% β 64.1%.
- Terminal-Bench 2.1, 1 h per task: 69.8% β 73.3% pass@3 (+3.5 Β± 7.6, not significant); avg@3 60.9% β 60.9%.
- Less work per solved task: 22% (Terminal-Bench 2.1) and 25% (SWE-bench Pro) fewer tool calls, 40% and 37% fewer output tokens.
- Faster to a solution: on the SWE-bench Pro tasks both solve, time to solve drops from 42 to 31 minutes on average (β27%); on Terminal-Bench 2.1, from 19 to 16 minutes (β18%).
All results are under Hermes Agent v0.22.6, reasoning effort
high, temperature 1.0, a 131k-token context, up to 32k output tokens per turn and a 100-step limit, in HF Sandboxes. Base model and adapter run under the same settings, at the same time, and are paired per task. Compare base and adapter only within this card.
Pick your setup
Results
| Benchmark | Budget | Inkling-2-Mini | Inkling-2-Mini-hermes-adapted | Difference (points) |
|---|---|---|---|---|
| SWE-bench Pro (hard 51), pass@3 | 2 h | 72.0% | 84.0% | +12.0 Β± 10.7 |
| SWE-bench Pro (hard 51), avg@3 | 2 h | 59.5% | 64.1% | +4.6 Β± 8.4 |
| Terminal-Bench 2.1, pass@3 | 1 h | 69.8% | 73.3% | +3.5 Β± 7.6 |
| Terminal-Bench 2.1, avg@3 | 1 h | 60.9% | 60.9% | +0.0 Β± 6.2 |
Β± is the 95% interval of the paired difference over tasks. Only the SWE-bench Pro pass@3 gain is significant. pass@3 counts a task as solved if any of its 3 attempts solves it; avg@3 is the mean pass rate over the 3 attempts. Both are computed on the tasks graded for both models (pass@3: all 3 attempts graded on both sides).
Where the SWE-bench Pro gain comes from
- New tasks. By pass@3, 7 tasks are solved only by the adapter and 1 only by the base model.
- By repository. The largest gain is on flipt (pass@3 43% β 86%, 7 tasks); vuls, ansible and tutanota gain one task each. The repositories the base model already solves every time stay at 100%.
- Terminal-Bench 2.1 by difficulty. pass@3 is 100% on easy tasks for both (4 tasks), 85% β 89% on medium (53) and 38% β 41% on hard (29); 7 tasks are solved only by the adapter and 4 only by the base model.
Work per solved task
Means per task over the tasks both models solve in every graded attempt: same tasks, same outcome, so the numbers measure only how much work each needed. Intervals are 95% bootstrap intervals over tasks.
| Tasks | Tool calls | Output tokens | Minutes | |
|---|---|---|---|---|
| Terminal-Bench 2.1 | 34 | 25.5 β 19.9 (β22%, [β30, β13]) | 13.7k β 8.2k (β40%, [β48, β31]) | 18.9 β 15.5 (β18%, [β29, β6]) |
| SWE-bench Pro (hard 51) | 18 | 59.6 β 44.8 (β25%, [β35, β14]) | 35.8k β 22.7k (β37%, [β45, β28]) | 42.1 β 30.9 (β27%, [β38, β15]) |
How the behavior changes, from the agent's own logs (SWE-bench Pro, 29 tasks both solve): 27% fewer turns, 54% fewer reasoning tokens, the first edit at turn 23 instead of 34, and tests re-run after the last edit in 93% of solved attempts instead of 81%.
Evaluation setup
- Harness. Hermes Agent v0.22.6 (OpenAI-compatible chat completions), reasoning effort
high, temperature 1.0, 131k-token context, up to 32k output tokens per turn, 100 agent steps per attempt. - Serving. vLLM nightly
b976fff86af82c559b19aa676f52ea193eb0c188, the adapter loaded as a runtime LoRA. - Sandboxes. HF Sandboxes, for the base model and the adapter alike.
- Benchmarks.
- Terminal-Bench 2.1: all 89 tasks, 3 attempts each, 1 h per task. Two tasks fail their image's package install on every attempt and are never graded.
- SWE-bench Pro (hard 51): the 51 hardest tasks of SWE-bench Pro, 3 attempts each, 2 h per task.
- Ungraded attempts. Attempts whose model stream dropped were rerun up to 3 times; those still ungraded are left out, for both models (see the definitions under the results table).
- Internet access. Hermes keeps its web tools, and the evaluations ran without a host deny list. On Terminal-Bench 2.1, 4 of the adapter's solved attempts (and 1 of the base model's) came after the agent fetched task material online (a task's reference solution, its test file, a public transcript, a task README). The base model does the same at a similar rate, and training did not reward it (lookups were blocked during training); it does not affect SWE-bench Pro. Counting those attempts as failures, Terminal-Bench 2.1 pass@3 is 69.8% for both models: the Terminal-Bench 2.1 pass@3 gain above is not robust to this, and the gain there should be read as efficiency only.
Contamination check
No training task shares a name or a repository with Terminal-Bench 2.1 or SWE-bench Pro hard 51. The training set was not built with an explicit step that excludes evaluation tasks: we checked it was clean after the fact.
Known behavior
- On
break-filter-js-from-html(Terminal-Bench 2.1: bypass an XSS filter), the adapter often declines the task as a possible security exploit or asks the user how to proceed, where the base model works on it.
Use with Hermes
Serve the adapter with vLLM and point Hermes at it
1. Serve the adapter with vLLM
Inkling 2 Mini needs a vLLM nightly; we used commit b976fff86af82c559b19aa676f52ea193eb0c188. The adapter under
vLLM's module names is in vllm/:
hf download harness-hub/Inkling-2-Mini-hermes-adapted --include "vllm/*" --local-dir inkling-hermes
vllm serve thinkingmachines/Inkling-2-Mini \
--enable-lora --max-lora-rank 32 --lora-modules inkling-hermes=./inkling-hermes/vllm \
--enable-auto-tool-choice --tool-call-parser inkling --reasoning-parser inkling \
--max-model-len 131072
This is the configuration of the evaluations. The chat template's default reasoning effort is high, which is what
this adapter was trained and evaluated with, so no template argument is needed.
2. Point Hermes at it
Install Hermes Agent v0.22.6, the version of the evaluations:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/v0.22.6/scripts/install.sh | bash
Point it at the server through its OpenAI-compatible provider:
export OPENAI_BASE_URL=http://localhost:8000/v1
export OPENAI_API_KEY=dummy
hermes chat --model openai/inkling-hermes -q "Find out why the tests in tests/test_parser.py fail and fix the bug."
The evaluations allowed up to 32k output tokens per turn. With long reasoning, a turn can take minutes: if Hermes cuts
streams short, raise HERMES_STREAM_READ_TIMEOUT and HERMES_STREAM_STALE_TIMEOUT (the evaluations used 1800 s).
Use with Hermes (llama.cpp)
Serve the GGUF with llama.cpp and point Hermes at it
The GGUF version is in
harness-hub/Inkling-2-Mini-hermes-adapted-GGUF:
the adapter merged into the base model as one Q8_0 file, and the adapter alone as an F16 LoRA.
llama serve -hf harness-hub/Inkling-2-Mini-hermes-adapted-GGUF:Q8_0 -c 131072 --alias inkling-hermes
Or the adapter on top of a GGUF of the base model:
hf download ggml-org/Inkling-2-Mini-GGUF Inkling-2-Mini-Q8_0.gguf --local-dir .
hf download harness-hub/Inkling-2-Mini-hermes-adapted-GGUF Inkling-2-Mini-hermes-adapted-lora-F16.gguf --local-dir .
llama serve -m Inkling-2-Mini-Q8_0.gguf --lora Inkling-2-Mini-hermes-adapted-lora-F16.gguf \
-c 131072 --alias inkling-hermes
Then point Hermes at http://localhost:8080/v1 as above, with the model openai/inkling-hermes.
The adapter was trained on the base model's own weights: the closer the base GGUF is to them, the closer you get to the
trained behavior. Q8_0 is a good default; lower-bit quants drift further. The GGUF version has not been re-evaluated.
Merge the adapter into the base model
Get a standalone model, with no LoRA at serving time
import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoTokenizer
base = AutoModelForImageTextToText.from_pretrained("thinkingmachines/Inkling-2-Mini", dtype=torch.bfloat16, device_map="cpu")
model = PeftModel.from_pretrained(base, "harness-hub/Inkling-2-Mini-hermes-adapted").merge_and_unload()
model.save_pretrained("Inkling-2-Mini-hermes-merged")
AutoTokenizer.from_pretrained("thinkingmachines/Inkling-2-Mini").save_pretrained("Inkling-2-Mini-hermes-merged")
The adapter at the repository root uses PEFT's module names; the copy in vllm/ is for vLLM. Then serve the merged
model like the base model, without the LoRA flags:
vllm serve Inkling-2-Mini-hermes-merged --served-model-name inkling-hermes \
--enable-auto-tool-choice --tool-call-parser inkling --reasoning-parser inkling \
--max-model-len 131072
Training
Method, data, hyperparameters and hardware
| Method | AsyncGRPO (TRL), LoRA |
| Environment | Harbor tasks, rollouts in HF Sandboxes |
| Harness | Hermes Agent v0.22.6, reasoning effort high (the template default) |
| Tasks | From UltraTerminal: agentic coding tasks (SWE-smith Python and Go, Tasksmith) and cybersecurity tasks (Cedar and OpenFGA authorization) |
| Reward | The task's verifier result (0 or 1). Solved rollouts also get a tool-efficiency bonus, 0.1 Γ clip(1 β tool calls / 15, 0, 1) |
| Guardrails | safeagents checks on every tool call during training: web fetches to hosts that appear nowhere in the task are blocked |
| Steps | 180 (this checkpoint) |
| Learning rate | 2e-5 |
| LoRA | r = 32, alpha = 64, dropout 0, on the language model's attention projections (q, k, v, o) |
| Rollouts | 8 per task, temperature 1.0 |
| Batch | gradient accumulation 16 |
| Hardware | 4Γ NVIDIA B300: vLLM on 2, the trainer on 2; about 7 minutes per step |
The model learns to do less during training. On solved rollouts, from the first 10 steps to the 10 steps before step 180, tool calls drop from 13.5 to 8.2 (β40%) and output tokens from 11.4k to 6.6k (β42%), while the share of solved rollouts stays at about 0.62:
The training scripts are in the TRL recipe (files).
Evaluation trajectories
Every evaluation attempt behind this card, solved or not, is in the
harness-hub/harness-adapters-trajectories
bucket, under inkling-2-mini/<benchmark>/hermes/: base model and adapter, on Terminal-Bench 2.1 and SWE-bench Pro, 3
attempts each, with each attempt's grade, Hermes session, harness log and verifier output, scrubbed of secrets. The
files carry canary strings: keep them out of training data.
Links
- Base model: thinkingmachines/Inkling-2-Mini (Thinking Machines Lab, Apache 2.0)
- The same recipe under pi: harness-hub/Inkling-2-Mini-pi-adapted
- Trainer: TRL AsyncGRPO
- Harness: Hermes Agent
- Downloads last month
- -
Model tree for harness-hub/Inkling-2-Mini-hermes-adapted
Base model
thinkingmachines/Inkling-2-Mini



