An AI-native editor
for LaTeX.

Sundial is a collaborative LaTeX editor where AI edits arrive as reviewable suggestions, the agent compiles, fixes its own errors, and checks your citations while you write. No compile timeouts, unlimited collaborators.

No card, no compile quota. Free forever for .edu addresses.

main.tex Edit Aa ···
% R2.1: quantify the speedup claim
\section{Results}\label{sec:results}
Our sparse decoder matches the dense
baseline within 0.2 points on all
four benchmarks \citep{tay2022}.
Decoding is substantially faster
on long inputs.
Decoding is 3.1x faster at 32k
tokens (Table~\ref{tab:speed}).
Claude Opus 5 Keep Undo ✓ Kept · in history
\begin{equation}\label{eq:score}
s_{ij} = q_i^\top k_j / \sqrt{d}
\end{equation}
where $d$ is the head dimension.
We ablate the distance bias
in Appendix~\ref{app:bias}. Priya
\begin{table}[t]
\centering
\caption{Decoding throughput by
context length.}
\label{tab:speed}
\begin{tabular}{lrr}
Sparse Attention Decoding for
Long-Context Transformers
Priya Raghavan   Jonas Weber   Mei Chen
Department of Computer Science
Abstract

Attention dominates the cost of long-context inference. We introduce a sparse decoding scheme that routes each query to a small, learned subset of keys, matching dense-attention quality on all four benchmarks we evaluate while decoding 3.1x faster at 32k tokens. The gain grows with context length and requires no retraining of the base model.

1  Introduction

Per-token decoding cost grows linearly in context length, and attention quickly dominates as contexts reach tens of thousands of tokens. Prior work prunes heads or compresses the KV cache, trading quality for speed. We instead learn a routing function over the scores

(1)sij = qikj / √d

which the decoder evaluates on a small routed subset of keys in place of the dense score matrix. Routing adds under 2% overhead and is trained jointly with a learned distance bias.

2  Related work

Efficient attention spans fixed sparse patterns, low-rank approximation, and cache eviction. Sliding-window and block-sparse layouts fix the pattern in advance, while eviction policies discard keys the model may later need. Learned routing instead adapts the pattern per query at decode time, keeping the full cache addressable.

1 / 9 Compiled · 1.9s
main.tex · 214 lines · Edited just now
Used by researchers at

Leave a comment, get a revision.

Put @agent in a margin comment. The revision comes back as a suggestion, with a short reply on the thread.

One comment for one paragraph, no context-pasting.
Or let the Agent watch the file and pick up every new comment.
Threads close when you close them, not when the Agent replies.
Download for Mac
main.tex agent watching

On the held-out set, our method improves macro-F1 by a wide margin 2.4 points over the strongest baseline, and the gap holds across all three seeds.

Claude Opus 5 · updated 1 claim

Full per-task results and ablations are in Appendix B.

1 open thread · Edited now

Hand off a whole pass, then review it in one sweep.

Every AI edit is a signed, reviewable suggestion. Keep or undo, one by one or in batches; history records who wrote what, human or model, at edit granularity.

Inline diffs in the text, not a chat transcript to cross-reference.
Review a big pass in one sweep, filtered by author or by file.
Undo one edit from last Tuesday without touching anything else.
conclusion.tex
Claude Opus 5 made 2 suggestions in this file

Our method achieves significant improvements over strong baselines across a wide variety of settings improves macro-F1 by 2.4 points on all four benchmarks at equal parameter count. The gain holds across all three seeds.

Claude Opus 5 · made 1 claim precise

It is important to note that much further work will be needed to fully explore We leave to future work scaling past 7B parameters and multilingual pretraining.

Claude Opus 5 · cut 1 filler phrase
conclusion.tex · 96 lines · Edited now

An editor that checks your work.

Citations are read against the papers behind them, and your numbers stay consistent across files. Every finding arrives as a suggestion, and nothing changes without your say.

Does the source say what you say it says?

Every citation is read against the paper behind it. When a claim drifts past what its source supports, you hear about it first.

Reviewer 2 runs this check. Now you run it first.

related-work.tex

Alpine glaciers have lost half their ice since 2000 (Zemp et al., 2019).

Citation check overclaims the source
Zemp et al. report a 17% volume loss for 2000 to 2014. Nothing in your library supports "half since 2000".
Zemp et al. 2019 · read from your Zotero library
reads the paper, not the abstract

Your abstract, tables, and text agree.

One result changes and three files quietly disagree. Sundial flags the copies that no longer match, before a reviewer does.

Runs across every file in the workspace, not just the open one.

abstract.tex

Our method improves macro-F1 by 2.4 points over the strongest baseline.

Consistency 2 files disagree
results.tex reports 2.1 in §5.2 and conclusion.tex still says 2.3. Which is current?
abstract.tex · results.tex · conclusion.tex
✓ results.tex §5.2 and conclusion.tex updated · 2 suggestions to review

A full editor, not a plugin.

The suggestion flow sits on top of a serious editor. The day you need any of this, it is already there.

The agent has a real computer.

It runs your notebooks, compiles your LaTeX, and fixes its own errors in a sandbox before anything touches the manuscript.

$tectonic thesis.tex
! Undefined \citep · line 214
adding natbib, retrying…
✓ PDF built22 pages · 0 errors

Claude Code and Codex join the doc.

Point your local agent at the workspace: same document, same signed suggestions, same review flow.

youediting intro
Claude Code3 suggestions in methods.md
Agentfixing citations

100+ models, swappable mid-chat.

Frontier or open source, pick per task. Review works the same no matter who writes.

✳ Claude Opus 5
GPT-5.5
Gemini 3 Pro
+ 100 more…

Papers and code, first-class.

LaTeX with live preview and Zotero citations. Jupyter notebooks that run inside the document instead of beside it. Markdown for everything else.

main.texcompiled ✓ 1.9s
analysis.ipynb14/14 cells pass
draft.mdlive · 3 editors

Overleaf charges for the parts you need most.

Overleaf Sundial
Collaborators on the free plan 1 per project Unlimited
Compile timeout on the free plan Seconds; longer costs $199+/yr None
AI assistance Paid add-on Included, free
When the build breaks You read the log The agent reads the log and fixes it
Track changes Paid plans only Every edit, attributed, forever
Coauthors who stay on Overleaf Everyone stays Two-way sync: they keep Overleaf, you get the agent
Jupyter notebooks Not supported Run inside the workspace
The Sundial agent mascot typing on a laptop

An editor you can hand real work to.

Bring your paper as-is. Two-way Overleaf and GitHub sync means your coauthors do not have to change anything.