| 1 | --- |
| 2 | title: "Llama.cpp" |
| 3 | --- |
| 4 | |
| 5 | Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: |
| 6 | |
| 7 | ```bash |
| 8 | .\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf |
| 9 | ``` |
| 10 | |
| 11 | After it's up and running, change `~/.continue/config.json` to look like this: |
| 12 | |
| 13 | <Tabs> |
| 14 | <Tab title="YAML"> |
| 15 | ```yaml title="config.yaml" |
| 16 | models: |
| 17 | - name: Llama CPP |
| 18 | provider: llama.cpp |
| 19 | model: MODEL_NAME |
| 20 | apiBase: http://localhost:8080 |
| 21 | ``` |
| 22 | </Tab> |
| 23 | <Tab title="JSON"> |
| 24 | ```json title="config.json" |
| 25 | { |
| 26 | "models": [ |
| 27 | { |
| 28 | "title": "Llama CPP", |
| 29 | "provider": "llama.cpp", |
| 30 | "model": "MODEL_NAME", |
| 31 | "apiBase": "http://localhost:8080" |
| 32 | } |
| 33 | ] |
| 34 | } |
| 35 | ``` |
| 36 | </Tab> |
| 37 | </Tabs> |
| 38 | |
| 39 | [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts) |