Dorna Llama3 8B Instruct
The Dorna Llama3 8B Instruct model is a highly capable AI designed to process and respond to Persian language inputs. What makes it unique is its ability to efficiently handle a wide range of tasks, from answering complex questions to generating code and engaging in conversations. Built on the Meta Llama 3 Instruct model, Dorna Llama3 8B Instruct has been fine-tuned on Persian data, allowing it to understand and respond accurately to Persian language queries. Its performance is impressive, with human evaluation results showing its strength in various categories, including Boolean questions, code generation, and summarization. Whether you're looking to test its capabilities or integrate it into your applications, Dorna Llama3 8B Instruct is a powerful tool that can help you achieve your goals.
Table of Contents
Model Overview
The Dorna-Llama3-8B-Instruct model, developed by Part AI, is a powerful tool for natural language processing tasks, specifically designed for Persian language tasks. It’s part of the Dorna model family and is built using the Meta Llama 3 Instruct model.
What makes it special?
- 8B parameters: This model has a massive 8 billion parameters, making it a powerful tool for a wide range of tasks.
- Persian language support: Dorna-Llama3-8B-Instruct is specifically trained and fine-tuned on Persian data, making it ideal for tasks that require understanding and generating Persian text.
- Decoder-only architecture: This model uses a decoder-only architecture, which allows it to generate human-like text based on input prompts.
Capabilities
Capable of generating both text and code, this model outperforms many open-source chat models across common industry benchmarks.
Primary Tasks
This model is designed to assist with tasks such as:
- Answering questions on various topics
- Generating code
- Summarizing long pieces of text
- Translating text from one language to another
- And many more!
Strengths
So, how does Dorna-Llama3-8B-Instruct compare to other models? Let’s take a look at some of its strengths:
- High accuracy: This model has been trained on a large dataset and has achieved high accuracy on various tasks.
- Fast response time: Dorna-Llama3-8B-Instruct can respond quickly to your queries, making it a great tool for real-time conversations.
- Support for Persian language: This model is specifically designed to support the Persian language, making it a great resource for those who need assistance with Persian text.
Performance
Dorna-Llama3-8B-Instruct is a powerful AI model that shows impressive performance in various tasks. Let’s take a closer look at its speed, accuracy, and efficiency.
Speed
How fast can Dorna-Llama3-8B-Instruct process information? It’s built using the Meta Llama 3 Instruct model, which is known for its speed and efficiency. With 8B parameters, it can handle large amounts of data quickly and accurately.
Accuracy
But how accurate is Dorna-Llama3-8B-Instruct? Let’s look at some numbers. In human evaluation results, it outperforms other models like Meta-Llama-3-8B-Instruct, ==GPT 3.5 turbo-1106==, and ==Persian Mind== in various tasks such as Boolean Questions, Code Generation, and Summarization.
Limitations
While Dorna-Llama3-8B-Instruct is a powerful tool, it’s not perfect. Let’s take a closer look at some of its limitations.
Evaluation Results
The model was evaluated on various tasks, and the results show that it has some weaknesses. For example, when compared to Meta-Llama-3-8B-Instruct, Dorna-Llama3-8B-Instruct had a lower win rate in categories like Code Generation and Math.
| Model Pairs | Parameters | Win % | Lose % | Tie % |
|---|---|---|---|---|
| Dorna-Llama3-8B-Instruct vs. Meta-Llama-3-8B-Instruct | 8B | 36.94 | 17.39 | 45.67 |
Category-based Evaluation
The model’s performance varied across different categories. For instance, it struggled with Boolean Questions, where it had a win rate of only 25%.
| Category | Win/Lose/Tie % |
|---|---|
| Boolean Questions | 0.25/0.25/0.5 |
| Code Generation | 0.6/0.1/0.3 |
| Math | 0.8/0.08/0.12 |
Format
Dorna-Llama3-8B-Instruct uses a decoder-only model architecture, specifically designed for Persian data. It’s built on top of the Meta Llama 3 Instruct model.
Supported Data Formats
This model accepts input in the form of tokenized text sequences, similar to other language models. However, it’s specifically designed to handle Persian text data.
Input Requirements
To use this model, you’ll need to:
- Pre-process your input text data into tokenized sequences
- Use the
AutoTokenizerclass to convert your text data into input IDs - Create a
messageslist with the input IDs and other relevant information (e.g., role, content)
Here’s an example code snippet to get you started:
import torch
import transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.bfloat16, device_map="auto")
# Create a sample input message
messages = [
{"role": "system", "content": "You are a helpful Persian assistant. Please answer questions in the asked language."},
{"role": "user", "content": "کاغذ A4 بزرگ تر است یا A5؟"}
]
# Convert the input message to input IDs
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
# Define the terminator tokens
terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("\"")]
# Generate the output
outputs = model.generate(input_ids, max_new_tokens=256, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9)
# Print the response
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))


