Copy-as-Decode: Grammar-Constrained Parallel Prefill for LLM Editing

📰 ArXiv cs.AI

arXiv:2604.18170v1 Announce Type: cross Abstract: LLMs edit text and code by autoregressively regenerating the full output, even when most tokens appear verbatim in the input. We study Copy-as-Decode, a decoding-layer mechanism that recasts edit generation as structured decoding over a two-primitive grammar: references an input line range, ... emits new content. A token-level FSM guarantees syntactic validity, and a serving-layer primitive updates the KV cache for

Published 21 Apr 2026
Read full paper → ← Back to Reads