Components
- Raspberry 5 (I use 2GB RAM , Higher the RAM may improve the performance )
- 2A or More power supply ( I use MI 3A/5V phone charger )
- 32 GB SD Card
- USB-UART cable /Ethernet Cable( you can buy from local shops / from aliexpress )
- Linux( I use https://linuxmint.com/) or Windows PC
Steps
- Download the latest raspberry PI Image & Burn it in the SD Card. Configure the Wifi settings / SSH and user Name /Password https://www.raspberrypi.com/software/
sudo apt install rpi-imager

2. Download and compile llama.cpp
git clone https://github.com/ggerganov/llama.cpp
$ cd llama.cpp
install cmake
sudo apt install curl libcurl4-openssl-dev
cmake -B build
cmake --build build --config Release
3. Download deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B (copy below to ‘pyhug.py’ and run)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",local_dir="DeepSeek-R1-GGUF2",local_dir_use_symlinks=False,revision="main")
4. Convert the model.safetensors file to gguf file
python3 convert_hf_to_gguf.py "/path/DeepSeek-R1-GGUF2" --outfile deep.gguf
5.Connect to Raspberry PI using UART or Network
screen /dev/ttyUSB0 115200
6. Run llama
./llama-cli --model /home/admin/Bookshelf/deep.gguf