| 1 | --- |
| 2 | title: "Intel Extension for PyTorch" |
| 3 | --- |
| 4 | |
| 5 | <Info> |
| 6 | [**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch |
| 7 | library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, |
| 8 | discrete GPU such as Arc A-Series, Flex and Max) with very low latency. |
| 9 | </Info> |
| 10 | |
| 11 | IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: |
| 12 | |
| 13 | <Tabs> |
| 14 | <Tab title="YAML"> |
| 15 | ```yaml title="config.yaml" |
| 16 | models: |
| 17 | - name: IPEX-LLM |
| 18 | provider: ollama |
| 19 | model: AUTODETECT |
| 20 | ``` |
| 21 | </Tab> |
| 22 | <Tab title="JSON"> |
| 23 | ```json title="config.json" |
| 24 | { |
| 25 | "models": [ |
| 26 | { |
| 27 | "title": "IPEX-LLM", |
| 28 | "provider": "ollama", |
| 29 | "model": "AUTODETECT" |
| 30 | } |
| 31 | ] |
| 32 | } |
| 33 | ``` |
| 34 | </Tab> |
| 35 | </Tabs> |
| 36 | |
| 37 | If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: |
| 38 | |
| 39 | <Tabs> |
| 40 | <Tab title="YAML"> |
| 41 | ```yaml title="config.yaml" |
| 42 | models: |
| 43 | - name: IPEX-LLM |
| 44 | provider: ollama |
| 45 | model: AUTODETECT |
| 46 | apiBase: http://your-ollama-service-ip:11434 |
| 47 | ``` |
| 48 | </Tab> |
| 49 | <Tab title="JSON"> |
| 50 | ```json title="config.json" |
| 51 | { |
| 52 | "models": [ |
| 53 | { |
| 54 | "title": "IPEX-LLM", |
| 55 | "provider": "ollama", |
| 56 | "model": "AUTODETECT", |
| 57 | "apiBase": "http://your-ollama-service-ip:11434" |
| 58 | } |
| 59 | ] |
| 60 | } |
| 61 | ``` |
| 62 | </Tab> |
| 63 | </Tabs> |
| 64 | |
| 65 | <Tip> |
| 66 | If you would like to preload the model before your first conversation with |
| 67 | that model in Continue, you could refer to |
| 68 | [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) |
| 69 | for more information. |
| 70 | </Tip> |