---
title: "Welcome Llama 3 - Meta's new open LLM"
description: "Meta's Llama 3 ships in 8B and 70B sizes, each with base and instruct variants, plus Llama Guard 2, a safety classifier fine-tuned on Llama 3 8B."
url: "https://swe.quest/articles/welcome-llama-3-meta-s-new-open-llm-76a74164d4c8a37c"
canonical: "https://huggingface.co/blog/llama3"
source: "Hugging Face"
published: "2024-04-18"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 11
tags: ["llms","inference","model-training","python"]
---

# Welcome Llama 3 - Meta's new open LLM

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-04-18, 11 min read, Announcement. Original: [https://huggingface.co/blog/llama3](https://huggingface.co/blog/llama3)

## Summary

Meta's Llama 3 ships in 8B and 70B sizes, each with base and instruct variants, plus Llama Guard 2, a safety classifier fine-tuned on Llama 3 8B. Key changes from Llama 2 are a 128K-token vocabulary that encodes text more efficiently but enlarges the embedding matrices, Grouped-Query Attention in the 8B model, an 8K context, and pretraining on 15T tokens. Instruct tuning combined SFT, rejection sampling, PPO and DPO. The post gives the instruct prompt format, Transformers 4.40 usage with bf16 or 4-bit loading (about 16 GB vs 7 GB), deployment via TGI, Vertex AI or SageMaker, and a QLoRA fine-tune with the TRL CLI that takes about 4 hours on a single A10G.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Hugging Face Transformers
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Llama 3, Llama Guard 2, Hugging Face Transformers, TRL, Text Generation Inference, QLoRA, Grouped-Query Attention

## Related posts

- [Llama 2 is here - get it on Hugging Face](https://swe.quest/articles/llama-2-is-here-get-it-on-hugging-face-c56eec059476bd0f.md): Hugging Face · 2023-07-18 · Medium · 9 min read · LLMs, Inference & serving, Model training, Python
  Meta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem.
- [Llama 3.1 - 405B, 70B & 8B with multilinguality and long context](https://swe.quest/articles/llama-3-1-405b-70b-8b-with-multilinguality-and-long-context-5301df1fb1ba738c.md): Hugging Face · 2024-07-23 · Medium · 20 min read · LLMs, Inference & serving, Model training, AI agents
  Meta's Llama 3.1 ships in 8B, 70B and 405B sizes, each with base and instruct variants, plus the Llama Guard 3 and Prompt Guard safety classifiers.
- [Welcome Gemma - Google’s new open LLM](https://swe.quest/articles/welcome-gemma-google-s-new-open-llm-a7d68dd269473a81.md): Hugging Face · 2024-02-21 · Medium · 9 min read · LLMs, Inference & serving, Model training, Python
  Google's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context.
- [Deploy Meta Llama 3.1 405B on Google Cloud Vertex AI](https://swe.quest/articles/deploy-meta-llama-3-1-405b-on-google-cloud-vertex-ai-013efe3f83445849.md): Hugging Face · 2024-08-19 · Medium · 12 min read · Inference & serving, LLMs, Cloud platforms
  Meta Llama 3.1 405B Instruct in FP8 can be served on a single Google Cloud A3 node (8x H100 80GB, ~640 GB VRAM) through Vertex AI, using Hugging Face's Text Generation Inference Deep Learning Container.
- [Llama can now see and run on your device - welcome Llama 3.2](https://swe.quest/articles/llama-can-now-see-and-run-on-your-device-welcome-llama-3-2-7daa894f937a79ac.md): Hugging Face · 2024-09-25 · Medium · 16 min read · LLMs, Computer vision, Inference & serving, Model training
  Meta's Llama 3.2 adds ten open-weight models: 11B and 90B vision models built by attaching a vision tower and image adapter to frozen Llama 3.1 8B/70B text models, 1B and 3B multilingual text models aimed at on-device use, and Llama Guard 3 variants for vision and small deployments.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
