Elffuss BraidHub

kikocis/continue public

f433400a74a4 · 3.7 KiBRawPermalink
1---
2title: Ollama
3slug: ../ollama
4---
5
6Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
7
8## Chat model
9
10We recommend configuring **Llama3.1 8B** as your chat model.
11
12<Tabs>
13 <Tab title="YAML">
14 ```yaml title="config.yaml"
15 models:
16 - name: Llama3.1 8B
17 provider: ollama
18 model: llama3.1:8b
19 ```
20 </Tab>
21 <Tab title="JSON">
22 ```json title="config.json"
23 {
24 "models": [
25 {
26 "title": "Llama3.1 8B",
27 "provider": "ollama",
28 "model": "llama3.1:8b"
29 }
30 ]
31 }
32 ```
33 </Tab>
34</Tabs>
35
36## Autocomplete model
37
38We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
39
40<Tabs>
41 <Tab title="YAML">
42 ```yaml title="config.yaml"
43 models:
44 - name: Qwen2.5-Coder 1.5B
45 provider: ollama
46 model: qwen2.5-coder:1.5b-base
47 roles:
48 - autocomplete
49 ```
50 </Tab>
51 <Tab title="JSON">
52 ```json title="config.json"
53 {
54 "tabAutocompleteModel": {
55 "title": "Qwen2.5-Coder 1.5B",
56 "provider": "ollama",
57 "model": "qwen2.5-coder:1.5b-base"
58 }
59 }
60 ```
61 </Tab>
62</Tabs>
63
64## Embeddings model
65
66We recommend configuring **Nomic Embed Text** as your embeddings model.
67
68<Tabs>
69 <Tab title="YAML">
70 ```yaml title="config.yaml"
71 models:
72 - name: Nomic Embed Text
73 provider: ollama
74 model: nomic-embed-text
75 roles:
76 - embed
77 ```
78 </Tab>
79 <Tab title="JSON">
80 ```json title="config.json"
81 {
82 "embeddingsProvider": {
83 "provider": "ollama",
84 "model": "nomic-embed-text"
85 }
86 }
87 ```
88 </Tab>
89</Tabs>
90
91## Reranking model
92
93Ollama currently does not offer any reranking models.
94
95[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
96
97## Using a remote instance
98
99To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
100
101<Tabs>
102 <Tab title="YAML">
103 ```yaml title="config.yaml"
104 models:
105 - name: Llama3.1 8B
106 provider: ollama
107 model: llama3.1:8b
108 apiBase: http://<my endpoint>:11434
109 ```
110 </Tab>
111 <Tab title="JSON">
112 ```json title="config.json"
113 {
114 "models": [
115 {
116 "title": "Llama3.1 8B",
117 "provider": "ollama",
118 "model": "llama3.1:8b",
119 "apiBase": "http://<my endpoint>:11434"
120 }
121 ]
122 }
123 ```
124 </Tab>
125</Tabs>
126
127## Model Capabilities
128
129Ollama models usually have their capabilities auto-detected correctly. However, if you're using custom model names or experiencing issues with tools/images not working, you can explicitly set capabilities:
130
131<Tabs>
132 <Tab title="YAML">
133 ```yaml title="config.yaml"
134 models:
135 - name: Custom Vision Model
136 provider: ollama
137 model: my-custom-llava
138 capabilities:
139 - tool_use # Enable if your model supports function calling
140 - image_input # Enable for vision models like llava
141 ```
142 </Tab>
143 <Tab title="JSON">
144 ```json title="config.json"
145 {
146 "models": [
147 {
148 "title": "Custom Vision Model",
149 "provider": "ollama",
150 "model": "my-custom-llava",
151 "capabilities": {
152 "tools": true,
153 "uploadImage": true
154 }
155 }
156 ]
157 }
158 ```
159 </Tab>
160</Tabs>
161
162<Note>
163Most standard Ollama models (like llama3.1, mistral, etc.) support tool use by default. Vision models (like llava) also support image input.
164</Note>