BigDL-LLM Installation: GPU#

Quick Installation#

Install BigDL-LLM for GPU supports using pip through:

pip install --pre --upgrade bigdl-llm[xpu] -f https://developer.intel.com/ipex-whl-stable-xpu # install bigdl-llm for GPU

Please refer to Environment Setup for more information.

Note

The above command will install intel_extension_for_pytorch==2.0.110+xpu as default. You can install specific ipex/torch version for your need.

Important

bigdl-llm is tested with Python 3.9, which is recommended for best practices.

Environment Setup#

For optimal performance with LLM models using BigDL-LLM optimizations on Intel GPUs, here are some best practices for setting up environment:

First we recommend using Conda to create a python 3.9 enviroment:

conda create -n llm python=3.9
conda activate llm

pip install --pre --upgrade bigdl-llm[xpu] -f https://developer.intel.com/ipex-whl-stable-xpu # install bigdl-llm for GPU

Then for running a LLM model with BigDL-LLM optimizations, several environment variables are recommended:

# configures OneAPI environment variables
source /opt/intel/oneapi/setvars.sh

export USE_XETLA=OFF
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1