November 15, 2024

How to install and run Llama 3.1 Large Language Model (LLM) locally on your Windows computer

In this large language and Llama tutorial, we explain how to install and run Llama 3.1 on a local Windows computer. We explain how to run Llama from a command prompt window in Windows. Llama 3.1 is a LLM that is an alternative to ChatGPT.

Background information: Llama is a family of LLMs released by Meta AI (Formerly Facebook in February 2023). The newest version of Llama is Llama 3.1, and according to the tests it outperforms other LLMs. Also, smaller models can be run locally on a computer. We will install Llama by first installing Ollama which is an open source AI program enabling us to run LLMs locally on a machine. It can be seen as a version of Docker for LLMs. The YouTube tutorial explaining how to install Llama 3.1 and how to run Llama 3.1 on a local computer is given below.

The installation procedure is explained below.

STEP 1: Download and Install Ollama

We will first install Ollama which will enable us to run LLMs locally. Go to ollama.com, and click on download to download Ollama such that we can run Llama 3.1 from a command prompt. Install the file.

Ollama will automatically install and run. You will see a small Ollama icon in the right lower corner of the screen. If Ollama does not automatically run, click on Start and search for Ollama, and run Ollama.

STEP 2: Install llama 3.1 Model and Run it

After that, click on Models in the top right corner,

Then on Llama 3.1

Then, select the model (in our case, 8GB), and copy and paste the command: ollama run llama3.1

Then, click on Start, and search for Command Prompt, and then in the command prompt, type
ollama run llama3.1 . First time you run this command, it will automatically, download the model, and after that you will see Llama 3.1 prompt. Here, you can start asking questions. Next time you run this command, it will automatically load the Llama prompt, so you can start asking questions.