Code2LoRA turns a repository into a tiny adapter for open-weight coding models. Your assistant knows your code without re-reading it on every request, so you pay for fewer tokens, get faster answers, and keep every line on your own hardware.
Estimate the repository context you stop paying for when that knowledge lives in an adapter instead of the prompt.
Illustrative estimate assuming 21 workdays/month and that the adapter replaces the repository context you send today. Code2LoRA adds zero repository tokens per request. Your pilot measures the real number on your own codebase.
To work on your codebase, today's assistants search it and paste the results into the prompt, then do it again on the next request, and the next.
Context tokens grow with repository size × engineers × requests. Agents multiply it again. The bill grows faster than the team.
Thousands of context tokens must be processed before the first word comes back. Developers feel it on every completion.
Every request ships proprietary source to someone's API. In regulated teams that blocks adoption entirely, and self-hosted models don't know your code.
A hypernetwork, trained once on hundreds of repositories, reads your code and writes a small adapter for the model. No training runs on your side and no context stuffing.
Code2LoRA reads the code and its git history locally. Encoding runs on CPU; the large model is never loaded for this step.
The hypernetwork writes a LoRA adapter for your repository in a single pass. No gradient steps and no per-repository training job.
The adapter plugs into an open-weight coding model on your GPUs or a laptop CPU. Prompts stay short; repository knowledge is already in the weights.
One adapter from one state of the code, in one pass.
An adapter that follows your commit history and updates incrementally as the code changes.
Pick your seat at the table. Each one comes with the setup we recommend and what a pilot looks like.
Measured on RepoPeftBench: 604 real Python repositories, with tests on repositories the model never saw during training.
exact match on unseen repositories
vs. 54.1% for fine-tuning + retrieval, the strongest baselineover retrieval-augmented generation
63.8% vs. 47.6% exact match, with no retrieved tokenson known repositories
matches a LoRA trained per repository (64.0%), with zero trainingon code created after training
Live engine; best of every method on post-cutoff repositories| Retrieval (RAG) | Full fine-tuning | LoRA per repository | Code2LoRA | |
|---|---|---|---|---|
| Extra tokens per request | Up to 1,536+ | 0 | 0 | 0 |
| Setup per repository | Build and maintain an index | Retrain the model (~4 h) | ~5 min GPU training each | <10 ms generation, no training |
| Storage per repository | Chunk index | Shared 3.1 GB model | 37 MB | 8 KB |
| Keeps up with new commits | Re-index | Retrain | Retrain | Incremental update per commit |
| Works on a repo it's never seen | Yes · 47.6% | Yes · 51.4% | No | Yes · 63.8% |
Exact-match accuracy on test-assertion completion, Qwen2.5-Coder-1.5B base model. Full methodology, baselines and significance tests in the paper.
Code2LoRA was designed around open-weight models you run yourself. Nothing about it requires a network connection to us.
Air-gap capable. Set C2L_OFFLINE=1 and nothing calls out once models are cached.
Adapter generation runs on CPU; serving runs on your GPUs or quantized on a laptop. No vendor in the loop.
Repository knowledge sits in a small adapter file you own, not in prompts copied to someone else's logs.
One adapter per repository or client. Delete the file and that knowledge is gone from the system.
Published method, open checkpoints, MIT-licensed CLI. Your security team can read exactly what runs.
We run pilots with your security, platform and engineering leads in the room from day one.
Start free on a laptop. Scale to your org, your product, or your clients.
An AI coding assistant in your terminal that knows your repository. Runs on a laptop.
pip install code2loraOrg-wide deployment inside your network, wired into CI so adapters stay current.
Embed repository-specific adapters in your product, one per customer repository.
Run Code2LoRA for many clients with strict isolation, under your brand.
| You are… | Start with | Engine | Where it runs | First measurable win |
|---|---|---|---|---|
| Engineering leader | Enterprise pilot | Live | Your network / CI | Lower AI spend per engineer, approved by security |
| AI DevTool / PLG company | SDK pilot | Live + Snapshot | Your serving stack | Lower context COGS and latency per request |
| Consultancy | Partner pilot | Snapshot | Laptops or client infra | Faster ramp-up on a new client codebase |
| Managed service provider | Partner pilot | Live + Snapshot | Your or client infra | Predictable cost per request across clients |
| Individual developer | Terminal (free) | Live | Your laptop | An assistant that knows your repo, offline |
More teams run Qwen and other open-weight coding models locally for privacy and cost. Code2LoRA is the missing piece that makes them good on your codebase. It comes out of research at the University of Waterloo, led by founder Liliana Hotsko.
The free terminal assistant generates an adapter for any Python repo on your laptop. No account, no API key.
GitHub · PyPI · Browser demo
No. Adapter generation and serving both run on your machines, and the offline mode (C2L_OFFLINE=1) blocks network access once models are cached. We never need access to your repository.
Today: Python repositories with the Qwen2.5-Coder open-weight model. New languages and models are trained with design partners. Tell us your stack and we'll tell you how close it is.
For repository knowledge, it removes the need to paste context on every request. On our benchmark Code2LoRA beats retrieval by 16 points with zero retrieved tokens. You can still combine it with retrieval for the latest uncommitted changes.
Adapter generation runs on CPU. The terminal works on a laptop with 8 GB of RAM using a quantized model. In production, adapters plug into your existing GPU serving, or a CPU server with enough memory.
The Live engine keeps a compact state of your commit history. Each new commit updates the adapter incrementally instead of rebuilding it. You choose the cadence: per commit, per merge, or on a schedule.
Free for design partners. We set up Code2LoRA on one repository and team, you use it for a week on real work, then we review the measured token savings, latency and accuracy with you and your stakeholders.
The terminal CLI is MIT-licensed, and the research checkpoints and benchmark are public on Hugging Face. Enterprise, SDK and partner deployments are commercially licensed.
One week on your own repository. We measure the savings together, and the pilot is free.