sean-diab/reviser-demo

Space

Reviser: writing and editing text with cursor actions

0

14 commits

1 linked in READMEs

updated Oct 15, 2026

See the code

README

Reviser: writing and editing text with cursor actions

Language models usually write text once, left to right. Reviser is a decoder-only Transformer that writes and edits text with cursor actions (insert, move, delete, stop) that a deterministic executor applies to a canvas. Reviser is autoregressive over its own actions, so a step costs the same as an autoregressive (AR) step.

This Space runs the models of the paper Reviser: Writing and Editing Text with Autoregressive Cursor Actions (Sean Diab, arXiv:2609.20830, v2) and animates every action: the cursor jumping, text inserted in the middle, and deletions (backspace).

What the demo does

Write. Reviser continues an English prompt of exactly 35 GPT-2 tokens, the prompt length the models were trained on (the app counts tokens and trims longer prompts; 🎲 pulls the opening of a random FineWeb web page). Decoding follows the paper: the prompt is locked (the cursor cannot move into it), temperature 0.9, top-k 50, at most 220 new actions. Models:

  • Reviser 300M (default) and Reviser 100M, v2: trained with run-and-jump writing orders and a self-correction recipe that types a wrong token and deletes it, then fine-tuned with RL (seed 3).
  • Reviser 300M / 100M, first version: the original release, decoded the same way.

Edit. Reviser-Edit (300M default, or 100M) gets a text and an instruction such as "Fix grammar". It starts with the text on the canvas and the cursor at its end, moves to the places that need a change, fixes them and stops. Decoding is greedy over action types, as in the paper's evaluation, so the output is deterministic. A checkbox also runs the AR rewriter of the same size, trained on the same data, which retypes the whole text, so you can compare the outputs and the number of steps.

Results in the paper (abstract)

  • Reviser-Edit beats its matched AR rewriter on CoEdIT SARI (+7.2 at 100M, +4.5 at 300M; two seeds agree) with a third of the decoding steps and latency, though the AR rewriter corrects grammar better.
  • In continuation, Reviser beats diffusion LMs of similar size (62-74% win rate) at a fraction of their compute. Against a same-size AR model trained on the same data, two of three LLM judges prefer the AR model, and one slightly prefers Reviser at 100M.
  • Reviser fills gaps it left and backspaces a just-typed repeated token with probability 0.85-0.87.

Caveats

These are small research models (100M and 300M parameters), so judge the mechanism rather than the prose. The continuation models continue web text; they do not follow instructions. The edit models know the kinds of edits they were trained on (grammar, fluency, clarity and simplification, coherence, neutral wording).

Everything runs on the CPU (the Space uses the free 2-vCPU hardware). Measured on a desktop CPU (Intel i9-9900K) with 2 threads, one generation took about:

  • Write: about 20 s for Reviser 300M and 10 s for Reviser 100M when the model uses most of its 220 actions (about 0.1 s and 0.05 s per action). The first-version models stop earlier, in 7-11 s.
  • Edit, one sentence: 0.3-0.7 s with Reviser-Edit 100M and 0.7-1.6 s with 300M. Over 30 CoEdIT validation items (run with 8 threads) the mean was 1.0 s (100M) and 2.1 s (300M), the slowest 7 s. The AR rewriter took 0.9-2.5 s on the same sentences because it retypes every token (3.3 s on one example where the 100M rewriter repeats a word until it reaches the action limit).

On single examples, 8 threads gave the same times as 2. The Space's shared vCPUs may be slower than this desktop.

The first request for a model also downloads its checkpoint (0.4 GB for 100M, 1.2 GB for 300M); at most three models are kept in memory.

The app code is Apache-2.0 (see LICENSE); the inference code in src/ is taken from the paper's code release. The model weights this Space loads are licensed CC BY-NC 4.0 (non-commercial use only), see https://huggingface.co/sean-diab/reviser-checkpoints.

gradio

