|
--- |
|
datasets: |
|
- SajjadAyoubi/persian_qa |
|
language: |
|
- fa |
|
pipeline_tag: question-answering |
|
license: apache-2.0 |
|
library_name: transformers |
|
tags: |
|
- roberta |
|
- question-answering |
|
- Persian |
|
--- |
|
# Tara-Roberta-Base-FA-QA |
|
|
|
**Tara-Roberta-Base-FA-QA** is a fine-tuned version of the `facebookAI/roberta-base` model for question-answering tasks, trained on the [SajjadAyoubi/persian_qa](https://huggingface.co/datasets/SajjadAyoubi/persian_qa) dataset. This model is designed to understand and generate answers to questions posed in Persian. |
|
|
|
## Model Description |
|
|
|
This model was fine-tuned on a dataset containing Persian question-answering pairs. It leverages the `roberta-base` architecture to provide answers based on the context provided. The training process was performed with a focus on improving the model's ability to handle Persian text and answer questions effectively. |
|
|
|
## Training Details |
|
|
|
The model was trained for 3 epochs with the following training and validation losses: |
|
|
|
- **Epoch 1**: |
|
- Training Loss: 2.0713 |
|
- Validation Loss: 2.1061 |
|
|
|
- **Epoch 2**: |
|
- Training Loss: 2.1558 |
|
- Validation Loss: 2.0121 |
|
|
|
- **Epoch 3**: |
|
- Training Loss: 2.0951 |
|
- Validation Loss: 2.0168 |
|
|
|
## Evaluation Results |
|
|
|
The model achieved the following results: |
|
|
|
- **Training Loss**: Decreased over the epochs, indicating effective learning. |
|
- **Validation Loss**: Slight variations were observed, reflecting the model's performance on unseen data. |
|
|
|
## Usage |
|
|
|
To use this model for question-answering tasks, load it with the `transformers` library: |
|
|
|
```python |
|
from transformers import RobertaForQuestionAnswering, RobertaTokenizer |
|
|
|
model_name = "hosseinhimself/tara-roberta-base-fa-qa" |
|
tokenizer = RobertaTokenizer.from_pretrained(model_name) |
|
model = RobertaForQuestionAnswering.from_pretrained(model_name) |
|
|
|
# Example usage |
|
inputs = tokenizer("چه زمانی شرکت فولاد مبارکه تأسیس شد؟", "شرکت فولاد مبارکه در سال 1371 تأسیس شد.", return_tensors='pt') |
|
outputs = model(**inputs) |
|
start_logits = outputs.start_logits |
|
end_logits = outputs.end_logits |
|
``` |
|
|
|
## Datasets |
|
|
|
The model was fine-tuned using the [SajjadAyoubi/persian_qa](https://huggingface.co/datasets/SajjadAyoubi/persian_qa) dataset. |
|
|
|
## Languages |
|
|
|
The model supports the Persian language. |
|
|
|
## Additional Information |
|
|
|
For more details on how to fine-tune similar models or to report issues, please visit the [Hugging Face documentation](https://huggingface.co/docs/transformers). |