A small edit-prediction model for Zed, distilled from zed-industries/zeta-2.1 (8B) into LiquidAI/LFM3-1.7B-Base. It uses the same Zeta 2.1 prompt format, so it is a drop-in replacement for Zeta 2.1 in Zed's Ollama edit-prediction provider. It's built to run locally on a modest GPU.
This is an experimental hobby model and is not affiliated with Zed Industries or Liquid AI.
This project was built with assistance from Claude Opus 5.5 by Anthropic. Claude was used to build part of the tooling used for this distillation and to evaluate the results. Claude also wrote the rest of this README file. I am a hobbyist with little experience developing artificial intelligence software.
| File | Size | Same output as bf16 | Same edit/no-edit decision |
|---|---|---|---|
zeta-2.1-distill-lfm3-1.7b-bf16.gguf |
3.5 GB | — | — |
zeta-2.1-distill-lfm3-1.7b-q8_0.gguf |
1.8 GB | 98.5% | 100% |
zeta-2.1-distill-lfm3-1.7b-q6_k.gguf |
1.4 GB | 94% | 99% |
zeta-2.1-distill-lfm3-1.7b-q5_k_m.gguf |
1.3 GB | 87.5% | 98.5% |
zeta-2.1-distill-lfm3-1.7b-q4_k_m.gguf |
1.1 GB | 82.5% | 97% |
Agreement measured on 200 held-out prompts. Q8_0 is the recommended file; the smaller quants are only slightly faster, because a model this small is not limited by memory bandwidth.
Running the model requires a llama.cpp recent enough to know the lfm3 architecture.
ollama pull hf.co/Mafrans/Zeta-2.1-Distill-LFM3-1.7B-GGUF:Q8_0
The repo ships Ollama template and params files: a raw prompt template, the stop
token <[end▁of▁sentence]>, temperature 0, repeat_penalty 1.0, and num_ctx 4096.
The default repeat_penalty (1.1) hurts this model, because most of every response
copies the editable region back out.
In Zed's settings.json:
"edit_predictions": {
"provider": "ollama",
"ollama": {
"prompt_format": "zeta2_1",
"model": "hf.co/Mafrans/Zeta-2.1-Distill-LFM3-1.7B-GGUF:Q8_0"
}
}
Note: some Zed versions send a small num_predict (64) with each request. That cuts
longer rewrites off before their closing marker, so Zed shows no prediction for them.
Run the model with llama-server:
llama-server -hf Mafrans/Zeta-2.1-Distill-LFM3-1.7B-GGUF:Q8_0 -ngl 99 -c 4096 --temp 0 --port 8080
Then point Zed's OpenAI-compatible provider at it:
"edit_predictions": {
"provider": "open_ai_compatible_api",
"open_ai_compatible_api": {
"api_url": "http://localhost:8080/v1/completions",
"model": "zeta-2.1-distill-lfm3-1.7b",
"prompt_format": "zeta2_1",
"max_output_tokens": 768
}
}
With this provider, max_output_tokens sets the response limit, so the num_predict problem
above doesn't apply. llama-server's own speed is a bit better than Ollama's: on an RX 7900 GRE
(Vulkan backend, Q8_0), the median response takes 0.46 s against 0.54 s with Ollama.
Avoid llama.cpp's n-gram speculative decoding (--spec-type ngram-*) for now. It speeds
this model up by about a third, but it also makes llama-server hang after a few hundred
requests, apparently while rolling back the LFM3 convolution state.
3,300 held-out benchmark prompts (300 per language), Q8_0 via Ollama, greedy decoding. "Teacher" is Zeta 2.1's responses to the same prompts.
| Student | Teacher | Always no-edit | |
|---|---|---|---|
| Same edit/no-edit decision as the teacher | 86.1% | — | 43.2% |
| Same resulting file as the teacher | 56.7% | — | 43.2% |
| Same resulting file as the real next commit edit | 8.8% | 11.1% | 0.2% |
| Malformed responses | 0.5% | 2.8% | 0% |
By mode: right after an edit (mode A), the student agrees with the teacher's edit/no-edit decision 81.4% of the time. While the user is typing (mode B), it agrees 93.4% of the time. For reference, re-running Zeta 2.1 itself (Q5_K_M, greedy) on 257 of these prompts reproduced its labels' edit/no-edit decision 97.6% of the time and the exact resulting file 88.5% of the time.
Speed on an RX 7900 GRE (Ollama, Q8_0): about 170 tokens/s. The median response takes 0.55 s and the 90th percentile takes 1.0 s. Almost all of that time is spent generating the response, because the format rewrites the whole editable region even for small edits.
The model weights are a derivative of LFM3-1.7B-Base and are distributed under the LFM Open License v1.0. This includes Liquid AI's commercial-use revenue threshold; see the license for details. These files were modified from the original: they were fine-tuned as described above and converted to GGUF. The teacher, Zeta 2.1, is Apache-2.0.
The training prompts contain code from public repositories under their own licenses, as recorded in CommitPack. About 92% of the training rows come from permissively licensed repositories (MIT, Apache-2.0, BSD and others). The remaining rows come from copyleft licenses, mostly AGPL-3.0, MPL-2.0 and LGPL-2.1. No training data is redistributed here.