Lurker News
Hey HN, we trained and open-sourced a 1.5B model that predicts your next edits, similar to Cursor. You can download the weights here (https://huggingface.co/sweepai/sweep-next-edit-1.5b) or try it in our JetBrains plugin (https://plugins.jetbrains.com/plugin/26860-sweep-ai-autocomp...).

Next-edit autocomplete differs from standard autocomplete by using your recent edits as context when predicting completions. The model is small enough to run locally while outperforming models 4x its size on both speed and accuracy.
We tested against Mercury (Inception), Zeta (Zed), and Instinct (Continue) across five benchmarks: next-edit above/below cursor, tab-to-jump for distant changes, standard FIM, and noisiness. We found exact-match accuracy correlates best with real usability because code is fairly precise and the solution space is small.
Prompt format turned out to matter more than we expected. We ran a genetic algorithm over 30+ diff formats and found simple `original`/`updated` blocks beat unified diffs. The verbose format is just easier for smaller models to understand.
Training was SFT on ~100k examples from permissively-licensed repos (4hrs on 8xH100), then RL for 2000 steps with tree-sitter parse checking and size regularization. The RL step fixes edge cases SFT can’t like, generating code that doesn’t parse or overly verbose outputs.
We're open-sourcing the weights so the community can build fast, privacy-preserving autocomplete for any editor. If you're building for VSCode, Neovim, or something else, we'd love to see what you make with it!

Comments (153) 48 threads

Earlier comments
mromanuk#
There is one already, on of the plugin authors commented here
evanreichard1 reply#
There's also https://github.com/ggml-org/llama.vim

Which I've been using with Qwen3 Coder. As long as infill is supported, that should work. I'll try later today.

jmanandchanny#
Thanks for sharing this. I personally use vim and not neovim (I do not have anything against it), so this plugin will be a great addon for me. Currently, I have to switch from vim to Cursor and back again for any kind of vibe coding.
kevinlu1248#
Someone in this thread already built a Neovim plugin connecting to this model I believe.
kamranjon3 replies#
I read the release but didn't quite understand the difference between a next-edit model and a FIM model - does anyone have a clear explanation of when to use one over the other? I'd love if there was a sublime plugin to utilize this model and try it out, might see if I can figure that out.
sheepscreek1 reply#
I’m going to speculate a bit here, FIM may stand for something-in-the-middle?

I know there are the original autocomplete models that simply complete the endings. Then there are Cursor like models capable of editing/filling text between blocks of code. In essence, they look at both the text before the insertion point and after it - then find the best fitting completion in the middle. My guess is FIM is the latter.

aidos#
As you said. Fill-in-the-middle.
evolving-silica#
I was curious as well and wanted to try how this work, so I asked claude to create a plugin for that. This utilizes built-in autocomplete behavior. If you want to give it a try then feel free to have a look here https://github.com/lumnn/AItoComplete (did not push it to packagecontrol yet)
cmrdporcupine2 replies#
I've been trying my hands at implementing an emacs package for inline completions with this. I have it mostly working and performance is good enough but I haven't been blown away by the quality of its suggestions unfortunately. Which I guess is expected from a 1.5B model.

I'd love to see them making a larger model in the 10-20b range maybe? I know most people wouldn't be able to run that on their machines, but some could.
Running on ollama locally on NVIDIA Spark GB10. Tried it also with vLLM. Pretty fast.

mijoharas1 reply#
Do you care to share your implementation?
cmrdporcupine#
If I can make it clean and decent I will. I might look at again after work and see if I can tune it up. It was a bit flake and I wasn't blown away by the interaction.
cmrdporcupine#
Yea, I tweaked it a bunch to try to follow what was described there
logicallee#
Congratulations on training a relatively small model that can beat larger models for this important task.

>We ran a genetic algorithm over 30+ diff formats
Can you you give more information about your genetic algorithm? Did you do crossover over the trained models (for example, ranking by fitness, take 20% most elite and create children by mixing their weights randomly)? Did you have a 'population size' (number of instances) for the genetic algorithms, and if so what was it?

Load more comments