Downloads · 30 days
17
1% of all-time downloads
mansoorhamidzadeh/parsbert-persian-QA
parsbert-persian-QA is a question answering model from mansoorhamidzadeh. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as apache-2.0.
this is a fine-tuned version of the ParsBERT model, specifically adapted for the task of question answering in Persian. ParsBERT is a BERT-based model pre-trained on a large Persian text corpus. This model has been fi…
Downloads · 30 days
17
1% of all-time downloads
All-time downloads
3.3K
Public
Parameters
118M
5.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors471 MB · 100%
From the Hugging Face model README
this is a fine-tuned version of the ParsBERT model, specifically adapted for the task of question answering in Persian. ParsBERT is a BERT-based model pre-trained on a large Persian text corpus. This model has been fine-tuned on a Persian QA dataset to provide accurate and contextually relevant answers to questions posed in Persian.
This model is intended for use in applications requiring natural language understanding and question answering in Persian, such as:
The model was fine-tuned on a Persian QA dataset. The dataset consists of question-answer pairs extracted from various Persian text sources, ensuring a diverse range of topics and contexts.
To use this model for question answering in Persian, you can load it using the Hugging Face Transformers library. Here’s a quick example:
from transformers import AutoTokenizer, AutoModelForQuestionAnswering, pipeline
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("mansoorhamidzadeh/parsbert-persian-QA")
model = AutoModelForQuestionAnswering.from_pretrained("mansoorhamidzadeh/parsbert-persian-QA")
# Create a QA pipeline
qa_pipeline = pipeline("question-answering", model=model, tokenizer=tokenizer)
# Example usage
context = "متن زمینه که شامل اطلاعات مرتبط با سوال شما است."
question = "سوال شما چیست؟"
result = qa_pipeline(question=question, context=context)
print(f"Answer: {result['answer']}")