Danilo Poccia

Notes Along the Way

Ink portrait of Danilo Poccia

Writing

Teaching Inkling 2 Mini to think less in Pi

A small adapter, trained with reinforcement learning for the Pi coding agent, made Inkling 2 Mini reason less and finish the largest task in about half the time on my MacBook Pro. It also handled a tool name it had never seen far better, for 3 GB more memory.

Listen

Listen to this article24:04 listen at 1×
More listening optionsDownload audio (MP3)
Narration transcript

Teaching Inkling 2 Mini to think less in Pi

A small adapter, trained with reinforcement learning for the Pi coding agent, made Inkling 2 Mini reason less and finish the largest task in about half the time on my MacBook Pro. It also handled a tool name it had never seen far better, for 3 GB more memory.

A week ago I switched my local coding to Inkling 2 Mini, the open-weight model from Thinking Machines. It runs on my MacBook Pro through MTPLX, a Mac app that serves local models, and drives the Pi coding agent, an open source agent that works in the terminal. On 30 November an adapter appeared on Hugging Face that targets exactly that pairing. Inkling-2-Mini-pi-adapted, published under the harness-hub account, is a small set of weights trained with reinforcement learning to make Inkling a better model behind Pi.

Its model card makes a specific claim. On Terminal-Bench 2.1, a benchmark of real command-line tasks, the adapter solves about as many tasks as the base model when time is generous. On the tasks both solve, it needs about a fifth fewer tool calls and more than a third fewer output tokens. SWE-bench Pro shows a third fewer tool calls. Under a one-hour limit per task, finishing sooner turns into more solved tasks, from about 44% to 57% on average. The authors measured all of this on data-centre GPUs. I wanted to know how much of it survives on a laptop, in the runtime I already use.

In 36 agent runs and two smaller tests, Inkling solved the same tasks with or without the adapter. With it, the model wrote far less reasoning before acting, and on the largest task its median time fell by half. It also fixed most of the tool-call errors I found last week. The costs are 3 GB more memory and a merge that I had to do myself.

What the adapter is

The adapter is a 53 MB patch for a model of about 20 GB, much like a diff applied to the weights. Technically it is a LoRA, short for low-rank adaptation, a method published by Microsoft researchers in 2021. Training leaves the original weights frozen. For each matrix it adapts, it learns two thin matrices instead, one tall and one wide, and adds their product to the original. That product has the full size of the matrix, but it can move it in only a few independent directions, 32 for this adapter, while each attention matrix is more than a thousand values on each side. The bet behind LoRA is that teaching a model a new job needs only a few such directions. A scaling factor, two for this adapter, sets how strongly the update is applied.

This adapter touches only the attention projections of the language model, four per layer across 24 layers. The experts, which hold most of Inkling’s parameters, are untouched, and so are the vision encoder and the draft head. Because the base stays frozen, one copy of the model can serve several adapters. vLLM can apply them at run time and choose one per request. The card says that serving this adapter that way costs about a fifth of the speed. Merging the update into the weights, as I did below, avoids that cost, at the price of one merged pack per adapter.

According to the card, the adapter was trained with the asynchronous GRPO trainer in Hugging Face’s TRL library for 100 steps on four NVIDIA B300 GPUs. The tasks were about 500 coding problems, mostly in Python and Go, plus about 900 cybersecurity tasks on Cedar and OpenFGA authorisation, each solved inside Pi at high reasoning effort. The reward is mostly the task’s own verifier, pass or fail. Solved attempts also earn a small bonus for using fewer tool calls and pay a small penalty for generating more tokens. The model was paid to finish the job with less work, so I expected to see fewer tool calls and shorter output.

The base model, the adapter and the MTPLX packs are all published under the Apache 2.0 licence. Pi is MIT-licensed. The adapter’s card links its training recipe, its evaluation trajectories and the TRL scripts, which is more than most fine-tunes publish. The harness-hub account is an organisation run by Hugging Face staff. The same account has published adapters for other coding agents too. Qwen3.8 27B has adapters for Pi, OpenCode and Hermes Agent, plus one that merges all three. For Inkling 2 Mini, there are adapters only for Pi so far.

The authors also published an earlier preview adapter trained with reasoning switched off. Several of the derived builds on Hugging Face, including the only ready-made MTPLX pack I found, start from that preview. I used the final adapter, because Pi runs Inkling at high effort by default.

Getting it into MTPLX

As far as I can tell from its options, MTPLX does not apply a LoRA to the main model at run time. It serves complete model folders, which it calls packs, so the adapter has to be merged into the weights first.

