Welcome Llama 3 - Meta's new open LLM
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.
Related posts
- Llama 2 is here - get it on Hugging Face
Hugging Face mediumAdeptMeta'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. Inference runs through transformers 4.31 or Text Generation Inference and Inference Endpoints, with recommended GPU sizes per model (A10G for 7B, A100 for 13B, 2-4x A100 for 70B). The 7B model can be fine-tuned on a single 16GB T4 using QLoRA and trl's SFTTrainer. The chat prompt format uses [INST] and <<SYS>> delimiters, and prompts must match the training template exactly for system prompts and multi-turn conversations to work.
- Llama 3.1 - 405B, 70B & 8B with multilinguality and long context
Hugging Face mediumAdeptMeta'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.
- Welcome Gemma - Google’s new open LLM
Hugging Face mediumAdeptGoogle's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context. On the Open LLM Leaderboard Gemma 7B scores 63.75, comparable to Mistral 7B, while Gemma 2B trails Phi-2. Hugging Face supports it through Transformers 4.38, including bfloat16 inference in about 18 GB, 4-bit loading in about 9 GB, and a ~4x speedup with torch.compile. Other integrations include JAX/Flax weights, Vertex AI/GKE and Inference Endpoints deployment via Text Generation Inference with an OpenAI-compatible Messages API, and a QLoRA fine-tuning recipe with TRL that takes about 9 hours on one A10G.
- Deploy Meta Llama 3.1 405B on Google Cloud Vertex AI
Hugging Face mediumAdeptMeta 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. FP16 weights would need ~810 GB, so FP8 (~405 GB) is the recommended way to fit one node while leaving room for KV cache and CUDA graphs. The walkthrough covers the A3 quota requests, gcloud and SDK setup, registering the model with TGI environment variables (MODEL_ID, NUM_SHARD=8, HF token), and deploying to an endpoint, which takes about 25-30 minutes. It then shows how to apply the Llama 3.1 chat template with transformers and send prediction requests to the endpoint from Python.
- Llama can now see and run on your device - welcome Llama 3.2
Hugging Face mediumAdeptMeta'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. Vision models handle 128k context but attend only to the last image, and the multimodal license excludes EU-domiciled individuals and companies. The 3B instruct model matches Llama 3.1 8B on IFEval and the small models fit in under 2 GB at INT4. Transformers 4.45+ code samples cover text and vision inference, alongside llama.cpp, Transformers.js, fine-tuning and cloud deployment options.