We fine-tuned
@thinkymachines' Inkling-Small to fix LaTeX compile errors inside the editor, in under a second. On real errors it matches Claude Fable 5.1, six times faster and at about 1/40 of the cost.
When we interviewed mathematicians, one of the most common annoyances we heard about in their day to day work is battling with LaTeX compilation errors.
The most obvious solution is to ask a chatbot to fix errors. That works decently well, except switching to a different window breaks the writing flow, and copy-pasting the snippet often loses relevant context, especially when multiple files are involved.
So we scraped 272,000 questions from TeX.StackExchange and kept the 3,978 whose snippet still fails today, whose accepted answer compiles, and whose difference replays exactly as a patch. The largest dataset previously released had 88.
We tried tweaking the reward function in many ways. The first one was only a compilation check, which led the model to remove content until the document built. In the end, what worked best was rewarding compilation and a close match with the solution's PDF, and penalizing removed content.
We're rolling out the model inside the
@sundialmd editor this week. When a compile fails, the fix is applied as a suggestion in under a second and the PDF rebuilt.
Write-up:
sundial.md/blog/textinguishe…
Thanks
@tinkerapi and
@thinkymachines for the support.