The pack my MTPLX app normally runs does not allow a clean merge. Youssofal’s Optimized Speed build of Inkling compresses the attention matrices to 8 bits. Adding a LoRA to 8-bit weights means unpacking them, adding the update and compressing again, which mixes the adapter’s change with a fresh rounding error. The Optimized Quality build from the same author is, in its own words, the official release with its weights unchanged. Its attention matrices are in BF16, the 16-bit format the official weights ship in. That makes it the closest match to the weights the adapter was trained on. In BF16 the merge is a plain addition. Each matrix W becomes W + 2·B·A, computed in 32-bit floating point and rounded once back to BF16.

The diagram shows the merge. The Optimized Quality pack, with 16-bit attention and 4-bit experts, is cloned with copy-on-write. The Pi adapter supplies two small matrices for each attention projection, and twice their product is added to each of the 96 attention matrices of the clone. The result is a merged pack of the same size, with the same draft head.

A developer who publishes as metaxito had already written a script for this merge under the Apache 2.0 licence, for the preview adapter. It reads the rank and alpha from the adapter’s own configuration. The final adapter targets the same 96 matrices with the same names and the same rank, so the script ran unchanged. It clones the pack with the file system’s copy-on-write, opens the clone’s weights file in place and rewrites only the bytes of the 96 attention matrices. On my Mac it took 18 seconds.

The procedure has three steps. First download the pack, then the two adapter files from the root of the adapter’s repository, which use the names the script expects. Then run the script with a Python that has MLX and the safetensors library. MTPLX’s own runtime has both. I used the pack at revision 1ee9bded, the adapter at 4e775038 and the script at 9848c431.

Serving it and pointing Pi at it

MTPLX accepted the merged folder as a verified pack, because the clone carries the base pack’s runtime metadata. I did not re-stamp it. MTPLX serves one model per server, so switching between packs means restarting the server with another folder. I served each model with the same command line, one at a time, on a separate port so that my everyday setup stayed untouched.

Pi needs one entry per model in its models.json. The card insists on the API setting openai completions, because the adapter was trained and evaluated with Pi’s Chat Completions client. Pi’s Responses client was never part of its training.

Pi then runs against it with a pi command that selects the adapted model, with thinking set to high. MTPLX reports the reasoning effort it applied to each request, and a spot check confirmed that Pi’s setting reached the server.

The diagram shows the test setup on the MacBook Pro. The Pi coding agent, thinking at high effort, reads, edits and runs tests in a fresh task folder. It sends chat requests and tool calls to the MTPLX server, which loads one of the three Inkling packs, between 17 and 20 gigabytes, when it starts.

Three builds and how I tested them

I compared three builds of Inkling 2 Mini. The comparison that isolates the adapter is between the second and the third, which differ only in the merged attention weights. The first is the Speed pack, as a reference point. In the result tables I shorten the third build to Quality + adapter.

The table compares the three builds. All three keep the official 4-bit experts and the official draft head. The Speed pack stores attention and the output head in 8 bits and downloads as 17.2 gigabytes. The Quality pack keeps the official 16-bit attention and output head and downloads as 20.2 gigabytes. The third build is the Quality pack with the adapter merged into its attention weights, built locally in 18 seconds.

The table lists the test settings. Everything ran on a MacBook Pro with an M5 Pro chip and 48 gigabytes of memory, with my usual apps open, on MTPLX 2.13.3 with multi-token prediction at depth three, one model at a time. Sampling used temperature one, with no top-p or top-k cut-off. Pi 1.7.0 ran at high reasoning effort with my own instructions file and two MTPLX extensions, the same for every build. The coding test was three tasks, four runs each, for each of the three builds, 36 runs in all, with a 15-minute limit and the order of the builds reversed in the second round. The speed test used a short question and an 11,000-token log, and the tool-call test sent 40 identical requests to each build.

Raw speed

I repeated last week’s speed test: a short question and a service log of about 11,000 tokens, with 700 tokens of answer each time. Each bar in the chart is the median of six to nine runs. On a newer MTPLX release, the Speed pack wrote a little faster than last week.

The chart shows median writing speed. On the short question, the Speed pack writes 49 tokens a second, the Quality pack 38 and the Quality pack with the adapter 41. On the long log, the figures are 72, 61 and 58.

The table adds the spread of the runs and the tokens produced per pass. On the short question, all three builds produce about two tokens per pass. On the long log, the two packs without the adapter produce about 3.3 and the adapted pack about 3.1, with overlapping ranges.

The merge did not change the Quality pack’s speed in any way I could measure. The two Quality builds differ by about three tokens per second, in opposite directions on the two prompts, with overlapping ranges. Their reading speeds on the long log, well over 1,000 tokens per second, overlapped too. Speed depends mostly on how many bytes the Mac reads for each token. The merge changed values without changing a single byte of layout.

MTPLX’s draft head guesses a few tokens ahead and the full model checks the guesses in one pass. Tokens per pass counts how many tokens each pass produced. The draft head was trained on the original model and nobody retrained it for the adapter. With the adapter it produced about as many tokens per pass as without it, within the spread of the runs. The card reports a similar result for a different drafter on vLLM, which kept nearly all of its acceptance.

