Welcome! This guide will help you get running in under 15 minutes.
# Verify you have Intel Xe Graphics
lspci | grep -i vga
# Look for:
# - "Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics]"
# - "Intel Corporation AlderLake-P Integrated Graphics"
# - "Intel Corporation DG2 [Arc A770]"
# - Or similar Intel Xe/Arc GPU- OS: Ubuntu 22.04+ or similar Debian-based Linux
- Kernel: 5.15+ (check with
uname -r) - RAM: 8GB+ recommended
- Storage: ~5GB for environment + models
# Clone and setup
git clone https://github.com/YOUR_USERNAME/intel-gpu-llm-inference.git
cd intel-gpu-llm-inference
git submodule update --init --recursive
./setup-intel-gpu-llm.shImportant: If the script adds you to the render group, you must log out and back in for GPU access to work.
After setup completes (or after logging back in):
./quickstart-example.shThis will:
- Download TinyLlama-1.1B (~600MB)
- Convert it to OpenVINO IR format
- Run a test inference on your Intel GPU
- Show you the response time
Expected output: You should see a response generated in 1-3 seconds, proving your GPU is working!
Once quickstart works, try a performance comparison:
# Setup CPU inference for comparison
./setup-llama-cpp.sh
# Download GGUF model for CPU testing
mkdir -p models
cd models
wget https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
cd ..
# Run benchmark
source activate-intel-gpu.sh
./benchmark.py \
--openvino-model tinyllama_ir \
--llama-model models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
--prompt "Write a short story about robots"What to expect: On typical Intel Xe integrated GPUs, you should see 2-3x faster inference compared to CPU-only.
# Activate environment
source activate-intel-gpu.sh
# Download Phi-3 Mini (3.8B parameters, higher quality)
optimum-cli export openvino \
--model microsoft/Phi-3-mini-4k-instruct \
phi3_mini_ir \
--weight-format int4
# Test it
python test-inference.py \
--model-path phi3_mini_ir \
--prompt "Explain quantum computing" \
--streamtest-inference.py: Test any OpenVINO model with custom promptstest-models.sh: Interactive menu for common modelsbenchmark.py: Detailed performance comparisonsBENCHMARK_GUIDE.md: Complete benchmarking workflow
# Check device files (should see renderD128 or similar)
ls -la /dev/dri/
# Verify you're in render group
groups | grep render
# If not, add yourself and log out/in
sudo usermod -aG render $USER# Check OpenCL detection
clinfo -l
# Should show Intel GPU. If not, reinstall drivers:
sudo apt update
sudo apt install --reinstall intel-opencl-icd intel-level-zero-gpu- First run is slower: Model compilation happens on first inference
- Check thermal throttling: Use
intel_gpu_topto monitor - Try smaller models: Start with TinyLlama before trying 7B+ models
- Reduce max_tokens: Use
--max-tokens 50for testing
# Make sure environment is activated
source activate-intel-gpu.sh
# Verify installation
python -c "import openvino_genai; print('OK')"
# If fails, reinstall
pip install --force-reinstall openvino-genai- README.md: Full feature documentation
- BENCHMARK_GUIDE.md: Performance testing methodology
- CONTRIBUTING.md: How to contribute or report issues
- OpenVINO Documentation
- Intel GPU Drivers
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Hardware Reports: Use the Hardware Test Report issue template
- Setup script completed without errors
- Added to
rendergroup and logged back in -
quickstart-example.shruns successfully - GPU inference completes in 1-5 seconds
- Can activate environment with
source activate-intel-gpu.sh - Ready to try other models!
Having issues? Open an issue with:
- Your GPU model (
lspci | grep -i vga) - OS and kernel (
uname -a) - Complete error output
We're here to help! 🚀