llms.txt
Compare with other sites' llms.txt files →# app
# About LM Studio
> Learn how to run Llama, DeepSeek, Phi, and other LLMs locally with LM Studio.
LM Studio is a desktop app for developing and experimenting with LLMs locally on your computer.
**Key functionality**
1. A desktop application for running local LLMs
2. A familiar chat interface
3. Search & download functionality (via Hugging Face 🤗)
4. A local server that can listen on OpenAI-like endpoints
5. Systems for managing local models and configurations
<hr>
### How do I install LM Studio?
Head over to the [Downloads page](/download) and download an installer for your operating system.
LM Studio is available for macOS, Windows, and Linux.
<hr>
### System requirements
LM Studio generally supports Apple Silicon Macs, x64/ARM64 Windows PCs, and x64 Linux PCs.
Consult the [System Requirements](app/system-requirements) page for more detailed information.
<hr>
### Run llama.cpp (GGUF) or MLX models
LM Studio supports running LLMs on Mac, Windows, and Linux using [`llama.cpp`](https://github.com/ggerganov/llama.cpp).
On Apple Silicon Macs, LM Studio also supports running LLMs using Apple's [`MLX`](https://github.com/ml-explore/mlx).
To install or manage LM Runtimes, press `⌘` `Shift` `R` on Mac or `Ctrl` `Shift` `R` on Windows/Linux.
<hr>
### Run an LLM like `Llama`, `Phi`, or `DeepSeek R1` on your computer
To run an LLM on your computer you first need to download the model weights.
You can do this right within LM Studio! See [Download an LLM](app/basics/download-model) for guidance.
<hr>
### Chat with documents entirely offline on your computer
You can attach documents to your chat messages and interact with them entirely offline, also known as "RAG".
Read more about how to use this feature in the [Chat with Documents](app/basics/rag) guide.
### Use LM Studio's API from your own apps and scripts
LM Studio provides a REST API that you can use to interact with your local models from your own apps and scripts.
- [OpenAI Compatibility API](api/openai-api)
- [LM Studio REST API (beta)](api/rest-api)
<hr>
### Community
Join the LM Studio community on [Discord](https://discord.gg/aPQfnNkxGC) to ask questions, share knowledge, and get help from other users and the LM Studio team.
## API Changelog
> LM Studio API Changelog - new features and updates
###### [👾 LM Studio 0.3.9](blog/lmstudio-v0.3.9) • 2025-01-30
### Idle TTL and Auto Evict
Set a TTL (in seconds) for models loaded via API requests (docs article: [Idle TTL and Auto-Evict](/docs/api/ttl-and-auto-evict))
```diff
curl http://localhost:1234/api/v0/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1-distill-qwen-7b",
"messages": [ ... ]
+ "ttl": 300,
}'
```
With `lms`:
```
lms load --ttl <seconds>
```
### Separate `reasoning_content` in Chat Completion responses
For DeepSeek R1 models, get reasoning content in a separate field. See more [here](/blog/lmstudio-v0.3.9#separate-reasoningcontent-in-chat-completion-responses).
Turn this on in App Settings > Developer.
---
<br>
###### [👾 LM Studio 0.3.6](blog/lmstudio-v0.3.6) • 2025-01-06
### Tool and Function Calling API
Use any LLM that supports Tool Use and Function Calling through the OpenAI-like API.
Docs: [Tool Use and Function Calling](/docs/api/tools).
---
<br>
###### [👾 LM Studio 0.3.5](blog/lmstudio-v0.3.5) • 2024-10-22
### Introducing `lms get`: download models from the terminal
You can now download models directly from the terminal using a keyword
```bash
lms get deepseek-r1
```
or a full Hugging Face URL
```bash
lms get <hugging face url>
```
To filter for MLX models only, add `--mlx` to the command.
```bash
lms get deepseek-r1 --mlx
```
## System Requirements
> Supported CPU, GPU types for LM Studio on Mac (M1/M2/M3/M4), Windows (x64/ARM), and Linux (x64)
Minimum system requirements for running LM Studio.
<hr>
###### We are actively working to add support for more platforms and configurations. If you noticed an error in this page, please let us know by opening an issue on [github](https://github.com/lmstudio-ai/lmstudio-bug-tracker).
### macOS
- Chip: Apple Silicon (M1/M2/M3/M4).
- macOS 13.4 or newer is required.
- For MLX models, macOS 14.0 or newer is required.
- 16GB+ RAM recommended.
- You may still be able to use LM Studio on 8GB Macs, but stick to smaller models and modest context sizes.
- Intel-based Macs are currently not supported. Chime in [here](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/9) if you are interested in this.
### Windows
LM Studio is supported on both x64 and ARM (Snapdragon X Elite) based systems.
- CPU: AVX2 instruction set support is required (for x64)
- RAM: LLMs can consume a lot of RAM. At least 16GB of RAM is recommended.
### Linux
- LM Studio for Linux is distributed as an AppImage.
- Ubuntu 20.04 or newer is required
- x64 only, aarch64 not yet supported
- Ubuntu versions newer than 22 are not well tested. Let us know if you're running into issues by opening a bug [here](https://github.com/lmstudio-ai/lmstudio-bug-tracker).
- CPU:
- LM Studio ships with AVX2 support by default
## Offline Operation
> LM Studio can operate entirely offline, just make sure to get some model files first.
```lms_notice
In general, LM Studio does not require the internet in order to work. This includes core functions like chatting with models, chatting with documents, or running a local server, none of which require the internet.
```
### Operations that do NOT require connectivity
#### Using downloaded LLMs
Once you have an LLM onto your machine, the model will run locally and you should be good to go entirely offline. Nothing you enter into LM Studio when chatting with LLMs leaves your device.
#### Chatting with documents (RAG)
When you drag and drop a document into LM Studio to chat with it or perform RAG, that document stays on your machine. All document processing is done locally, and nothing you upload into LM Studio leaves the application.
#### Running a local server
LM Studio can be used as a server to provide LLM inferencing on localhost or the local network. Requests to LM Studio use OpenAI endpoints and return OpenAI-like response objects, but stay local.
### Operations that require connectivity
Several operations, described below, rely on internet connectivity. Once you get an LLM onto your machine, you should be good to go entirely offline.
#### Searching for models
When you search for models in the Discover tab, LM Studio makes network requests (e.g. to huggingface.co). Search will not work without internet connection.
#### Downloading new models
In order to download models you need a stable (and decently fast) internet connection. You can also 'sideload' models (use models that were procured outside the app). See instructions for [sideloading models](advanced/sideload).
#### Discover tab's model catalog
Any given version of LM Studio ships with an initial model catalog built-in. The entries in the catalog are typically the state of the online catalog near the moment we cut the release. However, in order to show stats and download options for each model, we need to make network requests (e.g. to huggingface.co).
#### Downloading runtimes
[LM Runtimes](advanced/lm-runtimes) are individually packaged software libraries, or LLM engines, that allow running certain formats of models (e.g. `llama.cpp`). As of LM Studio 0.3.0 (read the [announcement](https://lmstudio.ai/blog/lmstudio-v0.3.0)) it's easy to download and even hot-swap runtimes without a full LM Studio update. To check for available runtimes, and to download them, we need to make network requests.
#### Checking for app updates
On macOS and Windows, LM Studio has a built-in app updater that's capable. The linux in-app updater [is in the works](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/89). When you open LM Studio, the app updater will make a network request to check if there are any new updates available. If there's a new version, the app will show you a notification to update now or later.
Without internet connectivity you will not be able to update the app via the in-app updater.
## basics
## Get started with LM Studio
> Download and run Large Language Models (LLMs) like Llama 3.1, Phi-3, and Gemma 2 locally in LM Studio
You can use openly available Large Language Models (LLMs) like Llama 3.1, Phi-3, and Gemma 2 locally in LM Studio, leveraging your computer's CPU and optionally the GPU.
Double check computer meets the minimum [system requirements](/docs/system-requirements).
<br>
```lms_info
You might sometimes see terms such as `open-source models` or `open-weights models`. Different models might be released under different licenses and varying degrees of 'openness'. In order to run a model locally, you need to be able to get access to its "weights", often distributed as one or more files that end with `.gguf`, `.safetensors` etc.
```
<hr>
## Getting up and running
First, **install the latest version of LM Studio**. You can get it from [here](/download).
Once you're all set up, you need to **download your first LLM**.
### 1. Download an LLM to your computer
Head over to the Discover tab to download models. Pick one of the curated options or search for models by search query (e.g. `"Llama"`). See more in-depth information about downloading models [here](/docs/basics/download-models).
<img src="/assets/docs/discover.png" style="width: 500px; margin-top:30px" data-caption="The Discover tab in LM Studio" />
### 2. Load a model to memory
Head over to the **Chat** tab, and
1. Open the model loader
2. Select one of the models you downloaded (or [sideloaded](/docs/advanced/sideload)).
3. Optionally, choose load configuration parameters.
<img src="/assets/docs/loader.png" data-caption="Quickly open the model loader with `cmd` + `L` on macOS or `ctrl` + `L` on Windows/Linux" />
##### What does loading a model mean?
Loading a model typically means allocating memory to be able to accomodate the model's weights and other parameters in your computer's RAM.
### 3. Chat!
Once the model is loaded, you can start a back-and-forth conversation with the model in the Chat tab.
<img src="/assets/docs/chat.png" data-caption="LM Studio on macOS" />
<hr>
### Community
Chat with other LM Studio users, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
### Manage chats
> Manage conversation threads with LLMs
LM Studio has a ChatGPT-like interface for chatting with local LLMs. You can create many different conversation threads and manage them in folders.
<img src="/assets/docs/chatTab.png" style="width: 500px; margin-top:30px" data-caption="Manage your conversations in the Chat tab" />
<hr>
### Create a new chat
You can create a new chat by clicking the "+" button or by using a keyboard shortcut: `⌘` + `N` on Mac, or `ctrl` + `N` on Windows / Linux.
### Create a folder
Create a new folder by clicking the new folder button or by pressing: `⌘` + `shift` + `N` on Mac, or `ctrl` + `shift` + `N` on Windows / Linux.
### Drag and drop
You can drag and drop chats in and out of folders, and even drag folders into folders!
### Duplicate chats
You can duplicate a whole chat conversation by clicking the `•••` menu and selecting "Duplicate". If the chat has any files in it, they will be duplicated too.
## FAQ
#### Where are chats stored in the file system?
Right-click on a chat and choose "Reveal in Finder" / "Show in File Explorer".
Conversations are stored in JSON format. It is NOT recommended to edit them manually, nor to rely on their structure.
#### Does the model learn from chats?
The model doesn't 'learn' from chats. The model only 'knows' the content that is present in the chat or is provided to it via configuration options such as the "system prompt".
## Conversations folder filesystem path
Mac / Linux:
```shell
~/.lmstudio/conversations/
```
Windows:
```ps
%USERPROFILE%\.lmstudio\conversations
```
<hr>
### Community
Chat with other LM Studio users, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
### Download an LLM
> Discover and download supported LLMs in LM Studio
LM Studio comes with a built-in model downloader that let's you download any supported model from [Hugging Face](https://huggingface.co).
<img src="/assets/docs/discover.png" style="width: 500px; margin-top:30px" data-caption="Download models from the Discover tab in LM Studio" />
<hr>
### Searching for models
You can search for models by keyword (e.g. `llama`, `gemma`, `lmstudio`), or by providing a specific `user/model` string. You can even insert full Hugging Face URLs into the search bar!
###### Pro tip: you can jump to the Discover tab from anywhere by pressing `⌘` + `2` on Mac, or `ctrl` + `2` on Windows / Linux.
### Which download option to choose?
You will often see several options for any given model named things like `Q3_K_S`, `Q_8` etc. These are all copies of the same model, provided in varying degrees of fidelity. The `Q` represents a technique called "Quantization", which roughly means compressing model files in size, while giving up some degree of quality.
Choose a 4-bit option or higher if your machine is capable enough for running it.
<img src="/assets/docs/search.webp" style="" data-caption="Hugging Face search results in LM Studio" />
<hr>
`Advanced`
### Changing the models directory
You can change the models directory by heading to My Models
<img src="/assets/docs/change-models-dir.png" style="width:80%" data-caption="Manage your models directory in the My Models tab">
<hr>
### Community
Chat with other LM Studio users, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
### Chat with Documents
> How to provide local documents to an LLM as additional context
You can attach document files (`.docx`, `.pdf`, `.txt`) to chat sessions in LM Studio.
This will provide additional context to LLMs you chat with through the app.
<hr>
### Terminology
- **Retrieval**: Identifying relevant portion of a long source document
- **Query**: The input to the retrieval operation
- **RAG**: Retrieval-Augmented Generation\*
- **Context**: the 'working memory' of an LLM. Often limited at a few thousand words\*\*
###### \* In this context, 'Generation' means the output of the LLM.
###### \*\* A recent trend in newer LLMs is support for larger context sizes.
###### Context sizes are measured in "tokens". One token is often about 3/4 of a word.
### RAG vs. Full document 'in context'
If the document is short enough (i.e., if it fits in the model's context), LM Studio will add the file contents to the conversation in full. This is particularly useful for models that support longer context sizes such as Meta's Llama 3.1 and Mistral Nemo.
If the document is very long, LM Studio will opt into using "Retrieval Augmented Generation", frequently referred to as "RAG". RAG means attempting to fish out relevant bits of a very long document (or several documents) and providing them to the model for reference. This technique sometimes works really well, but sometimes it requires some tuning and experimentation.
### Tip for successful RAG
provide as much context in your query as possible. Mention terms, ideas, and words you expect to be in the relevant source material. This will often increase the chance the system will provide useful context to the LLM. As always, experimentation is the best way to find what works best.
### Import Models
> Use model files you've downloaded outside of LM Studio
You can use compatible models you've downloaded outside of LM Studio by placing them in the expected directory structure.
<hr>
### Use `lms import` (experimental)
To import a `GGUF` model you've downloaded outside of LM Studio, run the following command in your terminal:
```bash
lms import <path/to/model.gguf>
```
###### Follow the interactive prompt to complete the import process.
### LM Studio's expected models directory structure
<img src="/assets/docs/reveal-models-dir.png" style="width:80%" data-caption="Manage your models directory in the My Models tab">
LM Studio aims to preserves the directory structure of models downloaded from Hugging Face. The expected directory structure is as follows:
```xml
~/.lmstudio/models/
└── publisher/
└── model/
└── model-file.gguf
```
For example, if you have a model named `ocelot-v1` published by `infra-ai`, the structure would look like this:
```xml
~/.lmstudio/models/
└── infra-ai/
└── ocelot-v1/
└── ocelot-v1-instruct-q4_0.gguf
```
<hr>
### Community
Chat with other LM Studio users, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
### Config Presets
> Save your system prompts and other parameters as Presets for easy reuse across chats.
Configuration Presets are new in LM Studio 0.3.3 ([Release Notes](/blog/lmstudio-v0.3.3))
#### The Use Case for Presets
- Save your system prompts, inference parameters as a named `Preset`.
- Easily switch between different use cases, such as reasoning, creative writing, multi-turn conversations, or brainstorming.
_For migration from LM Studio 0.2.\* Presets, see [below](#migration-from-lm-studio-0-2-presets)_.
**Please report bugs and feedback to bugs [at] lmstudio [dot] ai.**
<hr>
### Build your own Prompt Library
You can create your own prompt library by using Presets.
<br>
<video autoplay loop muted playsinline style="width:60vh;" data-caption="Save collections of parameters as a Preset for easy reuse." class="border border-border">
<source src="https://files.lmstudio.ai/presets.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
In addition to system prompts, every parameter under the Advanced Configuration sidebar can be recorded in a named Preset.
For example, you might want to always use a certain Temperature, Top P, or Max Tokens for a particular use case. You can save these settings as a Preset (with or without a system prompt) and easily switch between them.
### Saving, resetting, and deselecting Presets
Below is the anatomy of the Preset manager:
<img src="/assets/docs/preset-widget-anatomy.webp" style="width:80%" data-caption="The anatomy of the Preset manager in the settings sidebar.">
### Migration from LM Studio 0.2.\* Presets
- Presets you've saved in LM Studio 0.2.\* are automatically readable in 0.3.3 with no migration step needed.
- If you save **new changes** in a **legacy preset**, it'll be **copied** to a new format upon save.
- The old files are NOT deleted.
- Notable difference: Load parameters are not included in the new preset format.
- Favor editing the model's default config in My Models. See [how to do it here](/docs/configuration/per-model).
### Where Presets are stored
Presets are stored in the following directory:
#### macOS or Linux
```xml
~/.lmstudio/config-presets
```
#### Windows
```xml
%USERPROFILE%\.lmstudio\config-presets
```
<hr>
### Community
Chat with other LM Studio users, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
## user-interface
### LM Studio in your language
> LM Studio is available in English, Spanish, French, German, Korean, Russian, and 6+ more languages.
LM Studio is available in `English`, `Spanish`, `Japanese`, `Chinese`, `German`, `Norwegian`, `Turkish`, `Russian`, `Korean`, `Polish`, `Vietnamese`, `Czech`, `Ukranian`, and `Portuguese (BR,PT)` thanks to incredibly awesome efforts from the LM Studio community.
<hr>
### Selecting a Language
You can choose a language in the Settings tab.
Use the dropdown menu under Preferences > Language.
```lms_protip
You can jump to Settings from anywhere in the app by pressing `cmd` + `,` on macOS or `ctrl` + `,` on