The Speed pack stayed the fastest. Its attention matrices and output head are stored in 8 bits, half the size of the BF16 ones. MTPLX reads all of them for every token.

A coding agent with the adapter

I gave Pi the same three tasks as last week, each in a fresh folder, now at high reasoning effort, the setting the adapter was trained for.

Create: a small CSV statistics tool with a strict output format, plus its own unit tests. Five hidden tests check the result.

Fix: three planted bugs in an orders module, with failing tests that the model must not edit. A hidden test also checks a rule stated in a docstring.

Review: a user store of about 30 lines with five planted problems, including an authentication bypass and SQL injection.

Every create run passed the five hidden tests. Every fix run made the visible tests pass without editing them. Every review found all five planted problems and ranked the authentication bypass and the SQL injection first and second. On those criteria all three builds scored 12 out of 12. A week earlier, Inkling and Bonsai had passed all three tasks on the same criteria. These tasks are too easy to show a difference in capability in either direction.

The hidden docstring check is the exception. According to the docstring, a discount outside 0–100 is invalid. One run of the Speed pack and one of the Quality pack added that check. The adapter missed it in all four runs. With four runs per build this may be chance. It is also what a reward for doing less could produce, so it is the result I would watch first in a larger test.

The chart shows the median time Pi took on each task, with a line from the fastest to the slowest run. Creating the tool took the Speed pack about two minutes, the Quality pack about two and a half and the adapted pack just over one, although its slowest run took five minutes. Fixing the bugs took between 22 and 27 seconds for all three, and the review between 48 seconds and 72.

The table gives the results of each task. Every build passed all four runs of every task. The hidden discount check passed in one fix run of the Speed pack, one of the Quality pack and none of the adapted pack. It also lists the median times and ranges from the chart.

The table gives the median tool calls and tokens for each task. On the create task, the adapted pack made four or five tool calls against six or seven for the others, and wrote about 3,300 tokens against about 7,000, with under 700 of reasoning against more than 3,000. On the fix and review tasks, the tool calls were nearly the same, and the adapted pack wrote the fewest tokens.

Passed means the visible criteria above. Times, tool calls and tokens are medians of four runs.

The differences were in the work. On the create task, the largest of the three, the adapter brought the Quality pack’s median time from over two and a half minutes to just over one. Three of its four create runs finished faster than any run of the Quality pack without it. The fourth was the slowest run of all, which I describe below. On the fix and review tasks, the adapter made about as many tool calls as the Quality pack without it. Its turns were shorter, with less reasoning in each, although the time ranges overlap.

The chart shows the tokens written over all 12 runs of each build, split into reasoning and visible answers with tool calls. The Speed pack wrote about 24,000 reasoning tokens and 22,000 others. The Quality pack wrote about 28,000 and 22,000. With the adapter, it wrote about 17,000 and 19,000.

Summed over all 12 runs, the adapter wrote 40% fewer reasoning tokens than the same pack without it and about an eighth fewer tokens of visible answers and tool calls, over a quarter fewer in total. Those sums include the slow run. Using the median of each task instead, reasoning fell by more than half. On the create task it fell to about a fifth. The reward that paid the model for finishing with less work seems to have taught it mostly to think for less time before acting.

One run went the other way. In one create run, the adapted model wrote a correct tool and a faulty test, then debugged the test before fixing it. The whole run took 23 tool calls and five minutes. No other run in the set used as many tokens. With four runs per model, one such run moves any average, which is why the table shows medians and ranges.

None of the 36 runs produced a malformed call to Pi’s own tools. The tool errors that Pi recorded were all shell commands that exited with an error, nearly always a test run that failed before the model fixed the code. The mix of tools barely moved. All three builds used bash for most of their work, read to inspect files and write for new ones. None of the 36 runs called edit. To change existing files, the models rewrote them or patched them from the shell.

Tool calls with a custom tool name

This test is relevant to anyone who gives the model tools of their own, such as an MCP server or a custom agent. When a model writes a tool call as plain text instead of making it, the agent receives no call and nothing happens.

Last week Inkling handled Pi’s read, bash and edit every time. Given a tool named read_file, it often wrote the call as text. I repeated that test. A request to read two files in parallel with read_file went 40 times to each build, at the same sampling settings as above. I sent half as streamed requests and half as complete ones, because clients use both.

The chart shows the replies to 40 identical requests for two calls to a tool named read file. The Speed pack got 19 right and wrote the other 21 as text. The Quality pack got 13 right and wrote 27 as text. With the adapter, 36 were right and four failed in other ways.

The table splits the correct replies by request type. The Speed pack got 10 of 20 streamed requests right and 9 of 20 complete ones. The Quality pack got 7 and 6, and the adapted pack 19 and 17.

