Meta Llama 3.1 8 B Instruct abliterated

mlabonne

Introduction

The Meta-Llama-3.1-8B-Instruct-abliterated is an uncensored version of the Llama 3.1 8B Instruct model. It has been enhanced using the "abliteration" technique, making it suitable for a variety of text generation tasks. This model is part of the broader effort by Hugging Face to provide advanced transformer-based models for developers and researchers.

Architecture

Meta-Llama-3.1-8B-Instruct-abliterated is based on the Llama 3.1 architecture with 8 billion parameters. It is designed for text generation tasks and has been modified to remove content censorship using the abliteration technique. This model is particularly useful for generating diverse and uncensored text outputs.

Training

The model has been evaluated across multiple datasets, showcasing its capability in text generation:

  • IFEval (0-Shot): Achieved a strict accuracy of 73.29.
  • BBH (3-Shot): Achieved a normalized accuracy of 27.13.
  • MATH Lvl 5 (4-Shot): Recorded an exact match accuracy of 6.42.
  • GPQA (0-shot): Achieved a normalized accuracy of 0.89.
  • MuSR (0-shot): Achieved a normalized accuracy of 3.21.
  • MMLU-PRO (5-shot): Achieved an accuracy of 27.81.

Guide: Running Locally

  1. Setup Environment: Ensure you have Python and the necessary libraries like transformers installed. You can create a virtual environment using venv or conda.

  2. Install Dependencies:

    pip install transformers safetensors
    
  3. Download Model:

    • Use the Hugging Face Hub to download the model locally.
    from transformers import AutoModelForCausalLM, AutoTokenizer
    
    model_name = "mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated"
    model = AutoModelForCausalLM.from_pretrained(model_name)
    tokenizer = AutoTokenizer.from_pretrained(model_name)
    
  4. Inference:

    input_text = "Your prompt here"
    inputs = tokenizer(input_text, return_tensors="pt")
    outputs = model.generate(**inputs)
    print(tokenizer.decode(outputs[0], skip_special_tokens=True))
    
  5. Hardware Requirements: Due to its size, running this model efficiently requires a powerful GPU. Consider using cloud services such as AWS, GCP, or Azure that provide access to high-performance GPUs.

License

The Meta-Llama-3.1-8B-Instruct-abliterated model is released under the llama3.1 license. Ensure compliance with the terms and conditions specified in the license when using the model.

More Related APIs in Text Generation