CodeFinetuner: Fine-tune a local code autocomplete model on your own codebase
CodeFinetuner is a new tool that allows users to fine-tune a small code autocomplete model, such as Qwen2.5-Coder-3B, on their own codebase. Developed over several months, this full pipeline supports LoRA fine-tuning on Mac (MPS) and NVIDIA GPUs (CUDA), with optional Unsloth integration for improved training speed and reduced VRAM usage. The resulting GGUF model can then be used locally with tools like llama.vim or llama.vscode.
Why this oneThis tool uniquely offers a full pipeline for local LoRA fine-tuning of code autocomplete models on personal codebases, unlike many solutions focused on general-purpose models.
Time & source
Times shown in UTC
Display time zone: UTC
Local time zone unavailable; showing UTC.
PublishedOffset at this time: UTC+0Sep 11, 2026, 18:56 UTC
IngestedOffset at this time: UTC+0Sep 12, 2026, 15:01 UTC
- Published
- Sep 11, 2026, 18:56
- Ingested
- Sep 12, 2026, 15:01
- Source type
- Dev community
- Tier
- Community
- Source status
- Healthy
Tier is a per-source editorial setting, not a per-item score.
I was interested in learning LoRA fine-tuning, and ended up building CodeFinetuner over the past few months, a full pipeline that fine-tunes a small code autocomplete model (e.g. Qwen2.5-Coder-3B) specific to a codebase. You can then use the resulting GGUF model via llama.vim/llama.vscode and run it fully locally. Supports fine-tuning on Mac (MPS) and NVIDIA GPUs (CUDA), with optional Unsloth support for faster training and lower VRAM usage.
Pipeline: raw code -> tree-sitter parsing into Structure-Aware FIM examples -> LoRA fine-tuning -> evaluation (CodeBLEU, edit similarity, exact match, perplexity, ...) -> GGUF conversion for local inference.
Create a data folder and place your repo (or code files) inside. For auto-split just drop the files in directly, for manual split create data/train/, data/eval/, data/test/ subfolders and set split_mode: "manual". Get the default config with:
curl -L -O https://raw.githubusercontent.com/cuolm/codefinetuner/master/config/codefinetuner_config.yaml
The example runs in the repo show clear improvements over the base model on these evaluation metrics, but using the model for autocomplete on code you're actively writing is a different thing from scoring well on a test set, and the autocomplete tools themselves (llama.vim/llama.vscode) sample differently from the greedy decoding used in the evaluation. So the real usefulness still has to be verified in the editor itself.
Might also be useful just as a reference, since it's a complete working LoRA fine-tuning pipeline end to end.