Skip to main content
Local providers run AI models on your hardware, offering free, private AI with no API costs.

Hardware Requirements

Running local models requires significant RAM/VRAM:
  • Capable coding models (30B+ parameters) need 24GB+ VRAM or unified memory (Apple Silicon M2 Pro/Max and above)
  • Smaller models run on less hardware but may struggle with complex coding tasks
  • Systems with limited VRAM: Ollama’s cloud models are an excellent free alternative — they run on Ollama’s servers with no local GPU needed

Ollama

Ollama runs models locally (free) or on Ollama’s cloud (no GPU needed).

Installation

Ollama 0.15+ can auto-configure Claude Code:

Cloud Models (No GPU Required)

Cloud models run on Ollama’s infrastructure — ideal if your system doesn’t have enough VRAM for local models. Pull the manifest first (tiny download, the model runs remotely):

Available Cloud Models

See Ollama cloud models for the full list.

Local Models (Free, Private)

Local models require sufficient VRAM — 24GB+ recommended for capable coding models.

Model Aliases

Create aliases for tools expecting Anthropic model names:

Configuration

Override defaults in ~/.ai-runner/secrets.sh:
By default, Ollama uses the same model for both main and background operations to avoid VRAM swapping. Only set OLLAMA_SMALL_FAST_MODEL if you have 24GB+ VRAM.

Auto-Download Feature

When you specify a model that isn’t installed locally, Andi AIRun offers a choice between local and cloud:
For systems with limited VRAM (< 20GB), cloud is recommended first.

Usage Examples

Ollama Anthropic API Compatibility

Learn more about Ollama’s Anthropic API compatibility

LM Studio

LM Studio runs local models with Anthropic API compatibility. Especially powerful on Apple Silicon with MLX models. Requires sufficient RAM/VRAM for the model you choose.

Advantages Over Ollama

  • MLX model support (significantly faster on Apple Silicon)
  • GGUF + MLX formats supported
  • Bring your own models from HuggingFace

Installation

Download from lmstudio.ai

Setup

  1. Download a model in LM Studio (e.g., from HuggingFace)
  2. Load the model in LM Studio UI
  3. Start the server:
    Or start from the LM Studio app’s local server tab.
  4. Run Andi AIRun:
For Claude Code, use models with:
  • 25K+ context window (required for Claude Code’s heavy context usage)
  • Function calling / tool use support
Examples:
  • openai/gpt-oss-20b - Strong general-purpose
  • ibm/granite-4-micro - Fast, efficient

Apple Silicon Optimization

LM Studio supports MLX models which are significantly faster than GGUF on M1/M2/M3/M4 chips. When downloading models, look for MLX versions for best performance.
MLX models can be 2-3x faster than GGUF on Apple Silicon due to optimized metal acceleration.

Configuration

Override defaults in ~/.ai-runner/secrets.sh:
By default, LM Studio uses the same model for all tiers and background operations to avoid model swapping.

Context Window

Configure context size in LM Studio:
  • UI: Settings → Context Length
  • Minimum recommended: 25K tokens
  • Higher is better for complex coding tasks

Auto-Download Feature

When you specify a model that isn’t available, Andi AIRun will offer to download it:

Usage Examples

LM Studio Claude Code Guide

Learn more about using LM Studio with Claude Code

Comparison: Ollama vs LM Studio

Next Steps

Cloud Providers

Configure cloud providers for more powerful models

Switching Providers

Learn to switch between providers seamlessly