Dorna2 Llama3.1 8 B Instruct

PartAI

Introduction

Dorna2-Llama3.1-8B-Instruct is a language model developed by Part AI, designed to work with both English and Persian data. It is a decoder-only model, fine-tuned specifically for Persian data, and is part of the broader Dorna model family. This model is based on the Meta Llama 3.1 Instruct model.

Architecture

The model is a large language model (LLM) that utilizes the architecture of Meta Llama 3.1-8B Instruct. It employs a decoder-only structure and is optimized for text generation and conversational tasks. The model is capable of performing in both English and Persian languages.

Training

Dorna2-Llama3.1-8B-Instruct has been fine-tuned on Persian datasets to enhance its performance in understanding and generating text in the Persian language. It has been evaluated on multiple tasks to benchmark its capabilities, including common knowledge, reasoning, and specialized examinations.

Guide: Running Locally

To run the model locally, you will need to use the Transformers library by Hugging Face. Here is a basic guide:

  1. Install Dependencies: Ensure you have Python and PyTorch installed. Then install the Transformers library:

    pip install transformers
    
  2. Load the Model: Use the following code to load the model:

    import torch
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    model_path = "PartAI/Dorna2-Llama3.1-8B-Instruct"
    tokenizer = AutoTokenizer.from_pretrained(model_path)
    model = AutoModelForCausalLM.from_pretrained(
        model_path,
        torch_dtype=torch.bfloat16,
        device_map="auto",
    )
    
  3. Inference: Use the model to generate text based on input prompts. Refer to the example in the provided code snippet for guidance.

  4. Cloud GPUs: For optimal performance, especially given the model's size, consider using cloud GPUs from platforms like Google Colab, AWS, or Azure.

License

The model is released under the llama3.1 license. For more details, refer to the model's page on the Hugging Face platform.

More Related APIs in Text Generation