Hermes Agent adapter for Inkling-2-Mini: patching a LoRA into a model my runtime can't load A developer patched the harness-hub LoRA adapter for Inkling-2-Mini directly into the model's GGUF weights after finding that Basalt 0.6.2 and Maya v1.1.91 cannot load adapters at runtime. Naively dequantizing the Q8_0 attention projections, adding the rank-32 correction and requantizing discarded most of the adapter, because the delta's norm is only 0.16–0.23% of the weight norm and falls below one quantization step. The developer reports the workaround let Hermes Agent run real coding tasks with and without the adapter, which harness-hub says cuts steps and output length. I use Hermes Agent https://github.com/NousResearch/hermes-agent every day. It's an open-source AI agent from Nous Research: you give it a task, and it works on it by itself with tools like a terminal, file editing and web search. Hermes can run on a cloud model, but it can also hand work to a model on your own machine. Mine sends most of its coding tasks to Inkling-2-Mini, which runs locally on an RTX 5090 with Basalt https://github.com/jesdga95/basalt . This week harness-hub published an adapter https://huggingface.co/harness-hub/Inkling-2-Mini-hermes-adapted for exactly that combination: Inkling-2-Mini as the model behind Hermes Agent. An adapter a LoRA is a small add-on of about 50 MB that adjusts a model's behavior without retraining the whole model. This one was trained by letting Inkling do real tasks inside Hermes and rewarding it when it solved them well. According to harness-hub, the result solves more coding tasks with fewer steps and less text. There was one problem. Basalt can't load an adapter there's an open feature request for it , and neither can Maya, the other runtime I use for this model. So I put the adapter into the model file itself. The obvious way to do that threw most of the adapter away. This article shows why, what worked instead, and what changed when I let Hermes do real tasks with and without the adapter. Versions used: Basalt 0.6.2, Maya v1.1.91, Hermes Agent v0.23.1, Python gguf 0.19, one RTX 5090 32 GB . Every agent talks to its model in its own way. Hermes has its own system prompt, its own set of tools, and its own format for tool calls and results. A general model handles that fine, but not always efficiently: it reads a file it already read, runs an extra check, or writes a long explanation nobody asked for. Each of those steps costs time and tokens. That's what this adapter targets. It doesn't teach Inkling new knowledge. It teaches it to work the way Hermes expects, so it gets to the answer in fewer steps. harness-hub makes separate adapters per agent they also have versions for Codex, OpenCode, Claude Code and pi , because what works in one agent doesn't automatically carry over to another. For my setup that's a good fit. When Hermes gets a coding job, it hands it to a sub-agent that runs on the local Inkling. That sub-agent is Hermes too, so every one of those tasks runs exactly in the setting the adapter was trained for. The first thing to check is which weights a LoRA changes. adapter config.json and the tensor names in the LoRA GGUF tell you: adapter.type lora adapter.lora.alpha 64.0 blk.0.attn k.weight.lora a 2304, 32 F16 blk.0.attn k.weight.lora b 32, 1024 F16 blk.0.attn output.weight.lora a 3072, 32 F16 ... Rank 32, alpha 64, and only four targets per layer: the attention projections attn q , attn k , attn v and attn output , over all 24 layers. That's 96 tensors. The experts aren't in it. That matters, because in both of my model files the routed experts are mostly NVFP4, taken bit for bit from the official release. Changing them would mean quantizing them again. The attention projections are plain Q8 0, about 480 MB in total. That part I can change. A LoRA is a small correction on top of existing weights: for each target it stores two thin matrices, and their product times alpha / r = 2 is added to the original weight. The straightforward way to bake it in: unpack the Q8 0 weight, add the correction, pack it to Q8 0 again. w = quants.dequantize raw, Q8 0 .reshape d.shape merged = quants.quantize w + d, Q8 0 It runs fine and the model loads. But the correction is tiny. Its norm is 0.16 to 0.23% of the weight's norm. Q8 0 stores blocks of 32 values as 8-bit integers with one scale per block, and for most values the delta is smaller than one quantization step. Rounding again snaps them back to where they were. harness-hub also publishes a merged Q8 0 GGUF https://huggingface.co/harness-hub/Inkling-2-Mini-hermes-adapted-GGUF , made from the BF16 base plus the LoRA. That gave me something to compare against. For blk.0.attn q.weight : In plain terms: in my version, most of the adapter was rounded away, and what changed was mostly noise. Merging at BF16 and quantizing once keeps far more of it. If the maker's merged file stores the same tensors in the same type and shape as my pack, I don't need to merge anything. I can copy their 96 Q8 0 tensors byte for byte into my file and keep everything else: the NVFP4 experts, the drafter, the vision encoder, the tokenizer. Their merged GGUF is 27.8 GB, mostly experts I don't want. Downloading only the parts I need works with HTTP range requests: truncate -s . gguf.GGUFReader to get each tensor's offset and size. That's about 480 MB instead of 27.8 GB. Then the copy. cp --reflink=auto makes a copy-on-write clone of my pack, and the script writes the new bytes in place. The sizes are identical, so nothing shifts. On btrfs the new 19 GB pack takes 459 MB of extra disk space. For Maya's GGUF that's all. A .basalt pack needs two more steps: meta section, relative to the start of the gguf section. recompute the gguf section's SHA-256 in the .basalt header with open dst, "r+b" as f: head = bytearray f.read MF.HEADER BYTES n = MF.HEADER.unpack from head, 0 2 for i in range n : o = MF.HEADER.size + i MF.ENTRY.size name, off, size, , rest = MF.ENTRY.unpack from head, o if name.rstrip b"\0" == b"gguf": MF.ENTRY.pack into head, o, name, off, size, digest, rest f.seek 0 f.write head MF is tools/model file.py from the Basalt release, which also has ModelFile.verify . After patching, the gguf , meta and experts sections all verified. I wanted two things from the test: the speed shouldn't drop, and Hermes should actually work better with it on my own tasks, not just on someone else's benchmark. On Basalt I ran the arms alternately base, adapter, adapter, base to even out warm-up and thermals. Every arm ran the same set: The agent tasks are small but real: a bug spread over two files in a pagination module, a function to implement from a docstring with hidden tests, a script that crashes on a config value, a rename across a package, finding a setting in 40 files, a CSV aggregation, and a log analysis. Each has a check script the agent never sees. I verified every check twice before using it: it must fail on the untouched task and pass on a reference solution. One of my own expected values was wrong the first time I'd rounded 30.855 the wrong way , so that step is worth it. The numbers per run come from the agent's own session database: tool calls, output tokens and duration. On Basalt: | | Base | With adapter | |---|---|---| | Decode, prose / code | 252-253 / 527-529 tok/s | 255-257 / 537 tok/s | | Prefill at 8K | 22,700-22,900 tok/s | 22,700 tok/s | | Use-case benchmark | 54/54, 9,001 and 11,828 tokens | 54/54, 6,968 and 7,680 tokens | | Agent tasks passed | 31/32 | 32/32 | | Tool calls | 115 | 94 -18% | | Output tokens | 26,081 | 19,215 -26% | | Total time | 162 s | 142 s -12% | Speed is the same, which makes sense: only the attention weights changed, not their size or type. The difference is in behavior. With the adapter, Hermes reached the same results with fewer tool calls and less text, which is exactly what the adapter was trained for. That matches what harness-hub reports, fewer output tokens and fewer tool calls at an equal or higher pass rate, although their benchmarks are much harder than mine. On Maya there was no gain. Both versions passed all 16 agent runs with about the same number of tokens, and code decoding with the adapter was 13% slower. My guess is the speculative drafter, which was trained against the original attention weights and now predicts a little worse. I didn't dig into it, because the Basalt result was clear. The adapter pack is now the default for Inkling on my machine, so every coding task Hermes hands to the local model uses it. The original pack stays next to it for rollback. The short version: when a LoRA is much smaller than one quantization step, don't merge it into quantized weights. Merge it at full precision once, or find someone who already did, and copy only the tensors that changed.