Home / Blog / Free AI models for coding: local and hosted options
Local models · Free

Free AI models for coding: local and hosted options

Paying per token adds up when an agent rereads your files all day. There are two honest ways to code with AI without that bill: run a model on your own computer, or use the free allowances that some hosted providers offer. Both work, and both have limits worth knowing before you start.

Two routes to free

RouteWhat you needMain limits
Local modelA reasonably powerful computer and a program to run the modelSpeed and quality depend on your hardware
Hosted free tier or free modelAn account with a provider or aggregatorUsage caps, and terms that can change at any time

Local models with Ollama and LM Studio

A local model is a file you download and run on your own machine. Nothing leaves your computer, it works offline, and there is no charge per request. You pay only in electricity and patience.

Two programs make this simple. Ollama is a tool, driven mostly from the command line, that downloads open models and runs them. LM Studio is a desktop app that does the same with a graphical interface. Each can run a small server on your machine that a code editor connects to, the same way it would connect to a hosted provider.

The models themselves come from open families such as Llama, Qwen, DeepSeek, Mistral and others. Many have versions tuned for code.

What hardware matters

In general terms, three things decide what you can run.

  • Memory. This is the main limit. The model has to fit in memory: video memory on a graphics card, or the shared memory of an Apple silicon Mac. More memory means you can run a larger model.
  • Model size. Size is counted in parameters, the numbers inside the model. Larger models follow multi-step tasks more reliably and need more memory.
  • Quantisation. This is a way of compressing a model so it needs less memory, at some cost in quality. Most local models are offered in several compression levels.

Two more points catch people out. The context window, meaning how much text the model can consider at once, also uses memory, so a long conversation needs more of it. And a model that fits but runs slowly is tiring to use with an agent, because an agent makes many requests per task.

We give no specific numbers here because they change with every model release. The model's own page and the Ollama or LM Studio listing say what each one needs.

What local models do well and badly

Local models are good at contained work: explaining a file, writing a function, drafting tests, fixing a clear error. They struggle more with long tasks that span many files and many steps.

Check one thing before anything else: tool calling, the ability to ask the editor to read a file or run a command. An agent depends on it. Some local models do not support it and can only chat. Pick a model whose listing says it supports tools.

Hosted free tiers and free models

Some hosted providers give each account a free allowance. Some aggregators, which are services that offer many models through one account, list certain models at no charge. Some coding tools include a free plan with a limited amount of model use.

These offers are real and useful, but they are not stable. Which models are free, how many requests you get, and how fast they answer can change without notice. Check the provider's current page before you plan a project around one. Read the data terms too: free and paid usage are sometimes treated differently in how prompts may be stored or used.

A sensible low-cost setup

  • Use a local model for routine edits, explanations and anything private.
  • Keep a hosted model for the hard problems: planning, a stubborn bug, a large change.
  • Give precise, small tasks. Smaller models do far better with a narrow request.
  • Start a new conversation often, so the context stays short and fast.

This mix usually costs far less than running a large hosted model for everything. How to choose a model for coding explains the trade-offs behind it.

Using free models in VibeCode.surf

VibeCode.surf, a desktop AI code editor in beta, treats local models as a normal provider. Add Ollama or LM Studio in Settings, fetch the model list and pick one; no key is needed and local usage is counted as free. Any server that speaks the OpenAI chat format can be added by its address. Each agent can use a different model, so helpers can run locally while a lead agent uses a hosted one. If a local model cannot call tools, the app says so and falls back to plain chat. See the local models guide and the bring-your-own-key guide.

The app itself is free during the beta and needs a free account; projects, chats and keys stay on your computer. It does not yet have tab completion or inline AI edits, which is where many people use small local models in other editors. You can install it with one command. macOS is the tested platform, and the Windows and Linux builds are new.

Questions

Good to know

Can I really code with AI for free?

Yes. A local model costs nothing per request, and some hosted services have free allowances. Expect lower speed or quality than a large paid model, and usage caps on hosted free tiers.

What computer do I need for local models?

Memory matters most: video memory on a graphics card or the shared memory of an Apple silicon Mac. More memory lets you run larger, more capable models. Each model listing states its requirements.

Are local models private?

Yes, in the sense that your prompts and code are processed on your own machine and are not sent to a hosted model provider.

Why does my local model only chat and not edit files?

It probably does not support tool calling, which agents need in order to read and change files. Choose a model whose listing says it supports tools.

Drop in

Install it from your terminal.

One command installs the desktop app on macOS, Windows or Linux. Free during the beta; bring your own API key or a local model.

curl -fsSL https://vibecode.surf/install.sh | sh
irm https://vibecode.surf/install.ps1 | iex
curl -fsSL https://vibecode.surf/install.sh | sh