A LoRA adapter for Qwen/Qwen3.5-9B, trained with on-policy RL (GRPO) inside the Hermes Agent harness: the model solved tasks as a Hermes agent (running code in a sandbox, reading results, answering), and was rewarded only for getting the final answer right.
Measured in the same harness against the untouched base model on the same tasks:
| Qwen3.5-9B (base) | + this adapter | |
|---|---|---|
| Data analysis, 150 held-out tasks × 3, pass@1 | 79.1% | 85.8% (+6.7 ± 4.3) |
| Data analysis, pass@3 | 88.0% | 90.7% |
| Data analysis, tool calls per attempt | 7.73 | 6.37 (−18%) |
| Data analysis, early-stop failures (≤2 calls, wrong) | 0 | 0 |
| Terminal-Bench Lite Verified, 94 tasks × 3, pass@1 | 28.0% | 33.7% (+5.7 ± 5.9, not significant) |
| Terminal-Bench Lite Verified, pass@3 | 52.1% | 52.1% |
| Terminal-Bench Lite Verified, tool calls per attempt | 21.2 | 18.8 |
± is the 95% interval of the paired per-task difference. Terminal-Bench was not used in training; it is there to check that general agent ability did not regress.
Hermes Agent (or a similar tool-calling harness) driving Qwen3.5-9B on data-analysis work: load files, inspect them, compute with Python, answer with a single value. It solves more of these tasks and gets there with fewer tool calls, without learning to quit early.
vllm serve Qwen/Qwen3.5-9B \
--language-model-only \
--enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser qwen3 \
--enable-lora --max-lora-rank 32 \
--lora-modules hermes-grpo=rlaope/Qwen3.5-9B-hermes-grpo-lora \
--override-generation-config '{"temperature": 0.6, "top_p": 0.95, "top_k": 20}'
Then point Hermes Agent at it as a custom OpenAI-compatible provider (base_url: http://<host>:8000/v1, model hermes-grpo). These are the sampling settings used for every number above.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "rlaope/Qwen3.5-9B-hermes-grpo-lora")
tok = AutoTokenizer.from_pretrained("rlaope/Qwen3.5-9B-hermes-grpo-lora")
HarnessAsyncGRPOTrainer, rollouts served by vLLM with live LoRA hot-swap, OpenEnv 0.7.0 Harbor server. Hermes itself is unmodified. A capture proxy between Hermes and vLLM records the exact sampled token IDs and log-probs, so the trainer learns from what the model actually generated, not from re-tokenized text.hermes agent, Hermes main, same container images for base and adapter.sympy-bug-fix excluded for both models because its own build script fails), max 60 turns, original per-task time limits, 3 attempts each.Qwen/Qwen3.5-9B