LLM/Intel Pro Arc B70/2026-06-20: Difference between revisions
< LLM | Intel Pro Arc B70
Jump to navigation
Jump to search
| (26 intermediate revisions by the same user not shown) | |||
| Line 46: | Line 46: | ||
# clean | # clean | ||
cmake --build build-openvino --target clean | cmake --build build-openvino --target clean | ||
ln -sf $(find /usr/lib/ -name "libopenvino_intel_gpu_plugin.so" 2>/dev/null | head -n 1) ~/llama.cpp/openvino/lib/ | |||
cd ~/llama.cpp/openvino/bin | |||
./llama-cli --list-devices | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Test SYCL version == | It sucks, no GPU found. | ||
<pre> | |||
Available devices: | |||
OPENVINO0: OpenVINO Runtime (95663 MiB, 95663 MiB free) | |||
</pre> | |||
== Test SYCL(oneAPI) version == | |||
=== Install dependencies === | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# apt install intel-oneapi- | # install oneAPI | ||
apt install intel-oneapi- | sudo apt install intel-oneapi-mkl-devel | ||
sudo apt install intel-oneapi-compiler-dpcpp-cpp | |||
source /opt/intel/oneapi/setvars.sh | source /opt/intel/oneapi/setvars.sh | ||
</syntaxhighlight> | |||
=== Link shared library === | |||
<pre> | |||
:: initializing oneAPI environment ... | |||
bash: BASH_VERSION = 5.2.21(1)-release | |||
args: Using "$@" for setvars.sh arguments: --force | |||
:: compiler -- latest | |||
:: debugger -- latest | |||
:: dev-utilities -- latest | |||
:: dpl -- latest | |||
:: mkl -- latest | |||
:: tbb -- latest | |||
:: tcm -- latest | |||
:: umf -- latest | |||
:: oneAPI environment initialized :: | |||
</pre> | |||
=== Build === | |||
<syntaxhighlight lang="bash"> | |||
# build | # build | ||
cmake -B build-sycl -DGGML_SYCL=ON -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" | cmake -B build-sycl \ | ||
-DCMAKE_C_COMPILER=icx \ | |||
-DCMAKE_CXX_COMPILER=icpx \ | |||
-DGGML_SYCL=ON \ | |||
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \ | |||
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" | |||
cmake --build build-sycl --config Release | cmake --build build-sycl --config Release | ||
| Line 63: | Line 104: | ||
# clean | # clean | ||
cmake --build build-sycl --target clean | cmake --build build-sycl --target clean | ||
# test GPU | |||
cd ~/llama.cpp/openvino/bin | |||
./llama-cli --list-devices | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Got It! | |||
<pre> | |||
Available devices: | |||
SYCL0: Intel(R) Arc(TM) Pro B70 Graphics (32656 MiB, 32128 MiB free) | |||
</pre> | |||
=== Test Models === | |||
<syntaxhighlight lang="bash"> | |||
# test model | |||
./llama-server -hf google/gemma-4-2B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9004 # 90 t/s | |||
./llama-server -hf google/gemma-4-E4B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9004 # 90 t/s | |||
./llama-server -hf google/gemma-4-12B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9012 # 47 t/s | |||
./llama-server -hf google/gemma-4-26B-A4B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9026 # 52 t/s | |||
./llama-server -hf google/gemma-4-31B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9031 # 23 t/s | |||
</syntaxhighlight> | |||
== Test older OpenVINO version == | |||
Latest revision as of 06:18, 13 July 2026
Setup ssh key for github.com
Host github.com
IdentityFile ~/.ssh/xxx.pem
Download source
sudo apt install git cmake
sudo apt install libssl-dev openssl
mkdir -p ~/llama.cpp/src
git clone https://github.com/ggerganov/llama.cpp ~/llama.cpp/src
Build
Test CPU version
# build
cmake -B build -DGGML_NATIVE=ON
cmake --build build --config Release
# clean
cmake --build build --target clean
Test OpenVINO version
# setup apt source for OpenVINO
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo gpg --output /etc/apt/trusted.gpg.d/intel.gpg --dearmor GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/openvino ubuntu24 main" | sudo tee /etc/apt/sources.list.d/intel-openvino.list
# install OpenVINO and dependencies
sudo apt update
sudo apt install -y openvino
sudo apt install -y libtbb-dev opencl-c-headers ocl-icd-opencl-dev
# build
cmake -B build-openvino -DGGML_OPENVINO=ON -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib"
cmake --build build-openvino --config Release
# Install
cmake --install build-openvino --prefix ~/llama.cpp/openvino
# clean
cmake --build build-openvino --target clean
ln -sf $(find /usr/lib/ -name "libopenvino_intel_gpu_plugin.so" 2>/dev/null | head -n 1) ~/llama.cpp/openvino/lib/
cd ~/llama.cpp/openvino/bin
./llama-cli --list-devices
It sucks, no GPU found.
Available devices: OPENVINO0: OpenVINO Runtime (95663 MiB, 95663 MiB free)
Test SYCL(oneAPI) version
Install dependencies
# install oneAPI
sudo apt install intel-oneapi-mkl-devel
sudo apt install intel-oneapi-compiler-dpcpp-cpp
source /opt/intel/oneapi/setvars.sh
:: initializing oneAPI environment ... bash: BASH_VERSION = 5.2.21(1)-release args: Using "$@" for setvars.sh arguments: --force :: compiler -- latest :: debugger -- latest :: dev-utilities -- latest :: dpl -- latest :: mkl -- latest :: tbb -- latest :: tcm -- latest :: umf -- latest :: oneAPI environment initialized ::
Build
# build
cmake -B build-sycl \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DGGML_SYCL=ON \
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib"
cmake --build build-sycl --config Release
# Install
cmake --install build-sycl --prefix ~/llama.cpp/sycl
# clean
cmake --build build-sycl --target clean
# test GPU
cd ~/llama.cpp/openvino/bin
./llama-cli --list-devices
Got It!
Available devices: SYCL0: Intel(R) Arc(TM) Pro B70 Graphics (32656 MiB, 32128 MiB free)
Test Models
# test model
./llama-server -hf google/gemma-4-2B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9004 # 90 t/s
./llama-server -hf google/gemma-4-E4B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9004 # 90 t/s
./llama-server -hf google/gemma-4-12B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9012 # 47 t/s
./llama-server -hf google/gemma-4-26B-A4B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9026 # 52 t/s
./llama-server -hf google/gemma-4-31B-it-qat-q4_0-gguf --host 0.0.0.0 --port 9031 # 23 t/s