LM Studio
Beautiful desktop app for running LLMs locally. Download models from Hugging Face, chat with a GUI, and expose an OpenAI-compatible API—all without writing code.
Why LM Studio?
No Code Required
ChatGPT-like interface. Download, configure, and chat through a GUI.
100% Offline & Private
All data stays on your machine. No cloud, no subscription.
Local API Server
OpenAI-compatible API for integration with your apps.
Hugging Face Integration
Browse and download GGUF models directly from the app.
Installation
Download from lmstudio.ai
macOS
Intel & Apple Silicon
Windows
GPU acceleration included
Linux
AppImage format
Getting Started
Download a Model
Go to "Discover" tab → Search for a model (e.g., "llama 3.1") → Click Download
Load the Model
Go to "Chat" tab → Select your downloaded model from the dropdown
Start Chatting
Type your message and chat. Adjust temperature, system prompt as needed.
Recommended Models
| Model | RAM Needed | Best For |
|---|---|---|
| Llama 3.1 8B Q4 | ~6 GB | General use, fast |
| Mistral 7B Q4 | ~5 GB | Efficient, European languages |
| DeepSeek-R1 7B | ~5 GB | Reasoning, math |
| Phi-4 Q4 | ~8 GB | Microsoft, reasoning |
| Mixtral 8x7B Q4 | ~26 GB | High quality, MoE |
| Llama 3.2 Vision | ~7 GB | Image understanding |
Local API Server
LM Studio can serve an OpenAI-compatible API at localhost:1234.
1. Start the Server
Go to "Local Server" tab → Load a model → Click "Start Server"
2. Use with Python
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:1234/v1",
api_key="lm-studio" # Any string works
)
response = client.chat.completions.create(
model="local-model", # Use any name
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain machine learning"}
]
)
print(response.choices[0].message.content)
3. Use with cURL
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "local-model",
"messages": [{"role": "user", "content": "Hello!"}]
}'
CLI & Headless Mode
Since 2024, LM Studio supports command-line and headless operation (no GUI).
# List downloaded models lms ls # Start server in headless mode (no GUI window) lms server start # Load a specific model lms load llama-3.1-8b-instruct # Check server status lms status
LM Studio vs Ollama
| Aspect | LM Studio | Ollama |
|---|---|---|
| Interface | Full GUI | CLI-first |
| Model Source | HuggingFace (GGUF) | ollama.com library |
| Best For | Beginners, exploration | Developers, scripts |
| API Port | localhost:1234 | localhost:11434 |
| Model Downloads | Manual via GUI | Auto on first run |
💡 Tip: Many users install both! LM Studio for exploration and Ollama for automation.