Relace Apply 3: The Small Model That Merges Your Agent Edits
Relace Apply 3 is not a chat model. It takes a lazy edit snippet and an original file and returns the merged file at high speed. What it does and when it pays off.
Every coding agent has the same unglamorous problem at the end of each turn: the model has decided what to change, and now the change has to land in a real file. Ask a frontier model to rewrite the whole file and you pay for every unchanged line at frontier output prices and frontier speed. Ask it for a strict diff and some fraction of those diffs will not apply.
Relace Apply 3 exists to sit in that gap. It is a small, specialised model whose only job is to take an original file plus an abbreviated edit and return the merged result. You would never chat with it, and that is the point.
What an apply model actually does
The pattern Relace calls Instant Apply splits one job into two. The expensive model writes only the parts of the file that change, using placeholder comments such as // ... rest of code ... for everything it leaves alone. A cheap, fast model then reads the original file and that lazy snippet and produces the complete new file.
The native endpoint takes two fields, initial_code and edit_snippet, and returns mergedCode with a usage block. There is also an OpenAI-compatible route where the original code and the edit are wrapped in <code> and <update> tags inside a user message, which is how it appears on OpenRouter as relace/relace-apply-3.
Deletions are the part people get wrong. The snippet has to show the surrounding context or say explicitly what to remove, for example with a comment like // remove Block. If your upstream model simply omits a function, the apply model has no way to tell whether that was a deletion or laziness. Relace's quickstart supplies formatting rules to add to the upstream model's system prompt, and you should use them rather than inventing your own format.
What changed in version 3
Relace published the details in an October 2025 post marking a year of its fast apply work. The headline claim is throughput of more than 10,000 tokens per second, achieved with speculative decoding. That technique suits this task unusually well: the output is mostly a copy of the input, so the draft model guesses correctly most of the time and the large model only has to verify.
The training recipe is public and modest. Relace fine-tuned open-source coding models in the 3B to 8B range with LoRA, starting from about 200,000 samples and filtering down to roughly 145,000. The model was trained in BF16 and served in FP8, which Relace says it checked on 500 held-out examples. The post announces native 256K context support, while Relace's API reference lists a 128K maximum input for the model, so check the limit on the route you actually call.
The practical change Relace emphasises is format tolerance. Apply 3 was trained on unified diffs and string-replace edits as well as lazy snippets, so it copes with an upstream model that drifts between formats mid-session. Relace claims state-of-the-art merge accuracy on a 500-example reviewed set and on a set of pathological merges drawn from customer reports, but the post gives those results only as charts, so there is no number to quote here.
The economics in one example
Relace frames the cost argument with a roughly 1,000-line file, about 10,000 tokens. Its post says rewriting that file with Claude 4.5 Sonnet takes over 100 seconds and costs at least $0.18. With an apply model, the frontier model writes perhaps a few hundred tokens of snippet, and the small model streams the 10,000-token file back at its own speed and price.
On OpenRouter, Apply 3 was listed at $0.85 per million input tokens and $1.25 per million output at the time of writing. Note that you pay input for the whole original file plus the snippet, and output for the whole merged file, so the saving comes from moving bulk output off the expensive model rather than from the apply call being free.
The saving grows with file size and shrinks with edit size. For a three-line change in a 50-line file, a strict diff from the main model is cheaper and simpler, and an extra network hop adds latency for nothing. For a scattered change across a 2,000-line file, the split pays for itself quickly. If you want a way to reason about this per task, cost per refactor walks through estimating a multi-file change before you run it.
Where it fits in an agent stack
Think of Apply 3 as one stage in a pipeline, alongside a search stage that finds the right files and a planner that decides what to change. Relace sells models for the first and last of those; its Relace Search model handles the search stage. You do not need to adopt the set, but it helps to see the apply model as infrastructure rather than as a model choice.
This is the same idea as model routing: send mechanical work to a cheap model and keep the expensive one for judgement. Merging a snippet requires almost no judgement once the snippet is well formed, which is why a model this small can do it.
Two cautions. First, an apply model can only be as correct as the snippet it receives; if the frontier model writes an ambiguous edit, Apply 3 will resolve the ambiguity somehow, and you will not be told. Second, Relace says the most capable frontier models now reach roughly 96% edit success with their own diff formats, so the case for a separate apply stage is weaker with a top model than with a mid-tier one. Measure your own failure rate before assuming you need it.
How to evaluate it on your code
- Collect 50 real edits your agent produced, including a few deletions and a few edits to files over 1,000 lines.
- Run each through your current approach and through Apply 3, and compare the merged output against the result you actually committed.
- Check syntax first, then run the tests. A merge that parses but silently drops a block is the failure that matters.
- Record wall-clock time per edit and total tokens on both models, not just the apply call.
There is one listed variant, relace/relace-apply-3, with no dated snapshots or free endpoint, so pin your evaluation to the date you ran it. If the merge failure rate on your set is near zero and the time saving is real on large files, keep it. If most of your edits are small, a well-prompted diff format on your main model may be all you need.
Common questions
Can I use Relace Apply 3 as a general coding model?
No. It is trained to merge an edit snippet into an existing file, not to decide what the edit should be. Pair it with a capable model that writes the snippet, and let Apply 3 produce the final file.
Why not just ask the main model for a unified diff?
You can, and with the strongest models that often works. Diffs fail when line numbers or context drift, and a failed diff costs a retry. An apply model tolerates lazy snippets and mixed formats, which matters more with mid-tier models and large files.
How does Apply 3 handle deleted code?
Only if the snippet makes the deletion explicit, either by showing the surrounding context without the removed block or with a comment saying what to remove. Silently omitting code is ambiguous, so instruct the upstream model to mark deletions.