Skip to content
Courses/Claude Code + Local AI/LM Studio from Scratch: Install and Run Local AI

LM Studio from Scratch: Install and Run Your First Local AI

LM Studio lets you download and run AI models on your own computer through a visual interface. In this lesson you will choose a model that fits, test a local chat, start the API server, and save evidence another person can reproduce. Editorial review: September 4, 2026.

What you will prove

  • The model is stored and can be loaded on your machine.
  • Local chat works without a paid inference API.
  • The server responds on localhost:1234.
  • Another application can use an OpenAI-compatible endpoint.

LM Studio is not the model

LM Studio is the application and runtime layer. Qwen, Gemma, Mistral, Llama, and other families are models it can load. Memory use depends on the model, format, quantization, context, caches, runtime, and the rest of your system.

LM Studio or Ollama?

LM Studio makes model discovery, loading, and configuration visible in a GUI. Ollama is especially convenient for terminal workflows and automation. You do not need a universal winner: testing a similar model in both helps separate model quality from runtime experience.

Ollama from Scratch

Check compatibility before downloading

  • macOS: Apple Silicon M1-M4 and macOS 14 or newer. Intel Macs are currently unsupported.
  • Windows: x64 with AVX2 or supported ARM systems. 16 GB RAM and 4 GB dedicated VRAM are current recommendations, not guarantees.
  • Linux: x64 or ARM64; the desktop app is distributed as AppImage and documents Ubuntu 20.04 or newer.

Start with a small instruct model, roughly 1B-8B, and a modest 4K-8K context. The goal is to verify the stack, not to force the largest model into memory.

Install LM Studio and verify lms

Download LM Studio only from the official website, open it at least once, then open a new terminal. The lms CLI ships with the application and needs no separate installation.

Download LM Studio

Terminal
lms --help
lms ls
lms ps

Download and load one model

In Discover, choose one chat or instruct variant. Record its size, format, quantization, and license. GGUF variants such as Q4, Q5, and Q8 trade memory against fidelity; Apple Silicon can also use supported MLX models. Do not download several variants just to complete this lesson.

Load the model with conservative settings and ask: Explain local AI in one sentence. Then use lms ps to record the loaded model identifier.

Terminal
lms ps

Start the local API server

Open Developer and enable Start Server, or use the CLI. The official examples use port 1234. Keep Serve on Local Network disabled for this first test.

Terminal
lms server start
lms server status

Do not bind to 0.0.0.0 for this exercise. LM Studio 0.4.0 and newer can require API tokens, but localhost-only testing does not need network exposure.

Verify /v1/models

Terminal
curl http://127.0.0.1:1234/v1/models

Copy the exact model id from the JSON response. Do not guess it.

Generate through the API

Terminal
curl http://127.0.0.1:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_IDENTIFIER",
    "messages": [{"role": "user", "content": "Explain local AI in one sentence."}],
    "temperature": 0.2
  }'

If /v1/models lists the model and /v1/chat/completions returns content inside choices, you have a local inference layer another application can use.

Why use /v1 endpoints?

LM Studio supports OpenAI-compatible Models, Responses, Chat Completions, Embeddings, and other endpoints. Existing clients can often switch their base URL to http://localhost:1234/v1. Compatibility is endpoint-specific and does not make every remote-provider feature identical.

Local does not automatically mean private

After downloading and loading the model, disconnect the network temporarily and repeat a chat. A response demonstrates offline inference. Model search, downloads, updates, cloud features, web search, or remote MCP servers can still use the network. Evaluate each request's model, URL, tools, and data path.

Fast diagnosis

  • Model will not load: choose a smaller model, lighter quantization, or shorter context.
  • Connection refused: check lms server status and start the HTTP server.
  • Chat works but curl fails: the app can chat while the API server is stopped.
  • Port 11434: that is commonly Ollama; these LM Studio examples use 1234.
Terminal
lms ls
lms ps
lms server status
lms log stream

Save reproducible evidence

Terminal
Date and operating system:
CPU / RAM / GPU:
LM Studio version:
Model / format / quantization / context:
Local chat: PASS / FAIL
/v1/models: PASS / FAIL
/v1/chat/completions: PASS / FAIL
Time to first response:
Problem found and next change:
Official source checked:

Official sources checked September 4, 2026

LM Studio system requirements

lms CLI

Local API server

API token authentication

OpenAI-compatible endpoints

LM Studio app privacy

How this course fitsOpen the map only when you need it.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue