File size: 2,068 Bytes
d4f82bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912ab00
d4f82bf
912ab00
 
 
 
 
 
 
 
d4f82bf
 
c362ce2
912ab00
c362ce2
912ab00
c362ce2
 
912ab00
c362ce2
 
d4f82bf
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
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.

## Usage

To use this model for question-answering tasks, load it with the `transformers` library:

```python
from transformers import AutoTokenizer, AutoModelForQuestionAnswering, pipeline

model = "hosseinhimself/tara-roberta-base-fa-qa"

# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model)
model = AutoModelForQuestionAnswering.from_pretrained(model)

# Create a QA pipeline
qa_pipeline = pipeline("question-answering", model=model, tokenizer=tokenizer)

# Example usage
context = "شرکت فولاد مبارکه در سال 1371 تأسیس شد."

question = "چه زمانی شرکت فولاد مبارکه تأسیس شد؟"

# Modify the pipeline to return answer
results = qa_pipeline(question=question, context=context)

# Display the answer
print(results['answer'])
```

## 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).