How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="m3hrdadfi/gpt2-persian-qa")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("m3hrdadfi/gpt2-persian-qa")
model = AutoModelForCausalLM.from_pretrained("m3hrdadfi/gpt2-persian-qa", device_map="auto")
Quick Links

GPT2 QA - Persian

It is a new approach to using GPT2 in other downstream NLP tasks like QA. The model was trained on PersianQA and evaluated on PersianQA and PersiNLU (Reading Comprehension).

Dataset

Evaluation

The following table summarizes the scores obtained by the model.

Dataset F1 Score (%) Exact Match (%) Total (#)
ParsNLU 46.95 20.39 564
PersianQA 45.93 23.19 651

Demo

Streamlit GPT2 QA - Persian

How to use

TODO (will be filled shortly)...

Downloads last month
27
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train m3hrdadfi/gpt2-persian-qa

Space using m3hrdadfi/gpt2-persian-qa 1