---
title: "Llama 3.1 - 405B, 70B & 8B with multilinguality and long context"
description: "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."
url: "https://swe.quest/articles/llama-3-1-405b-70b-8b-with-multilinguality-and-long-context-5301df1fb1ba738c"
canonical: "https://huggingface.co/blog/llama31"
source: "Hugging Face"
published: "2024-07-23"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 20
tags: ["llms","inference","model-training","ai-agents"]
---

# Llama 3.1 - 405B, 70B & 8B with multilinguality and long context

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-07-23, 20 min read, Announcement. Original: [https://huggingface.co/blog/llama31](https://huggingface.co/blog/llama31)

## Summary

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. All models support 128K context, 8 languages and tool calling, and the license now permits using outputs for distillation and synthetic data. Concrete memory figures are given: the 405B model needs 810 GB in FP16 or 405 GB in FP8, and KV cache at 128K tokens reaches 123 GB for 405B and rivals the weights' size for 8B. There are also fine-tuning estimates for full, LoRA and Q-LoRA, Transformers usage and 4-bit loading, and the prompt format with the new ipython role and built-in tool-calling tokens.

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)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)

## Prerequisites

- LLM inference basics ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))
- Hugging Face Transformers
- model quantization ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))

## Keywords

Llama 3.1, Hugging Face Transformers, Llama Guard 3, Prompt Guard, TGI, TRL, bitsandbytes, Grouped-Query Attention

## Related posts

- [Welcome Llama 3 - Meta's new open LLM](https://swe.quest/articles/welcome-llama-3-meta-s-new-open-llm-76a74164d4c8a37c.md): Hugging Face · 2024-04-18 · Medium · 11 min read · LLMs, Inference & serving, Model training, Python
  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.
- [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.
- [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.
- [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.
- [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.

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)