In their other replies, the two packs without the adapter wrote both calls as JSON text with a missing separator. With the adapter, nine replies in ten made both calls correctly. The adapter was trained only on Pi’s own tools, so I did not expect it to help with a tool it had never seen. My guess is that reinforcement learning on thousands of successful tool calls made the model commit to its native tool-call format more firmly, whatever the tool is called. I have not tested that explanation, and this is one prompt with one tool name.

The adapter’s four failures broke at the same spot as the others, just after the tool’s name. In three of them a stray character from another script, Korean, Sinhala or Chinese, took the place of the separator. Two of those three still made the other call correctly. The fourth repeated the opening of the call until it hit the length limit. Stray characters like these can come from sampling with no top-p or top-k cut-off, which these settings allow, so they may say as much about the sampler as about the adapter.

Checking the merge

Before trusting the merged pack, I compared it with the original using a separate script. Every tensor outside the attention matrices was byte for byte identical, including the vision encoder and the draft head. For each attention matrix, I recomputed W + 2·B·A from the original files. The stored values matched the BF16 rounding of that result bit for bit. The matrices have different shapes for queries, keys, values and outputs, so an update applied in the wrong orientation or to the wrong projection type would have failed.

That check proves the arithmetic. It cannot prove that the script’s assumptions match the authors’ training setup, because it shares them. The best evidence that the adapter landed where it should is the change in behaviour above, which is large and consistent with the card. I did not compare the merged model with the original plus the adapter applied at run time in 32-bit arithmetic, which would answer the question directly.

The rounding also costs more than I expected. The adapter’s update is well under 1% of the size of each attention matrix. Many individual changes fall below the gap between neighbouring BF16 values, so they round away. Only about a third of the attention weights change in the merge. Measured by size, the difference between the update I wanted and the update the merged weights carry is about two thirds of the update itself. Part of what the authors trained is lost in a BF16 merge. The effects I measured survived it, but a run-time adapter or a higher-precision merge might show more.

What I take from it

The card’s efficiency claim held on my laptop, although the size of the effect differed. On my tasks the results were the same with and without the adapter, which cut the tokens written over all runs by over a quarter, mostly reasoning. On the largest task it needed about half the time in three runs out of four. The card reports more than a third fewer output tokens on far longer tasks. The improvement I did not expect was in my tool-call test with a name the model had never seen, from a third of replies correct to nine in ten.

The Quality pack that the adapter needs is 3 GB larger than the Speed pack. Youssofal lists both packs for Macs with 32 GB or more. With my usual apps open on 48 GB, MTPLX refused requests in seven runs to keep the Mac out of swap. Five of them were runs of the merged pack. I reran them after memory had freed up, so the reruns ran in quieter conditions than the rest. The adapter also missed the one hidden check in every fix run, which may be chance and may not.

Four runs per task at temperature 1.0 is a small sample. The tool-call result is clear, but it comes from one prompt. Reasoning fell on all three tasks and the create task was faster, but one slow run shows how wide the spread can be. I read the smaller differences as impressions.

For a developer who already runs Inkling 2 Mini with Pi on a Mac with memory to spare, the merge is worth trying, especially with custom tools. For everything else, the Speed pack is faster and smaller. I am keeping both. The merge itself took 18 seconds. Checking it and running the tests took about an hour and a quarter.

A week ago I switched my local coding to Inkling 2 Mini, the open-weight model from Thinking Machines. It runs on my MacBook Pro through MTPLX, a Mac app that serves local models, and drives the Pi coding agent, an open source agent that works in the terminal. On 30 November an adapter appeared on Hugging Face that targets exactly that pairing. Inkling-2-Mini-pi-adapted, published under the harness-hub account, is a small set of weights trained with reinforcement learning to make Inkling a better model behind Pi.

Its model card makes a specific claim. On Terminal-Bench 2.1, a benchmark of real command-line tasks, the adapter solves about as many tasks as the base model when time is generous. On the tasks both solve, it needs about a fifth fewer tool calls and more than a third fewer output tokens. SWE-bench Pro shows a third fewer tool calls. Under a one-hour limit per task, finishing sooner turns into more solved tasks, from about 44% to 57% on average. The authors measured all of this on data-centre GPUs. I wanted to know how much of it survives on a laptop, in the runtime I already use.

In 36 agent runs and two smaller tests, Inkling solved the same tasks with or without the adapter. With it, the model wrote far less reasoning before acting, and on the largest task its median time fell by half. It also fixed most of the tool-call errors I found last week. The costs are 3 GB more memory and a merge that I had to do myself.

What the adapter is

