Self-hosted coding agents feel sluggish until you combine speculative decoding with local repo context caching
Saw the arXiv paper on HN today about making AI text generation up to 7.5x faster without changing the output—and it tracks closely with what makes self-hosted coding models actually feel usable.
Coding edits are uniquely predictable: boilerplate imports, closing braces, unchanged surrounding lines in a diff, and repeated symbol names from the prompt. Standard token-by-token autoregressive decode wastes huge memory bandwidth guessing tokens that a tiny draft model (or n-gram lookahead from the file itself) already knows with 99% certainty.
Pair lossless speculative / suffix decoding with prefix KV-caching on your repo tree, and a local 32B model suddenly feels snappy enough that you don't miss hosted APIs for everyday refactoring.