Llama 3.2 3 B Instruct Q L O R A_ I N T4_ E O8
meta-llamaIntroduction
Llama 3.2, developed by Meta, is a multilingual large language model (LLM) designed for a variety of text-generation tasks. It supports multiple languages, including English, German, French, and Spanish, and is optimized for multilingual dialogue, retrieval, and summarization tasks. Llama 3.2 models are available in 1B and 3B sizes, with both pretrained and instruction-tuned versions.
Architecture
Llama 3.2 utilizes an auto-regressive transformer architecture optimized for text generation. The model features supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to enhance alignment with human preferences. Additionally, it employs quantization techniques to improve inference efficiency on devices with limited computational resources.
Training
Llama 3.2 was pretrained on up to 9 trillion tokens from publicly available sources. The models incorporate logits from larger models like Llama 3.1 8B and 70B during pretraining, leveraging knowledge distillation to enhance performance. Fine-tuning involves several rounds of alignment using Supervised Fine-Tuning, Rejection Sampling, and Direct Preference Optimization.
Guide: Running Locally
To run Llama 3.2 locally, follow these steps:
- Install Dependencies: Ensure you have Python and PyTorch installed. Use the
pip
command to install necessary packages. - Download Model: Access the Llama 3.2 model from Hugging Face's model hub or the official repository.
- Set Up Environment: Configure your environment for PyTorch execution, ensuring GPU support if available.
- Load Model: Use PyTorch to load the model and tokenizer, following the provided guidelines in the documentation.
- Run Inference: Implement code to generate text based on your input, utilizing the model's capabilities.
Cloud GPUs
For enhanced performance, consider using cloud GPU services like AWS EC2, Google Cloud, or Azure. These platforms provide scalable resources to efficiently handle Llama 3.2's computational demands.
License
Llama 3.2 is distributed under the Llama 3.2 Community License Agreement. This license grants non-exclusive, worldwide, non-transferable, and royalty-free rights to use, reproduce, and distribute the Llama Materials. Redistribution requires adhering to specific terms, including the display of "Built with Llama" and providing a copy of the agreement. The license also emphasizes compliance with trade laws and adherence to the Acceptable Use Policy.