To install and run the DeepSeek-R1:32B language model on your Ubuntu 22.04 system with an Intel Arc A770 16GB VRAM GPU, follow these detailed steps. This guide assumes a minimal installation of Ubuntu with no additional compilers, language interpreters, or development tools installed.
1. Install Essential Dependencies
Begin by updating your package lists and installing essential tools:
sudo apt update
sudo apt install curl lshw pciutils
2. Install Ollama
Ollama is a lightweight framework that simplifies the installation and usage of various large language models (LLMs) locally.
- Download and Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
This command downloads and executes the Ollama installation script.
- Start the Ollama Service:
ollama serve
This starts the Ollama server, making it ready to manage and run models.
3. Install DeepSeek-R1:32B Model
The DeepSeek-R1:32B model is a large language model that requires significant resources.
- Pull the Model Using Ollama:
ollama pull deepseek-r1:32b
This command downloads the DeepSeek-R1:32B model to your local machine. Ensure you have sufficient disk space, as this model is large.
4. Configure Hardware and BIOS/EFI Settings
Given that your system uses an Intel Arc A770 GPU, ensure that your hardware and BIOS/EFI settings are configured to support GPU operations:
5. Enable CPU Offloading (If Necessary)
If your GPU's VRAM is insufficient for the DeepSeek-R1:32B model, you can offload part of the model to the CPU:
- Set the Number of CPU Threads:
export OLLAMA_NUM_THREADS=8
Replace 8 with the number of CPU threads you wish to allocate. This setting helps manage CPU resources during model inference.
- Enable Memory Optimization:
export OLLAMA_MEMORY_OPTIMIZATION=1
This environment variable enables memory optimization, which can help in managing system resources more efficiently.
6. Run the DeepSeek-R1:32B Model
With the model downloaded and configurations set, you can now run the model:
ollama run deepseek-r1:32b
This command starts the model, and you can interact with it through the command line interface.
Additional Considerations
By following these steps, you should be able to install and run the DeepSeek-R1:32B language model on your Ubuntu 22.04 system with an Intel Arc A770 GPU.