Meta Llama 3 8 B

meta-llama

Introduction

Meta-Llama-3-8B is part of the Meta Llama 3 family of large language models (LLMs) developed by Meta. These models are designed for generative text tasks and are available in 8 billion and 70 billion parameter variants. They are optimized for dialogue use cases and aim to provide helpful and safe outputs.

Architecture

Meta-Llama-3-8B is an auto-regressive language model utilizing an optimized transformer architecture. The model employs supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. It supports text input and generates both text and code outputs.

Training

Meta-Llama-3 models were pretrained on a large dataset of over 15 trillion tokens of publicly available data. The fine-tuning process involved additional publicly available instruction datasets and over 10 million human-annotated examples. The training process used custom libraries and Meta's Research SuperCluster, resulting in a significant carbon footprint, which Meta has offset through their sustainability program.

Guide: Running Locally

To run Meta-Llama-3-8B locally, follow these steps:

  1. Install Dependencies:

    • Ensure you have Python installed.
    • Install the transformers and torch libraries.
  2. Using Transformers:

    import transformers
    import torch
    
    model_id = "meta-llama/Meta-Llama-3-8B"
    
    pipeline = transformers.pipeline(
        "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
    )
    print(pipeline("Hey how are you doing today?"))
    
  3. Using LLAMA3 Codebase:

  4. Hardware Considerations:

    • For optimal performance, use cloud-based GPUs like NVIDIA A100 or H100. These can be provisioned through cloud platforms such as AWS, GCP, or Azure.

License

Meta-Llama-3-8B is released under a custom commercial license. Users are granted a non-exclusive, worldwide, non-transferable, and royalty-free license to use, reproduce, distribute, and modify the Llama Materials. Redistribution must include a copy of the license agreement and appropriate attribution to Meta Llama 3. The full license details are available at Meta's License Page.

More Related APIs in Text Generation