Add self-hosted Sweep Next-Edit model support for Edit Prediction #50929
mateuszmrw
started this conversation in
Feature Requests
Replies: 1 comment 3 replies
-
|
I've been playing around with sweep_next_edit_1.5B myself too! I have been pretty impressed with its speed and quality, and would like to second this proposal. If no one else is working on it, I might try my hand at submitting a pull request now that open_ai_compatible providers were added. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
What are you proposing?
Support for the self-hosted Sweep open-source Next-Edit model via the existing open_ai_compatible_api or Ollama providers.
Zed already supports the hosted Sweep API, but the open-source model requires a different prompt format than standard FIM — it uses recent diffs, a sliding window rewrite, and <|file_sep|> structured tokens.
This means it cannot work with the current open_ai_compatible_api provider. I propose adding a
sweep_next_editvariant toEditPredictionPromptFormat. The edit history context this format needs is already gathered byEditPredictionStoreand available inEditPredictionModelInput— the FIM code path in fim.rs just doesn't use it today.The new format would tap into that existing context to build Sweep's prompt structure.
Why does this matter?
Based on the internal Sweep benchmarks - Sweep Next-Edit 1.5B outperforms existing edit prediction providers on next-edit benchmarks — including models 4x its size. At only 1.5B parameters (1.55 GB at 8-bit quantization), it runs on consumer hardware with sub-500ms latency. It's one of the best models for self-hosting edit predictions.
What problem does this solve?
The self-hosted Sweep Next-Edit model is not supported because the edit history and cursor context is not sent when using self-hosted model.
What becomes easier or possible?
It adds possibility of running self-hosted Sweep Next-Edit model.
Are there any examples or context?
Possible approach
Adding support would involve:
sweep_next_editas a new variant inEditPredictionPromptFormatEditPredictionModelInputto construct Sweep's prompt (recent diffs as original/updated blocks + 10-line sliding window around cursor, structured with <|file_sep|> tokens)compute_edits()Beta Was this translation helpful? Give feedback.
All reactions