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
keyle1 reply#
I'm playing around with this in LMStudio (in huggingface -> use this model dropdown -> LMStudio)

It's really impressive so far, so quick to respond on a mac mini M2. And it appears to be accurate at least for the obvious questions.
I couldn't get it to work as an autocomplete of Zed unfortunately. It looks like it's hardwired to work with some providers and LMStudio is not included in the prediction engines list. Has anyone got a work around?

kevinlu1248#
Our hosted autocomplete is coming to Zed in a few weeks.
bangaladore#
So SFT cost less only low hundreds of dollars? (1-10$ per hour per H100 if I'm seeing this correctly).

What about SFT?
Presumably basing this of Qwen is the reason it can be done for so cheap?

andruby1 reply#
How easy is it to re-train these to specific subset of programming languages? Could there be a "ruby+rails+html" version, etc?
bradfa#
I'd love to be able to take an open model like this and feed it the codebases that I work on regularly in order to improve its performance for less "hip/modern" languages and frameworks. It would be awesome to see a blog post about how normal users can find tune these models and rough cost estimates with examples!
ajayarama1 reply#
This is actually a game changer. I’ve been meaning to want to run models to accomplish exactly this, but don’t have enough VRAM on my GPU for the conventional LLM-method for the most part. This seems to be a far more efficient method of accomplishing a more scoped problem. Thank you for making it open source!
kevinlu1248#
Let me know if you have any questions! What hardware are you on?

Load more comments