| 1 | --- |
| 2 | title: "Intel Extension for PyTorch" |
| 3 | description: "Configure Intel Extension for PyTorch (IPEX-LLM) with Continue to run language models with very low latency on Intel CPUs and GPUs, leveraging accelerated Ollama backend" |
| 4 | --- |
| 5 | |
| 6 | <Info> |
| 7 | [**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch |
| 8 | library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, |
| 9 | discrete GPU such as Arc A-Series, Flex and Max) with very low latency. |
| 10 | </Info> |
| 11 | |
| 12 | 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: |
| 13 | |
| 14 | <Tabs> |
| 15 | <Tab title="YAML"> |
| 16 | ```yaml title="config.yaml" |
| 17 | models: |
| 18 | - name: IPEX-LLM |
| 19 | provider: ollama |
| 20 | model: AUTODETECT |
| 21 | ``` |
| 22 | </Tab> |
| 23 | <Tab title="JSON"> |
| 24 | ```json title="config.json" |
| 25 | { |
| 26 | "models": [ |
| 27 | { |
| 28 | "title": "IPEX-LLM", |
| 29 | "provider": "ollama", |
| 30 | "model": "AUTODETECT" |
| 31 | } |
| 32 | ] |
| 33 | } |
| 34 | ``` |
| 35 | </Tab> |
| 36 | </Tabs> |
| 37 | |
| 38 | 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: |
| 39 | |
| 40 | <Tabs> |
| 41 | <Tab title="YAML"> |
| 42 | ```yaml title="config.yaml" |
| 43 | models: |
| 44 | - name: IPEX-LLM |
| 45 | provider: ollama |
| 46 | model: AUTODETECT |
| 47 | apiBase: http://your-ollama-service-ip:11434 |
| 48 | ``` |
| 49 | </Tab> |
| 50 | <Tab title="JSON"> |
| 51 | ```json title="config.json" |
| 52 | { |
| 53 | "models": [ |
| 54 | { |
| 55 | "title": "IPEX-LLM", |
| 56 | "provider": "ollama", |
| 57 | "model": "AUTODETECT", |
| 58 | "apiBase": "http://your-ollama-service-ip:11434" |
| 59 | } |
| 60 | ] |
| 61 | } |
| 62 | ``` |
| 63 | </Tab> |
| 64 | </Tabs> |
| 65 | |
| 66 | <Tip> |
| 67 | If you would like to preload the model before your first conversation with |
| 68 | that model in Continue, you could refer to |
| 69 | [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) |
| 70 | for more information. |
| 71 | </Tip> |