The adapter is a 53 MB patch for a model of about 20 GB, much like a diff applied to the weights. Technically it is a LoRA, short for low-rank adaptation, a method published by Microsoft researchers in 2021. Training leaves the original weights frozen. For each matrix it adapts, it learns two thin matrices instead, one tall and one wide, and adds their product to the original. That product has the full size of the matrix, but it can move it in only a few independent directions, 32 for this adapter, while each attention matrix is more than a thousand values on each side. The bet behind LoRA is that teaching a model a new job needs only a few such directions. A scaling factor, two for this adapter, sets how strongly the update is applied.

This adapter touches only the attention projections of the language model, four per layer across 24 layers. The experts, which hold most of Inkling’s parameters, are untouched, and so are the vision encoder and the draft head. Because the base stays frozen, one copy of the model can serve several adapters. vLLM can apply them at run time and choose one per request. The card says that serving this adapter that way costs about a fifth of the speed. Merging the update into the weights, as I did below, avoids that cost, at the price of one merged pack per adapter.

According to the card, the adapter was trained with the asynchronous GRPO trainer in Hugging Face’s TRL library for 100 steps on four NVIDIA B300 GPUs. The tasks were about 500 coding problems, mostly in Python and Go, plus about 900 cybersecurity tasks on Cedar and OpenFGA authorisation, each solved inside Pi at high reasoning effort. The reward is mostly the task’s own verifier, pass or fail. Solved attempts also earn a small bonus for using fewer tool calls and pay a small penalty for generating more tokens. The model was paid to finish the job with less work, so I expected to see fewer tool calls and shorter output.

The base model, the adapter and the MTPLX packs are all published under the Apache 2.0 licence. Pi is MIT-licensed. The adapter’s card links its training recipe, its evaluation trajectories and the TRL scripts, which is more than most fine-tunes publish. The harness-hub account is an organisation run by Hugging Face staff. The same account has published adapters for other coding agents too. Qwen3.8 27B has adapters for Pi, OpenCode and Hermes Agent, plus one that merges all three. For Inkling 2 Mini, there are adapters only for Pi so far.

The authors also published an earlier preview adapter trained with reasoning switched off. Several of the derived builds on Hugging Face, including the only ready-made MTPLX pack I found, start from that preview. I used the final adapter, because Pi runs Inkling at high effort by default.

Getting it into MTPLX

As far as I can tell from its options, MTPLX does not apply a LoRA to the main model at run time. It serves complete model folders, which it calls packs, so the adapter has to be merged into the weights first.

The pack my MTPLX app normally runs does not allow a clean merge. Youssofal’s Optimized Speed build of Inkling compresses the attention matrices to 8 bits. Adding a LoRA to 8-bit weights means unpacking them, adding the update and compressing again, which mixes the adapter’s change with a fresh rounding error. The Optimized Quality build from the same author is, in its own words, the official release with its weights unchanged. Its attention matrices are in BF16, the 16-bit format the official weights ship in. That makes it the closest match to the weights the adapter was trained on. In BF16 the merge is a plain addition. Each matrix W becomes W + 2·B·A, computed in 32-bit floating point and rounded once back to BF16.

The Optimized Quality pack, with BF16 attention and 4-bit experts, is cloned copy-on-write. The Pi adapter, a rank-32 LoRA of 53 MB, supplies two small matrices per projection. Two times B times A is added to each of the 96 attention matrices of the clone. The result is a merged pack of the same size with the same draft head.
Figure 1. The merge. The adapter’s update is added to the 96 attention matrices of a copy of the pack, and everything else stays byte for byte the same.

A developer who publishes as metaxito had already written a script for this merge under the Apache 2.0 licence, for the preview adapter. It reads the rank and alpha from the adapter’s own configuration. The final adapter targets the same 96 matrices with the same names and the same rank, so the script ran unchanged. It clones the pack with the file system’s copy-on-write, opens the clone’s weights file in place and rewrites only the bytes of the 96 attention matrices. On my Mac it took 18 seconds.

The procedure has three steps. First download the pack, then the two adapter files from the root of the adapter’s repository, which use the names the script expects. Then run the script with a Python that has MLX and the safetensors library. MTPLX’s own runtime has both. I used the pack at revision 1ee9bded, the adapter at 4e775038 and the script at 9848c431.

mtplx pull Youssofal/Inkling-2-Mini-MTPLX-Optimized-Quality

hf download harness-hub/Inkling-2-Mini-pi-adapted \
  adapter_config.json adapter_model.safetensors --local-dir pi-adapter

python3 merge_pi_lora_mtplx.py \
  --base-pack ~/.mtplx/models/Youssofal--Inkling-2-Mini-MTPLX-Optimized-Quality \
  --lora-dir pi-adapter \
  --out-pack ~/.mtplx/models/local--Inkling-2-Mini-pi-adapted-MTPLX-Optimized-Quality \
  --adapter-repo harness-hub/Inkling-2-Mini-pi-adapted

Serving it and pointing Pi at it

