Checking how many agents are working

How this works
Contacto
← Blog
A small olive glowing cube with four thin lines reaching out to four small olive tools laid out on a near-black navy ground, the AMARBARO mark centred over it.
✎publicación de blog

A small model that calls our tools

The short version

A 72.6 million parameter model trained on real tool calls used a tool result in 22 of 56 held-out questions where a prompt-only control used one in 0, and 55 of 56 after ten times more text, while a harness default and a runaway loop, not the model, caused our worst scores.

What this is about

Some jobs for a model are big and open: write an essay, explain a law, plan a trip. Others are small and clear: read a question, choose the right tool, and fill in the tool's options. A calculator for a sum. A search for a fact. A page fetch for a link.

The second kind of job does not need a giant model. We trained a very small one, with 72.6 million parameters, to do exactly that. This article tells how, how we checked it, and what went wrong.

Why it matters

A model that calls tools can do things a model alone cannot. It can add numbers exactly, look up a fact in a notes folder, or read a web page. If the model that decides which tool to call is small, it is cheap to run, fast to answer and easy to test. And because the job is narrow, you can check each answer: did it pick the right tool, and were the options valid?

How it works

The four tools. Our model, Metis, can call calc for a calculator, brain_ask to search our notes, web_fetch to read a page, and run_js to run one small script that can read files but cannot write, reach the network or start other programs.

Why a prompt is not enough. You might think you could just describe the tools in the prompt. For a big model that works. For a tiny one it does not. A control model that had never seen a tool call, with the four tools described in its prompt, used a real tool result in 0 of 56 questions.

Teach by example. So we taught by example. We built training rows from real calls. Each row has a question, the tool call, the real result and an answer based on that result. We held out 10 percent of the topics, so the test asks about subjects the model never saw.

Score it. We ask 56 held-out questions, 30 for the script tool, 20 for notes and 6 for page fetch. A call counts as "used" when the final answer shares a word with the real tool result. That is a weak check, and we say so.

The results

The trained model, after 405 seconds of training on one gaming card, used a tool result in 22 of 56 questions. The control used one in 0. Look at the details: the model called the script tool on all 30 questions, but only 22 of those were valid code and only 10 answers used the result. Calling a tool and using it are different skills.

Then we gave the same model ten times more text. The tool test went to 55 of 56.

Two failures that were not what they seemed

The prompt it never trained on. Our first served prompt was wrong, and nothing told us. A setting in the template engine quietly dropped one newline. The model saw a prompt that did not match its training, and nothing crashed. We wrote a check that makes the same conversation two ways and compares the bytes. After the fix it matched on 2 of 2 rows. A copy with one extra space matched on 0 of 2, which is the point: a check you have seen fail is a check that means something.

The score of 0 of 56. Later, our own server scored 0 of 56 on the same test. The model was fine. The server saw 609 prompt tokens for a request that should have been 84. A default setting added memory notes to every turn. The test now sends a flag to turn that off. After the fix, the prompt bytes matched across three engines.

And one failure that was the model

One test prompt made the model call the same tool 223 times in one message. The loop appeared on the chat route with the call grammar turned on. It did not appear on plain completion. We tried 20 ways of cutting the loop out of the weights. None worked. We could even find the loop inside the model: a small test read it with a near-perfect score. But switching that part off did not stop the loop.

What fixed it was more reading. After a long run on 1.1 billion new tokens, the runaway count fell from 223 to 1. We cannot say which part of the data did it, so we call it a result and not a cause.

What this does not show

It does not show that Metis answers well in general. It does not talk. Its common-sense score did not move. Only one model was trained, and the weights are private. It shows a narrow thing: a very small model can learn a tool format from real examples, in minutes, if the data and the checks are good.

Words you may not know

  • Tool call: a message from the model that asks a program to do something, with options.
  • Control: a model with no new training, used as a fair comparison.
  • Held out: kept away from training so the test is fair.
  • Template: the fixed text layout that wraps a chat for a model.
  • Grammar: a rule that limits which text the model may write next.
  • Runaway loop: the model keeps repeating the same action and does not stop.

Try it

Our inference engine, which serves these models, is on the mojo-baro project page. Its code is on GitHub.

A small experiment you can do with any model: write down five tasks and decide which tool should handle each. Then check, by hand, how often a model picks the right one. That is your first tool test. Share what you find at gllm.forum.

A 73M Model That Calls Our Tools has the first scores with every miss. 223 Calls in One Message is the full account of the runaway loop.

Comentarios

Aún no hay comentarios.

Iniciar sesión para comentar.