LM Studio Setup Guide

LM Studio is a user-friendly desktop application for running local large language models, letting you easily run open-source AI models without using command lines.

What is LM Studio?

LM Studio is a desktop application designed for running large language models locally:

  • Graphical interface: Intuitive UI, no command-line knowledge needed
  • Model marketplace: Built-in model search and download functionality
  • Local server: One-click startup for OpenAI-compatible API service
  • Cross-platform: Supports Windows, macOS, Linux

Installing LM Studio

Step 1: Download the Installer

  1. Visit the LM Studio website
  2. Click "Download"
  3. Choose the installer for your system:
    • Windows: .exe installer
    • macOS: .dmg package
    • Linux: .AppImage file

Step 2: Install the Application

Windows: Run the downloaded .exe file and follow the prompts

macOS: Open the .dmg file and drag LM Studio to your Applications folder

Linux:

chmod +x LM_Studio-*.AppImage
./LM_Studio-*.AppImage

Downloading and Loading Models

Step 1: Search for Models

  1. Open LM Studio
  2. Click the "Search" icon on the left
  3. Search for models you want, such as:
    • llama 3.2 - Meta's open-source model
    • qwen 2.5 - Alibaba's open-source model
    • mistral - Efficient open-source model

Step 2: Download a Model

  1. Select a model from search results
  2. Choose an appropriate quantization version (recommended):
    • Q4_K_M: Balance between quality and speed
    • Q5_K_M: Better quality, slightly slower
    • Q8_0: Highest quality, needs more memory
  3. Click "Download" to start

Step 3: Load the Model

  1. After download, click the "Chat" icon on the left
  2. Select the downloaded model in the model selector at the top
  3. Wait for the model to load

Starting the Local Server

To connect Chatbox to LM Studio, you need to start the local server:

Step 1: Open Server Settings

  1. Click the "Local Server" icon on the left (or press Ctrl/Cmd + L)
  2. You'll see the server control panel

Step 2: Configure the Server

  1. Make sure a model is selected
  2. Server port defaults to 1234 (usually no need to change)
  3. Click the "Start Server" button

Step 3: Confirm Server is Running

After the server starts, you'll see:

  • Status shows Running
  • API address displayed: http://localhost:1234/v1

Configure in Chatbox

Step 1: Open Chatbox Settings

  1. Open the Chatbox app
  2. Click the "Settings" entry in the bottom left
  3. Select "AI Provider" or "Model Settings"
💡
On mobile, tap the menu icon (☰) in the top left to open the sidebar first, then tap "Settings".

Step 2: Add LM Studio

  1. Click "Add Provider"
  2. Select "OpenAI API Compatible" or "LM Studio"
  3. Configure the following:
    • API Host: http://localhost:1234/v1
    • API Key: Leave empty or enter any text (e.g., lm-studio)

Step 3: Select a Model

  1. Model name can be default or the actual model name
  2. Save settings
  3. Start chatting

Remote Connection Setup (Optional)

If you want to connect from other devices:

Security Warning: Changing localhost to 0.0.0.0 exposes the server on your entire network. LM Studio has no built-in authentication by default. Only use this on trusted local networks, and never expose port 1234 to the public internet. Consider using a VPN or SSH tunnel for remote access.

Step 1: Configure Network Listening

  1. In LM Studio's "Local Server" settings
  2. Change localhost to 0.0.0.0
  3. Restart the server

Step 2: Open Firewall

Ensure port 1234 is open in your firewall (refer to Ollama guide for firewall configuration)

Step 3: Connect

In Chatbox on other devices:

  • API Host: http://your-computer-IP:1234/v1

Recommended Models

ModelSizeMemory RequiredFeatures
Llama 3.2 3B Q4~2GB4GB+Fast, good for beginners
Llama 3.2 8B Q4~5GB8GB+Balanced choice
Qwen 2.5 7B Q4~4GB8GB+Excellent Chinese capability
Mistral 7B Q4~4GB8GB+Strong reasoning

Common Issues

Model Fails to Load

Possible causes:

  • Insufficient memory
  • Corrupted model file

Solutions:

  • Try using a smaller model or lower quantization version
  • Re-download the model

Server Won't Start

Solutions:

  • Ensure a model is loaded
  • Check if the port is in use
  • Try a different port

Chatbox Cannot Connect

Troubleshooting:

  1. Confirm LM Studio server is running
  2. Check if API address is correct (note the /v1 suffix)
  3. Try accessing http://localhost:1234/v1/models in browser

Slow Response

Optimization tips:

  • Use a smaller model
  • Use higher quantization (e.g., Q4 instead of Q8)
  • Close other resource-intensive programs

Usage Tips

  1. Choose appropriate quantization:

    • Q4_K_M is the best choice for most scenarios
    • If you have enough memory, try Q5 or Q8
  2. Keep the server running: When using Chatbox, make sure LM Studio server stays running

  3. Try different models: LM Studio's model marketplace has rich choices, feel free to experiment

  4. Monitor system resources: Watch memory and CPU/GPU usage when running models