Thursday, 20 August 2026 | Updating Daily AI insight, written for builders

LM Studio: Complete Guide to Running Local AI Models

TL;DR:

  • LM Studio is a free desktop application for running large language models locally on your computer without coding or command-line work
  • Download models directly from Hugging Face through the built-in browser, supports GGUF format with automatic quantization selection
  • Includes chat UI, local API server (OpenAI-compatible), and automatic hardware acceleration (CUDA, Metal, CPU)
  • Requires sufficient VRAM/RAM based on model size—typically 8GB minimum for 7B models, 24GB+ for 13B models

LM Studio is a desktop application that lets you download, run, and interact with large language models on your own computer. It provides a graphical interface for tasks that would otherwise require command-line tools, making local AI accessible to developers and technical users who want full control over their models without sending data to external APIs. The application handles model discovery, downloading, quantization selection, and hardware acceleration automatically.

Unlike cloud-based AI services, LM Studio runs entirely offline once you’ve downloaded a model. Your conversations, documents, and prompts never leave your machine. This makes it suitable for sensitive work, experimentation without API costs, and environments with limited or no internet connectivity.

Installation

Windows

Download the installer from lmstudio.ai. The .exe installer is typically 200-400MB. Run it and follow the setup wizard. LM Studio will install to C:Users[YourUsername]AppDataLocalLM-Studio by default. Models download to C:Users[YourUsername].cachelm-studiomodels unless you change the path in settings.

For GPU acceleration on Windows, you need NVIDIA drivers version 522.06 or newer for CUDA support. LM Studio will automatically detect and use your GPU if available.

macOS

Download the .dmg file from lmstudio.ai. Open it and drag LM Studio to your Applications folder. Models download to ~/Library/Application Support/LMStudio/models by default.

Apple Silicon Macs (M1, M2, M3, M4) get automatic Metal acceleration. Intel Macs will use CPU inference, which is significantly slower but functional for smaller models.

Linux

Download the .AppImage file. Make it executable with chmod +x LM-Studio-*.AppImage, then run it with ./LM-Studio-*.AppImage. Models download to ~/.cache/lm-studio/models.

For NVIDIA GPU acceleration, install CUDA toolkit 11.8 or newer and ensure nvidia-smi shows your GPU. LM Studio will detect CUDA automatically.

Downloading and Loading Models

LM Studio uses the GGUF format, a quantized model format that reduces memory requirements while maintaining quality. When you open LM Studio, click the search icon in the left sidebar to browse models. The built-in search pulls from Hugging Face and filters for compatible GGUF files.

Search for a model by name (e.g., “llama 3.1”, “mistral”, “phi”). Each result shows multiple quantization levels, labeled like Q4_K_M, Q5_K_S, or Q8_0. The number indicates bit depth—Q4 uses 4 bits per weight, Q8 uses 8 bits. Lower numbers mean smaller file size and faster inference, but slightly reduced quality.

For most use cases, Q4_K_M or Q5_K_M offers the best balance. Use our VRAM calculator to estimate how much memory a specific model and quantization will require. As a rough guide:

Model SizeQ4_K_M VRAMQ5_K_M VRAMQ8_0 VRAM
7B parameters~5GB~6GB~9GB
13B parameters~9GB~11GB~16GB
34B parameters~22GB~27GB~40GB
70B parameters~42GB~51GB~75GB

Click the download icon next to your chosen quantization. Models range from 3GB to 50GB+ depending on size. Once downloaded, click the model name in your library to load it. LM Studio will show GPU and RAM allocation in the bottom-right corner. If the model doesn’t fit in VRAM, it will offload layers to system RAM, which slows inference significantly.

Using the Chat Interface

After loading a model, the chat interface appears in the main window. Type your prompt in the text box at the bottom and press Enter or click the send icon. The model generates a response locally—no internet required once loaded.

Key controls:

  • Temperature slider (right sidebar): controls randomness. 0.1-0.3 for factual tasks, 0.7-1.0 for creative writing
  • Max tokens: limits response length. Default is usually 2048; increase for longer outputs
  • System prompt: sets the model’s behavior and persona. Click “Edit” in the top bar to modify
  • Stop sequences: tokens that halt generation early, useful for structured output formats

LM Studio supports multi-turn conversations. Each message stays in context until you click “New Chat” or the context window fills. Most models have a 4k-32k token context window—check the model card for specifics.

Running a Local API Server

LM Studio includes an OpenAI-compatible API server, letting you use local models as drop-in replacements for GPT-4 or GPT-3.5 in existing applications. Click the </> icon in the left sidebar to open the Local Server tab.

Select a loaded model from the dropdown and click “Start Server”. The server runs on http://localhost:1234 by default. The UI shows a code example:

curl http://localhost:1234/v1/chat/completions 
  -H "Content-Type: application/json" 
  -d '{
    "model": "local-model",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Any tool that supports OpenAI’s API format works with LM Studio’s server. Set the base URL to http://localhost:1234/v1 and use any non-empty string as the API key (LM Studio doesn’t validate it). This includes:

  • LangChain (Python/JS): set openai_api_base to localhost
  • OpenAI Python SDK: openai.api_base = "http://localhost:1234/v1"
  • Text editors with AI features (Cursor, Continue, Cody): point to localhost in settings
  • Custom scripts: replace https://api.openai.com/v1 with http://localhost:1234/v1

