Elffuss BraidHub

kikocis/continue public

f433400a74a4 · 2.2 KiBRawPermalink
1---
2title: "LM Studio"
3---
4
5[LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class:
6
7## Chat model
8
9We recommend configuring **Llama3.1 8B** as your chat model.
10
11<Tabs>
12 <Tab title="YAML">
13 ```yaml title="config.yaml"
14 models:
15 - name: Llama3.1 8B Instruct
16 provider: lmstudio
17 model: meta-llama-3.1-8b-instruct
18 ```
19 </Tab>
20 <Tab title="JSON">
21 ```json title="config.json"
22 {
23 "models": [
24 {
25 "title": "Llama3.1 8B Instruct",
26 "provider": "lmstudio",
27 "model": "meta-llama-3.1-8b-instruct"
28 }
29 ]
30 }
31 ```
32 </Tab>
33</Tabs>
34
35## Embeddings model
36
37LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models)
38
39<Tabs>
40 <Tab title="YAML">
41 ```yaml title="config.yaml"
42 models:
43 - name: Nomic Embed Text
44 provider: lmstudio
45 model: nomic-ai/nomic-embed-text-v1.5-GGUF
46 roles:
47 - embed
48 ```
49 </Tab>
50 <Tab title="JSON">
51 ```json title="config.json"
52 {
53 "embeddingsProvider": {
54 "provider": "lmstudio",
55 "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
56 }
57 }
58 ```
59 </Tab>
60</Tabs>
61
62## Setting up a remote instance
63
64To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json:
65
66<Tabs>
67 <Tab title="YAML">
68 ```yaml title="config.yaml"
69 models:
70 - name: Llama3.1 8B Instruct
71 provider: lmstudio
72 model: meta-llama-3.1-8b-instruct
73 apiBase: http://<MY ENDPOINT>/v1
74 ```
75 </Tab>
76 <Tab title="JSON">
77 ```json title="config.json"
78 {
79 "models": [
80 {
81 "title": "Llama3.1 8B Instruct",
82 "provider": "lmstudio",
83 "model": "meta-llama-3.1-8b-instruct",
84 "apiBase": "http://<MY ENDPOINT>/v1"
85 }
86 ]
87 }
88 ```
89 </Tab>
90</Tabs>
91
92This `apiBase` will now be used instead of the default `http://localhost:1234/v1`.
93
94[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LMStudio.ts)