MTPLX accepted the merged folder as a verified pack, because the clone carries the base pack’s runtime metadata. I did not re-stamp it. MTPLX serves one model per server, so switching between packs means restarting the server with another folder. I served each model with the same command line, one at a time, on a separate port so that my everyday setup stayed untouched.

mtplx serve --model <pack folder> --model-id <name> --port 8001 --no-auth \
  --mtp --depth 3 --profile sustained --reasoning auto \
  --tool-prompt-mode native --ssd-session-cache off \
  --context-window 131072 --temperature 1.0 --top-p 1.0 --top-k 0 \
  --no-stats-footer

Pi needs one entry per model in its models.json. The card insists on "api": "openai-completions", because the adapter was trained and evaluated with Pi’s Chat Completions client. Pi’s Responses client was never part of its training.

{
  "providers": {
    "inkling": {
      "baseUrl": "http://127.0.0.1:8001/v1",
      "api": "openai-completions",
      "apiKey": "mtplx-local",
      "compat": { "supportsReasoningEffort": true, "thinkingFormat": "qwen" },
      "models": [
        { "id": "inkling-oq-pi", "reasoning": true,
          "contextWindow": 131072, "maxTokens": 32768 }
      ]
    }
  }
}

Pi then runs against it with pi --model inkling/inkling-oq-pi --thinking high. MTPLX reports the reasoning effort it applied to each request, and a spot check confirmed that Pi’s setting reached the server.

On a MacBook Pro with an M5 Pro chip and 48 GB of memory, the Pi coding agent, set to high reasoning effort, reads, edits and runs tests in a fresh task folder. It sends chat requests and tool calls to an MTPLX server on port 8001 with multi-token prediction at depth 3. The server loads one of three Inkling 2 Mini packs, between 17 and 20 GB, when it starts.
Figure 2. The test setup. One model at a time runs in MTPLX, and Pi works in a fresh folder for every task.

Three builds and how I tested them

I compared three builds of Inkling 2 Mini. The comparison that isolates the adapter is between the second and the third, which differ only in the merged attention weights. The first is the Speed pack, as a reference point. In the result tables I shorten the third build to Quality + adapter.

Speed pack Quality pack Quality pack with Pi adapter
Expert weights Official 4-bit Official 4-bit Official 4-bit
Attention weights 8-bit BF16, official BF16, adapter merged
Output head 8-bit BF16, official BF16, official
Draft head Official Official, same file Official, same file
Download 17.2 GB 20.2 GB Built locally in 18 seconds
Setting Value
Machine MacBook Pro, M5 Pro, 48 GB, with my usual apps open
Runtime MTPLX 2.13.3, multi-token prediction at depth 3, one model at a time
Sampling Temperature 1.0, top-p 1.0, top-k off, native tool prompts
Agent Pi 1.7.0, high reasoning effort, 131,072-token window, 32,768 output tokens per turn
Agent extras My own instructions file and two MTPLX extensions, the same for all three builds
Coding tasks 3 tasks × 4 runs × 3 builds, 36 runs, 15-minute limit per run
Run order Two rounds, with the order of the builds reversed in the second
Speed test Short question and an 11,000-token log, 700 tokens of answer
Tool-call test 40 identical requests per build with a tool that Pi does not have

Raw speed

I repeated last week’s speed test: a short question and a service log of about 11,000 tokens, with 700 tokens of answer each time. Each bar in the chart is the median of six to nine runs. On a newer MTPLX release, the Speed pack wrote a little faster than last week.

A grouped bar chart of median tokens per second while writing a 700-token answer. Short question, Speed pack 49, Quality pack 38, Quality pack with Pi adapter 41. Long log of 11,000 tokens, Speed pack 72, Quality pack 61, Quality pack with Pi adapter 58. Six to nine runs per bar.
Figure 3. Writing speed. The merge made no difference I could measure to the Quality pack’s speed. The Speed pack stays the fastest of the three.
Build Prompt Writing, tokens/s Range Tokens per pass Range
Speed pack Short 49 44–53 1.9 1.8–2.1
Quality pack Short 38 36–42 1.9 1.8–2.0
Quality + adapter Short 41 39–43 2.0 1.9–2.1
Speed pack Long log 72 52–78 3.3 2.5–4.4
Quality pack Long log 61 57–66 3.3 3.2–4.0
Quality + adapter Long log 58 41–61 3.1 2.1–3.4

The merge did not change the Quality pack’s speed in any way I could measure. The two Quality builds differ by about three tokens per second, in opposite directions on the two prompts, with overlapping ranges. Their reading speeds on the long log, well over 1,000 tokens per second, overlapped too. Speed depends mostly on how many bytes the Mac reads for each token. The merge changed values without changing a single byte of layout.