sean-diab/reviser-demo

Space

Reviser: writing and editing text with cursor actions

0

14 commits

1 linked in READMEs

updated Oct 15, 2026

See the code

README

Reviser: writing and editing text with cursor actions

Language models usually write text once, left to right. Reviser is a decoder-only Transformer that writes and edits text with cursor actions (insert, move, delete, stop) that a deterministic executor applies to a canvas. Reviser is autoregressive over its own actions, so a step costs the same as an autoregressive (AR) step.

This Space runs the models of the paper Reviser: Writing and Editing Text with Autoregressive Cursor Actions (Sean Diab, arXiv:2609.20830, v2) and animates every action: the cursor jumping, text inserted in the middle, and deletions (backspace).

What the demo does

Write. Reviser continues an English prompt of exactly 35 GPT-2 tokens, the prompt length the models were trained on (the app counts tokens and trims longer prompts; 🎲 pulls the opening of a random FineWeb web page). Decoding follows the paper: the prompt is locked (the cursor cannot move into it), temperature 0.9, top-k 50, at most 220 new actions. Models:

  • Reviser 300M (default) and Reviser 100M, v2: trained with run-and-jump writing orders and a self-correction recipe that types a wrong token and deletes it, then fine-tuned with RL (seed 3).
  • Reviser 300M / 100M, first version: the original release, decoded the same way.

Edit. Reviser-Edit (300M default, or 100M) gets a text and an instruction such as "Fix grammar". It starts with the text on the canvas and the cursor at its end, moves to the places that need a change, fixes them and stops. Decoding is greedy over action types, as in the paper's evaluation, so the output is deterministic. A checkbox also runs the AR rewriter of the same size, trained on the same data, which retypes the whole text, so you can compare the outputs and the number of steps.

Results in the paper (abstract)

  • Reviser-Edit beats its matched AR rewriter on CoEdIT SARI (+7.2 at 100M, +4.5 at 300M; two seeds agree) with a third of the decoding steps and latency, though the AR rewriter corrects grammar better.
  • In continuation, Reviser beats diffusion LMs of similar size (62-74% win rate) at a fraction of their compute. Against a same-size AR model trained on the same data, two of three LLM judges prefer the AR model, and one slightly prefers Reviser at 100M.
  • Reviser fills gaps it left and backspaces a just-typed repeated token with probability 0.85-0.87.

Caveats

These are small research models (100M and 300M parameters), so judge the mechanism rather than the prose. The continuation models continue web text; they do not follow instructions. The edit models know the kinds of edits they were trained on (grammar, fluency, clarity and simplification, coherence, neutral wording).

Everything runs on the CPU (the Space uses the free 2-vCPU hardware). Measured on a desktop CPU (Intel i9-9900K) with 2 threads, one generation took about:

  • Write: about 20 s for Reviser 300M and 10 s for Reviser 100M when the model uses most of its 220 actions (about 0.1 s and 0.05 s per action). The first-version models stop earlier, in 7-11 s.
  • Edit, one sentence: 0.3-0.7 s with Reviser-Edit 100M and 0.7-1.6 s with 300M. Over 30 CoEdIT validation items (run with 8 threads) the mean was 1.0 s (100M) and 2.1 s (300M), the slowest 7 s. The AR rewriter took 0.9-2.5 s on the same sentences because it retypes every token (3.3 s on one example where the 100M rewriter repeats a word until it reaches the action limit).

On single examples, 8 threads gave the same times as 2. The Space's shared vCPUs may be slower than this desktop.

The first request for a model also downloads its checkpoint (0.4 GB for 100M, 1.2 GB for 300M); at most three models are kept in memory.

The app code is Apache-2.0 (see LICENSE); the inference code in src/ is taken from the paper's code release. The model weights this Space loads are licensed CC BY-NC 4.0 (non-commercial use only), see https://huggingface.co/sean-diab/reviser-checkpoints.

gradio