| 1 | --- |
| 2 | title: "How to Use Llama 3.1 with Continue" |
| 3 | description: "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 | |
| 6 | If 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 | |
| 8 | Below 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 | |
| 12 | Ollama 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 | |
| 14 | 1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) |
| 15 | 2. Open a terminal and run `ollama run llama3.1:8b` |
| 16 | 3. Change your Continue config file like this: |
| 17 | |
| 18 | - YAML |
| 19 | - JSON |
| 20 | |
| 21 | config.yaml |
| 22 | |
| 23 | ``` |
| 24 | models: |
| 25 | - name: Llama 3.1 8b |
| 26 | provider: ollama |
| 27 | model: llama3.1-8b |
| 28 | ``` |
| 29 | |
| 30 | config.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 | |
| 48 | Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. |
| 49 | |
| 50 | 1. Obtain an API key [here](https://console.groq.com/keys) |
| 51 | 2. Update your Continue config file like this: |
| 52 | |
| 53 | - YAML |
| 54 | - JSON |
| 55 | |
| 56 | config.yaml |
| 57 | |
| 58 | ``` |
| 59 | models: |
| 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 | |
| 66 | config.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 | |
| 83 | Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. |
| 84 | |
| 85 | 1. Create an account [here](https://api.together.xyz/signup) |
| 86 | 2. Copy your API key that appears on the welcome screen |
| 87 | 3. Update your Continue config file like this: |
| 88 | |
| 89 | - YAML |
| 90 | - JSON |
| 91 | |
| 92 | config.yaml |
| 93 | |
| 94 | ``` |
| 95 | models: |
| 96 | - name: Llama 3.1 405b |
| 97 | provider: together |
| 98 | model: llama3.1-405b |
| 99 | apiKey: <YOUR_TOGETHER_API_KEY> |
| 100 | ``` |
| 101 | |
| 102 | config.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 | |
| 119 | Replicate makes it easy to host and run open-source AI with an API. |
| 120 | |
| 121 | 1. Get your Replicate API key [here](https://replicate.ai/) |
| 122 | 2. Change your Continue config file like this: |
| 123 | |
| 124 | - YAML |
| 125 | - JSON |
| 126 | |
| 127 | config.yaml |
| 128 | |
| 129 | ``` |
| 130 | models: |
| 131 | - name: Llama 3.1 405b |
| 132 | provider: replicate |
| 133 | model: llama3.1-405b |
| 134 | apiKey: <YOUR_REPLICATE_API_KEY> |
| 135 | ``` |
| 136 | |
| 137 | config.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 | |
| 154 | SambaNova Cloud provides world record Llama3.1 70B/405B serving. |
| 155 | |
| 156 | 1. Create an account [here](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup) |
| 157 | 2. Copy your API key |
| 158 | 3. Update your Continue config file like this: |
| 159 | |
| 160 | - YAML |
| 161 | - JSON |
| 162 | |
| 163 | config.yaml |
| 164 | |
| 165 | ``` |
| 166 | models: |
| 167 | - name: SambaNova Llama 3.1 405B |
| 168 | provider: sambanova |
| 169 | model: llama3.1-405b |
| 170 | apiKey: <YOUR_SAMBA_API_KEY> |
| 171 | ``` |
| 172 | |
| 173 | config.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 | |
| 190 | Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. |
| 191 | |
| 192 | 1. Create an account in the portal [here](https://cloud.cerebras.ai/). |
| 193 | 2. Create and copy the API key for use in Continue. |
| 194 | 3. Update your Continue config file: |
| 195 | |
| 196 | - YAML |
| 197 | - JSON |
| 198 | |
| 199 | config.yaml |
| 200 | |
| 201 | ``` |
| 202 | models: |
| 203 | - name: Cerebras Llama 3.1 70B |
| 204 | provider: cerebras |
| 205 | model: llama3.1-70b |
| 206 | apiKey: <YOUR_CEREBRAS_API_KEY> |
| 207 | ``` |
| 208 | |
| 209 | config.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 | ``` |