MTPLX’s draft head guesses a few tokens ahead and the full model checks the guesses in one pass. Tokens per pass counts how many tokens each pass produced. The draft head was trained on the original model and nobody retrained it for the adapter. With the adapter it produced about as many tokens per pass as without it, within the spread of the runs. The card reports a similar result for a different drafter on vLLM, which kept nearly all of its acceptance.

The Speed pack stayed the fastest. Its attention matrices and output head are stored in 8 bits, half the size of the BF16 ones. MTPLX reads all of them for every token.

A coding agent with the adapter

I gave Pi the same three tasks as last week, each in a fresh folder, now at high reasoning effort, the setting the adapter was trained for.

  • Create: a small CSV statistics tool with a strict output format, plus its own unit tests. Five hidden tests check the result.
  • Fix: three planted bugs in an orders module, with failing tests that the model must not edit. A hidden test also checks a rule stated in a docstring.
  • Review: a user store of about 30 lines with five planted problems, including an authentication bypass and SQL injection.

Every create run passed the five hidden tests. Every fix run made the visible tests pass without editing them. Every review found all five planted problems and ranked the authentication bypass and the SQL injection first and second. On those criteria all three builds scored 12 out of 12. A week earlier, Inkling and Bonsai had passed all three tasks on the same criteria. These tasks are too easy to show a difference in capability in either direction.

The hidden docstring check is the exception. According to the docstring, a discount outside 0–100 is invalid. One run of the Speed pack and one of the Quality pack added that check. The adapter missed it in all four runs. With four runs per build this may be chance. It is also what a reward for doing less could produce, so it is the result I would watch first in a larger test.

A grouped bar chart of median seconds for the Pi coding agent to finish each task, four runs per bar, with a line from the fastest to the slowest run. Create a tool, Speed pack 128 seconds (93 to 136), Quality pack 154 (95 to 243), Quality pack with Pi adapter 71 (44 to 304). Fix three bugs, 24 (18 to 28), 27 (17 to 28) and 22 seconds (16 to 51). Review a file, 48 (34 to 80), 72 (58 to 101) and 54 seconds (42 to 62).
Figure 4. Three coding tasks in Pi. With the adapter, the Quality pack’s median time on the create task fell by more than half. The lines run from the fastest to the slowest of four runs.
Task Build Passed Discount check Median time Range
Create Speed pack 4/4 128 s 93–136 s
Create Quality pack 4/4 154 s 95–243 s
Create Quality + adapter 4/4 71 s 44–304 s
Fix Speed pack 4/4 1/4 24 s 18–28 s
Fix Quality pack 4/4 1/4 27 s 17–28 s
Fix Quality + adapter 4/4 0/4 22 s 16–51 s
Review Speed pack 4/4 48 s 34–80 s
Review Quality pack 4/4 72 s 58–101 s
Review Quality + adapter 4/4 54 s 42–62 s
Task Build Tool calls Output tokens, with reasoning Reasoning tokens
Create Speed pack 6 7,619 3,683
Create Quality pack 7 6,916 3,248
Create Quality + adapter 4.5 3,333 667
Fix Speed pack 4.5 1,183 552
Fix Quality pack 4.5 1,008 476
Fix Quality + adapter 4 848 321
Review Speed pack 2 2,553 1,731
Review Quality pack 2 3,416 2,525
Review Quality + adapter 2 2,122 1,444

Passed means the visible criteria above. Times, tool calls and tokens are medians of four runs.

The differences were in the work. On the create task, the largest of the three, the adapter brought the Quality pack’s median time from over two and a half minutes to just over one. Three of its four create runs finished faster than any run of the Quality pack without it. The fourth was the slowest run of all, which I describe below. On the fix and review tasks, the adapter made about as many tool calls as the Quality pack without it. Its turns were shorter, with less reasoning in each, although the time ranges overlap.

A stacked bar chart of tokens written over all 12 Pi runs of each model. Speed pack, 24,474 reasoning tokens and 21,664 tokens of answers and tool calls. Quality pack, 28,268 and 22,261. Quality pack with Pi adapter, 16,951 and 19,315.
Figure 5. Tokens written in Pi. With the adapter, reasoning fell by 40%, and visible answers and tool calls by about an eighth.

Summed over all 12 runs, the adapter wrote 40% fewer reasoning tokens than the same pack without it and about an eighth fewer tokens of visible answers and tool calls, over a quarter fewer in total. Those sums include the slow run. Using the median of each task instead, reasoning fell by more than half. On the create task it fell to about a fifth. The reward that paid the model for finishing with less work seems to have taught it mostly to think for less time before acting.

One run went the other way. In one create run, the adapted model wrote a correct tool and a faulty test, then debugged the test before fixing it. The whole run took 23 tool calls and five minutes. No other run in the set used as many tokens. With four runs per model, one such run moves any average, which is why the table shows medians and ranges.

