Metka 0.6B
A small model that writes short labels for an AI coding agent's tool calls: the line a terminal UI shows in place of the raw command.
$ objdump -d game.exe --start-address=0x4a1f30 | head -60
-> Disassemble game.exe starting at 0x4a1f30 (while it runs)
-> Disassembled game.exe starting at 0x4a1f30 (when it finishes)
-> Failed to disassemble game.exe ... (when it fails)
It is meant to run next to a large agent model, on whatever is left over: a CPU, a laptop, or a little spare VRAM. It labels in the agent's terminal as the calls happen.
This repository has the model as a Q8_0 GGUF for llama.cpp (640 MB). It is the light one, for laptops and older CPUs; metka-1.7b-gguf labels better where there is room for it. It comes with a pi extension and a Claude Code plugin that show its labels in place of the tool calls.
Speed
| Hardware | Time to a label |
|---|---|
| RTX 4080 SUPER | 34 ms |
| RTX 3070 | 51 ms |
| Ryzen 9 3900X, CPU only | 0.44 s |
| ThinkPad X1 laptop (i7-1185G7, on battery), CPU only | 0.70 s |
| Core i7-2700K (2011), CPU only, no AVX2 | 1.8 s |
Median time per label over 40 commands from a real agent session (about 100 prompt tokens each), one at a time, no prompt cache. Short commands are faster; long ones (a heredoc writing a file) take a few seconds on a CPU.
Prompt
The model was trained on one plain-text format, without a chat template:
<tool>bash</tool>
<args>{"command": "ls -la /etc"}</args>
<state>running</state>
<label>
It answers with the label and </label>. Arguments are JSON as Python's json.dumps writes it (", " and ": "), cut to 3,000 characters. For the past tense, give it the state (finished or failed) and the label it wrote for the running state:
<tool>bash</tool>
<args>{"command": "ls -la /etc"}</args>
<running>List all files in /etc</running>
<state>finished</state>
<label>
Context (optional)
If the agent's own words before the call are available, put them before the state, at most the last 400 characters:
<context>the agent's reasoning and text right before this call</context>
The model then labels what the call is for, not just what it does. This helps most where a command doesn't explain itself (disassembly at an address, hex dumps, offset scans) and is about neutral elsewhere. Reasoning matters more than the visible text: hosted models that hide their reasoning gain little from it, and the model works just as well with no context at all.
Use it in pi
pi-tool-labels-metka shows these labels in pi's tool rows. After pi install git:github.com/mahounairo/pi-tool-labels-metka, run /labels in pi: it can point at a server you already run (llama-server, or anything with the OpenAI completions API), or download llama.cpp and this model and run them for you.
To run the server yourself:
llama-server -m metka-0.6b-Q8_0.gguf -c 4096 --parallel 2 --port 11500
Use it in Claude Code
claude-tool-labels-metka writes these labels over the Bash commands in Claude Code, streaming in as the command starts. Install it with /plugin install metka --marketplace mahounairo/claude-tool-labels-metka, then run /metka: it can point at a server you already run, or download llama.cpp and this model and run them for you.
Training
A rank-8 LoRA (alpha 16, all linear layers) on Qwen3-0.6B, merged and quantized to Q8_0. Trained in stages on one RTX 3090; all runs for both sizes took under eight GPU hours:
- 14,043 examples, 2 epochs: tool calls from coding-agent sessions run in a sandbox and from an agent playing a game benchmark. (The OpenHands trajectories the 1.7B learned from made this size worse, so it never saw them.)
- 1 more epoch over 24,750 examples, adding 3,569 calls built from the tldr-pages command examples, for breadth over unfamiliar tools.
- 1 more epoch (32 minutes) with the agent's words before each call as optional context (with reasoning and text, text only, or none, at random), so the same model works with or without it.
The labels it learned from were written by Qwen3.8-27B and Qwen4-Max, from the call alone, so a label never claims what only the context could know. No labels from any other model were used.
Evaluation
Two real agent sessions the model never saw, every label graded blind by an independent judge (Claude Opus 5.5) as good, weak or wrong:
| Session | Good | Weak | Wrong |
|---|---|---|---|
| Reverse engineering and modding a game (110 calls), without context | 72% | 23% | 5% |
| same, with the agent's reasoning and text | 86% | 12% | 2% |
| Building a web viewer (551 calls), without context | 68% | 28% | 4% |
The past-tense and failure forms were right in nearly every case. Context helps this size the most where commands don't explain themselves: on the reverse-engineering session it closes most of the gap to the 1.7B (86% good against the 1.7B's 91%). Where it's weaker than the 1.7B is in being specific: more of its labels are right but vague.
Limitations
- Tested/trained on English labels only.
- It can invent a purpose that the command doesn't show ("around the new function" for a bare disassembly). The pi extension and the Claude Code plugin hide labels the model is unsure of (lowest token probability under 0.15) and show the command instead; that catches many of these.
- Long compound commands get a label for their main part.
- It was trained on Linux shell and coding-agent tools; other domains will be weaker.
Licenses and credits
- Base model: Qwen3-0.6B, Apache 2.0. This model is Apache 2.0 too.
- tldr-pages, CC BY 4.0: the command examples behind part of the training calls.
- Labels by Qwen3.8-27B and Qwen4-Max.