The server supports streaming responses and function calling (if the model was trained for it). Check logs in the Server tab to debug requests.

Configuration and Hardware Settings

Click the gear icon (Settings) in the bottom-left corner to adjust:

  • Model folder path: change where models download and load from
  • GPU offload layers: controls how many layers run on GPU vs CPU. Auto-detect works well, but manual adjustment helps if you’re running multiple programs
  • Context length override: increase if the model supports it and you need longer conversations. Higher context uses more VRAM
  • Inference threads: CPU thread count for inference. Default is auto, but setting it to physical core count (not hyperthreaded) can improve speed

For best performance, close other GPU-heavy applications (games, video editing, 3D rendering) before loading large models. On laptops, plug in and set power mode to high performance—CPU/GPU throttling significantly impacts inference speed.

LM Studio vs Ollama

LM Studio and Ollama both run local models, but differ in interface and workflow:

FeatureLM StudioOllama
InterfaceDesktop GUICommand-line + API
Model discoveryBuilt-in browserSeparate model registry
FormatGGUF filesCustom format (converts from GGUF)
Quantization controlChoose specific quantAutomatic
Chat UIBuilt-inNone (use external tools)
Learning curveLower (visual)Steeper (CLI)

Use LM Studio if you want a visual interface, direct model file control, and don’t want to touch a terminal. Use Ollama if you prefer CLI workflows, want a lightweight server, or are integrating into a scripted pipeline. Both are free and handle GPU acceleration similarly. See our guide to local models for recommendations that work with either tool.

Choosing Models for LM Studio

The model you choose depends on your hardware and use case. Check our AI models database for specs and VRAM requirements across 37+ models.

For 8-16GB VRAM: Llama 3.1 8B, Mistral 7B, Phi-3 Medium (14B). These handle general chat, coding assistance, and summarization well.

For 24GB VRAM: Llama 3.1 70B (Q3 quant), Mixtral 8x7B, Command R+ 35B (Q4). Significant quality jump for reasoning and complex instructions.

For 48GB+ VRAM: Llama 3.1 405B (Q3), Qwen 2.5 72B (Q5). Near-frontier performance for most tasks.

If you’re unsure whether a model fits your hardware, use the VRAM calculator before downloading. A model that barely fits will offload to RAM and run 5-10x slower than one fully loaded in VRAM.

Frequently Asked Questions

Does LM Studio work offline?

Yes, completely. You need internet to download models initially, but once downloaded, LM Studio runs with no network connection. Models, inference, and the local API server all work offline. This makes it suitable for air-gapped environments or working without connectivity.

Can I use LM Studio models in my own applications?

Yes. Start the local API server in LM Studio and point your application to http://localhost:1234/v1. Any code that uses the OpenAI API format will work without modification. You can also load GGUF files directly in your code using libraries like llama.cpp, llama-cpp-python, or ctransformers—LM Studio’s model downloads are standard GGUF files stored in your cache folder.

How much does LM Studio cost?

LM Studio is free. There are no subscription fees, API charges, or usage limits. The models themselves are also free—most are open-source with permissive licenses (MIT, Apache 2.0, Llama 3.1 Community License). Your only costs are hardware and electricity. Use our self-hosting vs API calculator to compare local inference costs against cloud API pricing.

Why is inference slow on my machine?

Three common causes: (1) Model doesn’t fit in VRAM and is offloading to RAM—check the memory display in LM Studio and try a smaller quantization or model. (2) GPU isn’t detected—verify drivers (Windows/Linux) or that you’re on Apple Silicon (macOS). (3) CPU throttling on laptops—plug in and set to high-performance mode. Inference speed scales roughly with VRAM bandwidth, so older or mobile GPUs will be slower than desktop cards even with enough memory.

Can I fine-tune or train models in LM Studio?

No. LM Studio is inference-only—it loads and runs pre-trained models but doesn’t support training or fine-tuning. For that, you need training frameworks like Axolotl, Hugging Face Transformers, or MLX (Apple Silicon). You can fine-tune a model elsewhere, export it to GGUF format, and then load the fine-tuned GGUF in LM Studio.

What’s the difference between Q4_K_M, Q5_K_S, and other quantization labels?

The number (Q4, Q5, Q8) indicates bits per weight—lower is smaller and faster, higher is more accurate. The suffix indicates the quantization method: K_M (medium, balanced), K_S (small, more aggressive compression), K_L (large, preserves more precision). For most users, Q4_K_M or Q5_K_M is the sweet spot. Only use Q2 or Q3 if VRAM is extremely limited; quality degrades noticeably. Q8 is near full-precision but offers little quality gain over Q5 for most tasks while doubling the VRAM requirement.

Written by Mustafa Ihsan

Mustafa Ihsan is the founder and editor of Convly.ai. He built and maintains the site's live AI models database, its price-performance index, and its free calculators for VRAM requirements, API costs and self-hosting economics. He writes about model pricing, benchmark results and the hardware needed to run AI models locally, and consistently prefers measured numbers to vendor claims.

Scroll to Top
Featured on There's An AI For That