None of the 36 runs produced a malformed call to Pi’s own tools. The tool errors that Pi recorded were all shell commands that exited with an error, nearly always a test run that failed before the model fixed the code. The mix of tools barely moved. All three builds used bash for most of their work, read to inspect files and write for new ones. None of the 36 runs called edit. To change existing files, the models rewrote them or patched them from the shell.

Tool calls with a custom tool name

This test is relevant to anyone who gives the model tools of their own, such as an MCP server or a custom agent. When a model writes a tool call as plain text instead of making it, the agent receives no call and nothing happens.

Last week Inkling handled Pi’s read, bash and edit every time. Given a tool named read_file, it often wrote the call as text. I repeated that test. A request to read two files in parallel with read_file went 40 times to each build, at the same sampling settings as above. I sent half as streamed requests and half as complete ones, because clients use both.

A stacked bar chart of 40 replies per model to a request that needs two parallel calls to a tool named read_file. Speed pack, 19 correct and 21 with the calls written as text. Quality pack, 13 correct and 27 as text. Quality pack with Pi adapter, 36 correct and 4 other failures, three with a stray character in the call and one that repeated a fragment.
Figure 6. The same tool-call request sent 40 times to each build. With the adapter, nine replies in ten made both calls correctly, against a third without it.
Build Streamed, correct Not streamed, correct Total correct
Speed pack 10 of 20 9 of 20 19 of 40
Quality pack 7 of 20 6 of 20 13 of 40
Quality + adapter 19 of 20 17 of 20 36 of 40

In their other replies, the two packs without the adapter wrote both calls as JSON text with a missing separator. With the adapter, nine replies in ten made both calls correctly. The adapter was trained only on Pi’s own tools, so I did not expect it to help with a tool it had never seen. My guess is that reinforcement learning on thousands of successful tool calls made the model commit to its native tool-call format more firmly, whatever the tool is called. I have not tested that explanation, and this is one prompt with one tool name.

The adapter’s four failures broke at the same spot as the others, just after the tool’s name. In three of them a stray character from another script, Korean, Sinhala or Chinese, took the place of the separator. Two of those three still made the other call correctly. The fourth repeated the opening of the call until it hit the length limit. Stray characters like these can come from sampling with no top-p or top-k cut-off, which these settings allow, so they may say as much about the sampler as about the adapter.

Checking the merge

Before trusting the merged pack, I compared it with the original using a separate script. Every tensor outside the attention matrices was byte for byte identical, including the vision encoder and the draft head. For each attention matrix, I recomputed W + 2·B·A from the original files. The stored values matched the BF16 rounding of that result bit for bit. The matrices have different shapes for queries, keys, values and outputs, so an update applied in the wrong orientation or to the wrong projection type would have failed.

That check proves the arithmetic. It cannot prove that the script’s assumptions match the authors’ training setup, because it shares them. The best evidence that the adapter landed where it should is the change in behaviour above, which is large and consistent with the card. I did not compare the merged model with the original plus the adapter applied at run time in 32-bit arithmetic, which would answer the question directly.

The rounding also costs more than I expected. The adapter’s update is well under 1% of the size of each attention matrix. Many individual changes fall below the gap between neighbouring BF16 values, so they round away. Only about a third of the attention weights change in the merge. Measured by size, the difference between the update I wanted and the update the merged weights carry is about two thirds of the update itself. Part of what the authors trained is lost in a BF16 merge. The effects I measured survived it, but a run-time adapter or a higher-precision merge might show more.

What I take from it

The card’s efficiency claim held on my laptop, although the size of the effect differed. On my tasks the results were the same with and without the adapter, which cut the tokens written over all runs by over a quarter, mostly reasoning. On the largest task it needed about half the time in three runs out of four. The card reports more than a third fewer output tokens on far longer tasks. The improvement I did not expect was in my tool-call test with a name the model had never seen, from a third of replies correct to nine in ten.

The Quality pack that the adapter needs is 3 GB larger than the Speed pack. Youssofal lists both packs for Macs with 32 GB or more. With my usual apps open on 48 GB, MTPLX refused requests in seven runs to keep the Mac out of swap. Five of them were runs of the merged pack. I reran them after memory had freed up, so the reruns ran in quieter conditions than the rest. The adapter also missed the one hidden check in every fix run, which may be chance and may not.

Four runs per task at temperature 1.0 is a small sample. The tool-call result is clear, but it comes from one prompt. Reasoning fell on all three tasks and the create task was faster, but one slow run shows how wide the spread can be. I read the smaller differences as impressions.

For a developer who already runs Inkling 2 Mini with Pi on a Mac with memory to spare, the merge is worth trying, especially with custom tools. For everything else, the Speed pack is faster and smaller. I am keeping both. The merge itself took 18 seconds. Checking it and running the tests took about an hour and a quarter.

All writing