Elffuss BraidHub

kikocis/continue public

19cfb6ec829a · 4.7 KiBRawPermalink
1---
2title: "How to Use Llama 3.1 with Continue"
3description: "Learn how to set up and use Llama 3.1 models with Continue using Ollama, Groq, Together AI, Replicate, SambaNova, or Cerebras Inference for local and cloud-based development"
4---
5
6If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](/customize/overview).
7
8Below we share some of the easiest ways to get up and running, depending on your use-case.
9
10## How to Use Llama 3.1 with Ollama
11
12Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware.
13
141. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps)
152. Open a terminal and run `ollama run llama3.1:8b`
163. Change your Continue config file like this:
17
18- YAML
19- JSON
20
21config.yaml
22
23```
24models:
25 - name: Llama 3.1 8b
26 provider: ollama
27 model: llama3.1-8b
28```
29
30config.json
31
32```json
33{
34 "models": [
35 { "title": "Llama 3.1 8b", "provider": "ollama", "model": "llama3.1-8b" }
36 ]
37}
38```
39
40## How to Use Llama 3.1 with Groq
41
42<Info>
43 Check if your chosen model is still supported by referring to the [model
44 documentation](https://console.groq.com/docs/models). If a model has been
45 deprecated, you may encounter a 404 error when attempting to use it.
46</Info>
47
48Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family.
49
501. Obtain an API key [here](https://console.groq.com/keys)
512. Update your Continue config file like this:
52
53- YAML
54- JSON
55
56config.yaml
57
58```
59models:
60 - name: Llama 3.3 70b Versatile
61 provider: groq
62 model: llama-3.3-70b-versatile
63 apiKey: <YOUR_GROQ_API_KEY>
64```
65
66config.json
67
68```json
69{
70 "models": [
71 {
72 "title": "Llama 3.3 70b Versatile",
73 "provider": "groq",
74 "model": "llama-3.3-70b-versatile",
75 "apiKey": "<YOUR_GROQ_API_KEY>"
76 }
77 ]
78}
79```
80
81## How to Use Llama 3.1 with Together AI
82
83Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed.
84
851. Create an account [here](https://api.together.xyz/signup)
862. Copy your API key that appears on the welcome screen
873. Update your Continue config file like this:
88
89- YAML
90- JSON
91
92config.yaml
93
94```
95models:
96 - name: Llama 3.1 405b
97 provider: together
98 model: llama3.1-405b
99 apiKey: <YOUR_TOGETHER_API_KEY>
100```
101
102config.json
103
104```json
105{
106 "models": [
107 {
108 "title": "Llama 3.1 405b",
109 "provider": "together",
110 "model": "llama3.1-405b",
111 "apiKey": "<YOUR_TOGETHER_API_KEY>"
112 }
113 ]
114}
115```
116
117## How to Use Llama 3.1 with Replicate
118
119Replicate makes it easy to host and run open-source AI with an API.
120
1211. Get your Replicate API key [here](https://replicate.ai/)
1222. Change your Continue config file like this:
123
124- YAML
125- JSON
126
127config.yaml
128
129```
130models:
131 - name: Llama 3.1 405b
132 provider: replicate
133 model: llama3.1-405b
134 apiKey: <YOUR_REPLICATE_API_KEY>
135```
136
137config.json
138
139```json
140{
141 "models": [
142 {
143 "title": "Llama 3.1 405b",
144 "provider": "replicate",
145 "model": "llama3.1-405b",
146 "apiKey": "<YOUR_REPLICATE_API_KEY>"
147 }
148 ]
149}
150```
151
152## How to Use Llama 3.1 with SambaNova
153
154SambaNova Cloud provides world record Llama3.1 70B/405B serving.
155
1561. Create an account [here](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup)
1572. Copy your API key
1583. Update your Continue config file like this:
159
160- YAML
161- JSON
162
163config.yaml
164
165```
166models:
167 - name: SambaNova Llama 3.1 405B
168 provider: sambanova
169 model: llama3.1-405b
170 apiKey: <YOUR_SAMBA_API_KEY>
171```
172
173config.json
174
175```json
176{
177 "models": [
178 {
179 "title": "SambaNova Llama 3.1 405B",
180 "provider": "sambanova",
181 "model": "llama3.1-405b",
182 "apiKey": "<YOUR_SAMBA_API_KEY>"
183 }
184 ]
185}
186```
187
188## How to Use Llama 3.1 with Cerebras Inference
189
190Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B.
191
1921. Create an account in the portal [here](https://cloud.cerebras.ai/).
1932. Create and copy the API key for use in Continue.
1943. Update your Continue config file:
195
196- YAML
197- JSON
198
199config.yaml
200
201```
202models:
203 - name: Cerebras Llama 3.1 70B
204 provider: cerebras
205 model: llama3.1-70b
206 apiKey: <YOUR_CEREBRAS_API_KEY>
207```
208
209config.json
210
211```json
212{
213 "models": [
214 {
215 "title": "Cerebras Llama 3.1 70B",
216 "provider": "cerebras",
217 "model": "llama3.1-70b",
218 "apiKey": "<YOUR_CEREBRAS_API_KEY>"
219 }
220 ]
221}
222```