How to install and Run Llama 3.2 1B and 3B LLMs on Raspberry Pi and Linux Ubuntu



#llama #ollama #llama3 #llama3.2 #llm #llama3.1 #machinelearning
It takes a significant amount of time and energy to create these free video tutorials. You can support my efforts in this way:
– Buy me a Coffee:
– PayPal:
– Patreon:
– You Can also press the Thanks YouTube Dollar button

In this Large Language Model (LLM) and machine learning tutorial, we explain how to run Llama 3.2 1B and 3B LLMs on Raspberry Pi in Linux Ubuntu. In this tutorial, we use Raspberry Pi 4. However, the performance and speed of running the models will be better on Raspberry Pi 5. Almost everything explained in this tutorial applies to Raspberry Pi 5. The only difference is that the process of overclocking the processor will be different since you need to use different settings and parameters that are more suitable for Raspberry Pi 5.

Before we start with explanations, we need to emphasize the following:
(try to carefully listen to what is explained here)

– In this tutorial, we will be using Raspberry Pi 4 with 4GB of RAM. To enhance the performance of Raspberry Pi 4, we will overclock its GPU and CPU. Furthermore, we will increase the swap memory file size in order to be able to run 3B model. This is very important otherwise, we will not be able to run 3B model since it cannot fit in our memory. On the other hand, if you are using Raspberry Pi 4 with 8GB RAM, this might not be necessary. However, we suggest everyone to increase the swap memory size. This will increase the stability and make sure that the applications do not stop due to the lack of RAM memory. On the other hand, if you are using Raspberry Pi 5, you can also try to increase the swap memory. Here is the disclaimer regarding overclocking and swap memory adjustment:

Disclaimer: We do not take any responsibility if after overclocking, the system becomes unstable or crashes. In our case, the system remained stable after overclocking. We have a heat sink and a cooling fan attached to our Raspberry Pi that keeps the temperature constant. However, it might happen that if Raspberry Pi is not properly cooled, the overclocking process might overheat the processors and create irreparable damage. We do not take any responsibility for this or if your system crashes after overclocking. The crash of the system can easily be repaired by reverting the settings. Also, we do not take any responsibility if after changing the swap file size, the system becomes unstable.

– In this tutorial we are using Linux Ubuntu 24.04. However, you can also use any other supported version of Linux Ubuntu. We created a separate video tutorial explaining how to install Linux Ubuntu 24.04 on Raspberry Pi. A link to that tutorial is given here:

and it will be provided in the description below this video also.

– Instead of using micro-SD cards to run Linux Ubuntu, which are known to be very slow, we are using an external Solid State Drive (SSD). The SSD drive is connected by using a USB 3.0 Raspberry Pi port. That is, we installed Linux Ubuntu on the SSD. Our SSD is shown in the figure below. It is made by Buffalo and it has a capacity of 1000 GB. You can also use a SanDisk SSD or any other USB-based SSD.

[ad_2]

source

Exit mobile version