October 30, 2026 · updated November 1 with writing from scratch
How good is Apple’s on-device model at LaTeX?
Macs with Apple Intelligence come with a small language model that runs on the computer itself. Before building Corollary around it, we wanted to know whether it could edit a paper without breaking the LaTeX.
The test
We wrote 20 paragraphs in the style of arXiv papers, full of the things that usually go wrong: inline and display math, \cite, \ref and \label, footnotes, custom macros and lists. Then we asked the model to do four things to each one: rewrite it, shorten it, fix the grammar, and make it more formal. That’s 80 edits.
A script checked every result. An edit only counted if every citation, reference and label survived, every equation came back unchanged, and the braces and dollar signs still matched.
What we found
- 78 of 80
- edits kept the LaTeX completely intact
- 3.4 s
- for a typical paragraph, on an M1 Max
- None
- refused, out of 5 paragraphs on medicine, security and drugs
Both failures were on the same paragraph: the model tidied up the units inside $E_a = 78 \pm 4\,\mathrm{kJ\,mol^{-1}}$. No edit ever dropped or invented a citation, and none added chatter like “Here is your revised paragraph.”
One thing that didn’t work
Apple’s framework has a feature for getting structured answers back, and we tried it first. None of its 20 edits came back intact. The model writes its answer as JSON without escaping backslashes, so \text turns into a tab followed by “ext”, and \footnote into a form feed and “ootnote”. Corollary asks for plain text instead.
What this means for Corollary
- ⌘K uses Apple’s model by default. It’s good at paragraph-sized edits and costs nothing to run.
- Every edit is still checked. The same rules from this test run on every suggestion, so an edit that changes an equation or drops a citation is blocked before you see it.
- It reads about 1,300 words at a time. That’s plenty for a paragraph but not a whole paper. For bigger jobs, you can use a larger model through Ollama.
- Explaining errors is harder. On 6 test errors it found the right line 5 times but proposed a working fix only twice, so Corollary shows its fix for you to review rather than applying it.
Update: writing from scratch
Corollary 0.1.1 adds Write: with nothing selected, ⌘K drafts LaTeX at the cursor. Editing has an original to compare against; writing doesn’t, so we tested it separately. We asked for eight kinds of insertion in a short robotics paper: a related-work paragraph, a comparison table, a list of contributions, a figure, a numbered equation, a sentence pointing to the results, a conclusion and a hyperparameter table. We ran each twice, for 16 drafts, then compiled every draft inside the paper.
- 15 of 16
- drafts passed Corollary’s checks
- 15 of 15
- of those compiled inside the paper
- 3–10 s
- per draft, on an M1 Max
The one draft held back wrote O(n^2) outside math mode, which doesn’t compile. Corollary named the problem instead of inserting it.
Our first prompt did much worse. The model filled a comparison table with made-up results (0.85 success, 120 ms), used \multirow without its package, reused a \label the paper already had, and answered most requests with lists of placeholders. Two changes fixed most of that. Corollary now tells the model which packages, citation keys and labels the paper has, and gives it two short examples. New checks catch the rest:
- citations that aren’t in your .bib;
- references to labels that don’t exist, and reused labels;
- commands from packages the paper doesn’t load;
- numbers that don’t appear anywhere in your paper.
In practice it’s good at structure: tables, lists, equations, figure environments and cross-references. Its prose is plausible but generic, so treat a drafted paragraph as a starting point. It never fills in results; those come back as [TODO] for you.
Caveats
This is one machine, a handful of runs, and text we wrote, not text taken from real papers. Apple updates the model with macOS, so we’ll rerun the test with each release. The test code is on GitHub if you want to run it yourself.