36 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2024-04-29 17:19:07 -07:00
# ollama-intel-gpu
2024-07-31 21:50:48 -07:00
This repo illlustrates the use of Ollama with support for Intel ARC GPU based via SYCL. Run the recently released [Meta llama3.1](https://llama.meta.com/) or [Microsoft phi3](https://news.microsoft.com/source/features/ai/the-phi-3-small-language-models-with-big-potential) models on your local Intel ARC GPU based PC using Linux or Windows WSL2.
2024-04-30 10:28:06 -07:00
## Screenshot
![screenshot](doc/screenshot.png)
2024-04-29 17:19:07 -07:00
# Prerequisites
2024-05-23 20:59:10 -07:00
* Ubuntu 24.04 or newer (for Intel ARC GPU kernel driver support. Tested with Ubuntu 24.04), or Windows 11 with WSL2 (graphics driver [101.5445](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html) or newer)
2024-05-02 10:50:08 -07:00
* Installed Docker and Docker-compose tools (for Linux) or Docker Desktop (for Windows)
2024-05-23 20:59:10 -07:00
* Intel ARC series GPU (tested with Intel ARC A770 16GB and Intel(R) Core(TM) Ultra 5 125H integrated GPU)
2024-04-29 17:19:07 -07:00
# Usage
The following will build the Ollama with Intel ARC GPU support, and compose those with the public docker image based on OpenWEB UI from https://github.com/open-webui/open-webui
2024-05-02 10:50:08 -07:00
Linux:
2024-04-29 17:19:07 -07:00
```bash
$ git clone https://github.com/mattcurf/ollama-intel-gpu
$ cd ollama-intel-gpu
2024-07-31 21:50:48 -07:00
$ docker compose up
2024-04-29 17:19:07 -07:00
```
2024-05-02 10:50:08 -07:00
Windows WSL2:
```bash
$ git clone https://github.com/mattcurf/ollama-intel-gpu
$ cd ollama-intel-gpu
$ docker-compose -f docker-compose-wsl2.yml up
```
2024-07-31 21:50:48 -07:00
Then launch your web browser to http://localhost:3000 to launch the web ui. Create a local OpenWeb UI credential, then click the settings icon in the top right of the screen, then select 'Models', then click 'Show', then download a model like 'llama3.1:8b-instruct-q8_0' for Intel ARC A770 16GB VRAM
2024-04-29 17:19:07 -07:00
# References
* https://dgpu-docs.intel.com/driver/client/overview.html
* https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html