In this project, we will show you how to install and run the distilled versions of Deepseek R1 on your Raspberry Pi.
![Running Deepseek AI on a Raspberry Pi](https://pimylifeup.com/wp-content/uploads/2025/02/Raspberry-Pi-Deepseek-Thumbnail.jpg)
Deepseek is one of the AI companies that have quickly taken the world by storm by offering an open-source AI that can compete with some of the best.
Part of their magic sauce is the availability of what they call “distilled” versions of their larger model. These distilled versions are significantly lighter variants of their main model; while they contain significantly fewer parameters, they make up for it by the way those parameters have been chosen.
Thanks to these distilled Deepseek variants, we can get this AI model running on a Raspberry Pi. While the models we will be using don’t quite have that same accuracy as the full-blown version of Deepseek-R1, it is still impressive that they can even run at all.
There are five different variants of the Deepseek AI that can run locally on a Pi. The first and most usable one, “only,” has 1.5B parameters. Don’t expect the best results from this, but this is the model that will give you the fastest results.
The other distilled variants that can still be run on a Raspberry Pi but run significantly slower are the “7b”, “8b,” and “16b” variants. The one catch with the “16b” variant is that you will require a Raspberry Pi that has 16GB of RAM to run it.
Of course, like any AI model on a Pi, the newer Raspberry Pi you have, the better experience you are going to have. These models will really consume every bit of performance that is available.
Equipment
Below is a list of the equipment we used when running the Deepseek R1 AI model on our Raspberry Pi.
Recommended
- Raspberry Pi ( Amazon )
- Micro SD Card ( Amazon )
- Power Supply ( Amazon )
- Ethernet Cable ( Amazon ) or Wi-Fi ( Amazon )
Optional
- Raspberry Pi Case ( Amazon )
- USB Mouse ( Amazon )
- USB Keyboard ( Amazon )
- HDMI Cable ( Amazon )
- Monitor ( Amazon )
This tutorial was tested on a Raspberry Pi 5 running the latest version of Raspberry Pi OS Bookworm Lite.
Installing and Using Deepseek on the Raspberry Pi
Over the following sections, we will walk you through installing and using the Deepseek AI model on your Raspberry Pi.
These steps will be run entirely within the terminal, so we recommend that you use Raspberry Pi OS Lite. Running a lighter OS will also help with getting the most out of these AI models. Generating a response from Deepseek, even with the smaller parameter models is incredibly computationally expensive.
We have embedded a video below that will walk you through all of the steps we followed to get Deepseek running on our Pi. Of course, we have our written steps included just below the video if you prefer those.
Preparing your Pi
1. Before we begin running the Deepseek distilled models on our Raspberry Pi, we should ensure that our operating system is up-to-date.
Upgrade the package list and any out-of-date packages by using the following two commands.
sudo apt update
sudo apt upgrade
2. Our next step is to run the following command to ensure that the curl package is available on your Pi.
We will be using this to grab and install the program that we will be using to run the Deepseek AI models.
sudo apt install curl
3. The final part of this preparation is to install the Ollama software on your Pi. This can be done easily by using the following command within the terminal.
The installation process can take a few minutes to complete.
curl -fsSL https://ollama.com/install.sh | sh
Running the Deepseek Models on your Pi
4. Now that you have your Raspberry Pi prepared, we can begin running and trying out the distilled versions of Deepseek R1.
To test each of these models, we will be using a very simple question just to see how it evaluates it and how fast it can generate a response on our Raspberry Pi.
Deepseek R1 1.5b
a. Let us start off by testing the smallest of the distilled versions of Deepseek, as well as the model that will run the best on the Raspberry Pi’s relatively weak hardware.
Using the following command, you can run the 1.5 billion parameter version of Deepseek R1 on your Pi. Please note that you will need at least 1GB of free space on your device to run this AI model
ollama run deepseek-r1:1.5b
b. Once it has started, you will see it generate a response in real time. For this example, we will simply ask the Deepseek AI model, “why does it snow”.
From its response, you can immediately feel that this model does not have a huge amount of data from which it can pull information. With some answers, you will see that it will more often than not get things terribly wrong.
However, those are just what you sacrifice when distilling a larger model enough to run on weak hardware.
>>> Why does it snow?
<think>
</think>
The answer to "why does it snow?" depends on the weather conditions, time of year, and location.
Snowfall can occur due to natural phenomena like the North Atlantic Oscillation, human activities
(e.g., melting ice, urban heat island effect), or climate change. To get more specific
information about why a particular place is experiencing snowfall, you should check local
meteorological data or use an online weather calculator.
c. Below you can get an idea of how fast this model runs on our Raspberry Pi. For example, the above answer took 9.7 seconds to be generated on our Raspberry Pi using the Deepseek model.
The prompt equated to 8 tokens, and it only took 612ms for the AI to evaluate it. The response itself took up a whole 9 seconds to generate at a rate of 9 tokens a second.
total duration: 9.765056893s
load duration: 41.498181ms
prompt eval count: 8 token(s)
prompt eval duration: 612ms
prompt eval rate: 13.07 tokens/s
eval count: 89 token(s)
eval duration: 9.11s
eval rate: 9.77 tokens/s
Deepseek R1 7b
a. Let’s crank things up a notch by running the 7 billion parameter distilled version of Deepseek on our Raspberry Pi using the following command within the terminal.
This model is almost five times larger than the smallest distilled version, and as you will soon see, that significantly hits how fast it can generate a response on our Pi’s limited hardware.
To run this model, you will need to have 4.7GB of free space.
ollama run deepseek-r1:7b
b. Immediately, the response from the Deepseek AI model running on our Raspberry Pi is much more useful.
While it took significantly longer to generate, you can tell that the AI model has access to a lot more data than the smallest distilled version.
>>> Why does it snow?
<think>
</think>
Snow occurs when water vapor in the atmosphere freezes and falls to the ground as ice. This
process is influenced by several factors, including temperature, humidity, and wind. When the
temperature drops below freezing (0°C or 32°F) and there are enough water droplets in the air,
they can freeze and form snowflakes. These snowflakes then come together to create snowstorms
when the wind blows them into the air.
In summary, snow forms due to the freezing of water vapor in the atmosphere under cold and moist
conditions.
c. As mentioned earlier, the downside of running this larger distilled version of Deepseek on our Raspberry Pi is that performance does take a significant hit.
When compared against the much smaller “1.5b” model, the evaluation rate is almost four times slower. It generates tokens at a rate of 2.29 a second vs the smaller models 9.77 tokens.
total duration: 52.792391411s
load duration: 37.262035ms
prompt eval count: 8 token(s)
prompt eval duration: 2.903s
prompt eval rate: 2.76 tokens/s
eval count: 114 token(s)
eval duration: 49.845s
eval rate: 2.29 tokens/s
Deepseek R1 8b On the Raspberry Pi
a. This next distilled version of Deepseek R1 is the last to run on most Raspberry Pis. Anything larger just requires more RAM than most Pi’s have available.
This version only has an additional billion parameters, so you won’t see an improvement as big as between 1.5b and 7b. If you are looking for a usable model, it’s worth testing both the 7b and 8b models to see which consistently produces the desired results.
You can run this Deepseek AI model on your Raspberry Pi by using the command below within the terminal.
ollama run deepseek-r1:8b
b. The response produced by Deepseek on our Raspberry Pi is very similar to the one generated by the slightly smaller “7b” variant.
Both results are very usable, and some of the best AI results you will be able to generate locally on a Raspberry Pi without attaching a much more powerful computation device like a GPU.
>>> Why does it snow?
<think>
</think>
The phenomenon of snowfall occurs when the water vapor in the atmosphere condenses into ice
crystals due to low temperatures, which then fall to the ground. This process is part of the
Earth's hydrological cycle and is influenced by various factors such as temperature, humidity,
and atmospheric pressure. The exact mechanisms behind snowfall are complex and involve a
combination of physical processes in the atmosphere.
c. The benchmark results produced from this model are interesting as it generated 10 seconds faster than the slightly smaller Deepseek model.
The caveat to this, however, is that it produced a smaller result, which means it required fewer tokens to generate the result. This fewer generated tokens is where the speed boost comes from.
total duration: 40.411836103s
load duration: 51.13561ms
prompt eval count: 8 token(s)
prompt eval duration: 3.108s
prompt eval rate: 2.57 tokens/s
eval count: 81 token(s)
eval duration: 37.25s
eval rate: 2.17 tokens/s
Deepseek R1 14b
a. Now the final variant of Deepseek that is runnable on a Raspberry Pi is the 14 billion parameter version. The huge caveat to this, however, is that you must be using a 16GB variant of the Raspberry Pi.
As we, unfortunately, don’t currently have one, we won’t be able to test the results for ourselves, but we can show you what happens when you attempt to run a Deepseek R1 model when you don’t have enough RAM.
Run this version of the Deepseek AI model on your Pi using the following command. Please note that this larger model will require at least 9 GB of free space.
ollama run deepseek-r1:14b
b. We ran into the following error message because we didn’t have enough RAM on our Raspberry Pi.
Error: model requires more system memory (10.6 GiB) than is available (7.6 GiB)
Conclusion
Hopefully, at this point, you will now have a solid idea of how you can actually run the Deepseek R1 AI model on your Raspberry Pi.
Deepseek R1 is one of the more impressive AI projects that have popped up thanks to it being completely open-source. Being open source allows you to run this AI model locally without relying on a third-party service, helping boost privacy as you don’t have to worry about what they are doing with your data.
Another impressive thing about Deepseek is that its distilled variants are relatively usable and can be run on a significantly weaker device than you would expect, such as the Raspberry Pi.
Please feel free to drop a comment below if you have had any issues with getting this AI model to work on your Pi.
If you liked this guide, be sure to check out some of our many other Raspberry Pi projects to see what else you can do on your device.