Skip to main content
AIDive
EN
Sign in
How to Download, Install, and Run Llama 4

How to Download, Install, and Run Llama 4

Instructions for downloading, installing, and using Llama 4 Scout and Maverick

AIDive Desk
0

LLama 4 is a new series of language models from Meta*, designed for working with text, code, dialogue prompts, and other natural language processing tasks. It is positioned as an open alternative to GPT-4. It can be used to create chatbots, generate text, analyze documents, automate tasks, and other scenarios where high-quality language generation is required.

⚠️ Warning

Before moving on to installation, keep a few important points in mind:

LLaMA 4 models are very large — from 100 to 220 GB. They require significant disk space.

The models use a Mixture of Experts architecture and require powerful hardware — they run slowly on a processor, and on most laptops they do not launch directly.

At the time of publication, Meta provides only weights in .safetensors format, which cannot be run via llama.cpp. To run them, you will need the transformers library, text-generation-webui, or adaptation for third-party solutions.

Even installation and downloading will take quite a lot of time — make sure you have a stable internet connection.

Errors

Errors will almost certainly occur while installing and running the model: library version mismatches, insufficient memory, an incorrect file path, import errors — all of this is part of the process.

Paste it into any chatbot, for example:

ChatGPT by OpenAI;

Claude by Anthropic;

Grok by xAI.

Explain that you are installing LLama 4 locally and ask it to analyze the error.

Get Access to Llama 4

Access to the Llama 4 Scout and Maverick models is provided without restrictions. You need to open the official page, select Download models, and fill in the information:

First name;

Last name;

Date of birth;

Email;

Country;

Company name — you can make one up or name an existing one;

Job title — choose any from the list.

Installing Llama 4

After filling in the information, you will receive a request ID and instructions for downloading the models. You can download them within 48 hours, up to 5 times, using unique links. They will be sent to the email address you provided.

Preparing a Folder for the Model

✅ macOS:

`cd ~/Downloads mkdir -p llama/models cd llama/models`

💻 Windows, cmd:

`cd %USERPROFILE%\Downloads mkdir llama\models cd llama\models`

Instead of %USERPROFILE%, enter the profile name in Windows, for example Admin.

Download LLaMA 4 Scout or Maverick via curl or Invoke-WebRequest

Meta provides a unique link for downloading the model, valid for 48 hours. It looks approximately like this:

Do not try to use the link from the instructions; it is invalid

https://llama4.llamameta.net/?Policy=eyJTdGF0ZW1lbnQiOlt7InVuaXF1ZV9oYXNoIjoicGgxeGRqOGx3bHIwYTU2YWVpMjM5ZDNpIiwiUmVzb3VyY2UiOiJodHRwczpcL1wvbGxhbWE0LmxsYW1hbWV0W70z-gRaD4DsMGSiu4i55xt4nIohvUC6QB5weJBShoYdiLhcCUQii6-ZyAgBgBcOl67-5wWEhoLwnlkJf5s4XvZaMYqKCJ6SGMK9MidUsVk12NUoBhEwh7kzlvBXbqElbeF%7E26dE1N8v3lS0rLD3OJ3Hk636bNb78GuRqNgQYt21vuA7PuGjKJsMlUyc7Ds7JJMOjpim5ihr4xQQmk-sjUJOlbMNDaKXnUBQ-UytMAwAxw3d9uL2JJ7u2y9A\_\_&Key-Pair-Id=...&Download-Request-ID=...

Important: do not change the URL and do not insert * into the address! This will cause a 403 error.

✅ macOS:

curl -L -o llama-4-scout-17b-instruct.safetensors "Link"

💻 Windows PowerShell:

Invoke-WebRequest \\ -Uri "Link"`

Or 💻 Windows cmd + wget:

wget "Link" -O llama-4-scout-17b-instruct.safetensors

**Result: a **`.safetensors` file

After a successful download, you will get the file:

llama-4-scout-17b-instruct.safetensors

Size: from 100 to 220 GB depending on the version.

What to Do After Downloading .safetensors

The .safetensors file you downloaded contains the LLaMA 4 model weights. You can run it in several ways — depending on your goals and your computer’s capabilities.

Option 1. Use transformers from Hugging Face on CPU

This method is suitable for testing or working with short prompts. It runs on CPU, without a graphics card.

Step 1. Install Dependencies

✅ macOS:

pip install transformers accelerate sentencepiece

💻 Windows (cmd or PowerShell):

pip install transformers accelerate sentencepiece

Step 2. Minimal Code to Run the Model

Create a file run\_llama.py with the following content:

from transformers import AutoTokenizer, AutoModelForCausalLM import torch model_path = "./llama-4-scout-17b-instruct.safetensors" # path to the model tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct", use_fast=False) model = AutoModelForCausalLM.from_pretrained( model_path, torch_dtype=torch.float32, # CPU low_cpu_mem_usage=True, device_map="auto", ) prompt = "Briefly explain how the LLaMA 4 neural network works." inputs = tokenizer(prompt, return_tensors="pt") with torch.no_grad(): outputs = model.generate(**inputs, max_new_tokens=150) print(tokenizer.decode(outputs[0], skip_special_tokens=True))

meta-llama/Meta-Llama-3-8B-Instruct is used here only to load the tokenizer — replace it if Meta releases a separate LLaMA 4 tokenizer.

Run:

python run_llama.py

Option 2. Connect to WebUI (text-generation-webui)

If you want a convenient graphical interface in the browser, you can use text-generation-webui:

Clone the repository:

git clone https://github.com/oobabooga/text-generation-webui cd text-generation-webui

Copy the .safetensors model into the models/llama4 folder

Run:

python server.py --model llama4

This option requires installing additional libraries. It is suitable for advanced users and servers with GPUs.

Examples of Using LLama 4

Even if you are not a developer and do not run LLaMA 4 in production, you can use it to solve simple but interesting tasks — right on your own computer.

Creating a Local Chatbot

Run LLama 4 in Instruct mode and ask it questions in any style — from business to everyday topics. The model can:

explain complex topics in simple language;

help with texts — emails, plans, resumes;

hold a conversation in a convenient format, even without the internet.

Example question:

Explain in simple terms how cryptocurrencies work.

Generating Stories, Emails, and Ideas

With LLaMA 4, you can write:

short stories and scenes for books;

motivational texts;

script ideas for videos, TikTok, or a podcast.

Example prompt:

Come up with a funny story.

*Meta is banned in the territory of the Russian Federation.

Summary

  • Author
    AIDive Desk
    AIDive Desk
  • PublishedApril 7, 2025
  • Views

Categories

    0 comments

    Newsletter

    Get notified when new AI tools are added

    Join the community.