m3hrdadfi / xlmr-large-qa-fa

huggingface.co
Total runs: 11
24-hour runs: 0
7-day runs: 1
30-day runs: 6
Model's Last Updated: October 12 2021
question-answering

Introduction of xlmr-large-qa-fa

Model Details of xlmr-large-qa-fa

XLM-RoBERTa large for QA (PersianQA - 🇮🇷)

This model is a fine-tuned version of xlm-roberta-large on the PersianQA dataset.

Hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • gradient_accumulation_steps: 4
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 20.0
  • mixed_precision_training: Native AMP
Performance

Evaluation results on the eval set with the official eval script .

Evalset
"HasAns_exact": 58.678955453149,
"HasAns_f1": 82.3746683591845,
"HasAns_total": 651,
"NoAns_exact": 86.02150537634408,
"NoAns_f1": 86.02150537634408,
"NoAns_total": 279,
"exact": 66.88172043010752,
"f1": 83.46871946433232,
"total": 930
Usage
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

model_name_or_path = "m3hrdadfi/xlmr-large-qa-fa"
nlp = pipeline('question-answering', model=model_name_or_path, tokenizer=model_name_or_path)

context = """
شب یَلدا یا شب چلّه یکی از کهن‌ترین جشن‌های ایرانی است. 
در این جشن، طی شدن بلندترین شب سال و به دنبال آن بلندتر شدن طول روزها
 در نیم‌کرهٔ شمالی، که مصادف با انقلاب زمستانی است، گرامی داشته می‌شود. 
نام دیگر این شب «چِلّه» است، زیرا برگزاری این جشن، یک آیین ایرانی‌است.
"""
# Translation [EN]
# context = [
  # Yalda night or Cheleh night is one of the oldest Iranian celebrations. 
  # The festival celebrates the longest night of the year, followed by longer days in the Northern Hemisphere, 
  # which coincides with the Winter Revolution. 
  # Another name for this night is "Chelleh", because holding this celebration is an Iranian ritual.
# ]


questions = [
    "نام دیگر شب یلدا؟",
    "کهن ترین جشن ایرانی‌ها چه است؟",
    "شب یلدا مصادف با چه پدیده‌ای است؟"
]
# Translation [EN]
# questions = [
  # Another name for Yalda night?
  # What is the ancient tradition of Iranian celebration?
  # What phenomenon does Yalda night coincide with?
# ]


kwargs = {}

for question in questions:
    r = nlp(question=question, context=context, **kwargs)
    answer = " ".join([token.strip() for token in r["answer"].strip().split() if token.strip()])
    print(f"{question} {answer}")

Output

نام دیگر شب یلدا؟ «چِلّه»
کهن ترین جشن ایرانی‌ها چه است؟ شب یَلدا یا شب چلّه
شب یلدا مصادف با چه پدیده‌ای است؟ انقلاب زمستانی

# Translation [EN]
# Another name for Yalda night? Cheleh night
# What is the ancient tradition of Iranian celebration? Yalda night or Chele night
# What phenomenon does Yalda night coincide with? Winter revolution
Authors
Framework versions
  • Transformers 4.12.0.dev0
  • Pytorch 1.9.1+cu111
  • Datasets 1.12.1
  • Tokenizers 0.10.3

Runs of m3hrdadfi xlmr-large-qa-fa on huggingface.co

11
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
6
30-day runs

More Information About xlmr-large-qa-fa huggingface.co Model

xlmr-large-qa-fa huggingface.co

xlmr-large-qa-fa huggingface.co is an AI model on huggingface.co that provides xlmr-large-qa-fa's model effect (), which can be used instantly with this m3hrdadfi xlmr-large-qa-fa model. huggingface.co supports a free trial of the xlmr-large-qa-fa model, and also provides paid use of the xlmr-large-qa-fa. Support call xlmr-large-qa-fa model through api, including Node.js, Python, http.

xlmr-large-qa-fa huggingface.co Url

https://huggingface.co/m3hrdadfi/xlmr-large-qa-fa

m3hrdadfi xlmr-large-qa-fa online free

xlmr-large-qa-fa huggingface.co is an online trial and call api platform, which integrates xlmr-large-qa-fa's modeling effects, including api services, and provides a free online trial of xlmr-large-qa-fa, you can try xlmr-large-qa-fa online for free by clicking the link below.

m3hrdadfi xlmr-large-qa-fa online free url in huggingface.co:

https://huggingface.co/m3hrdadfi/xlmr-large-qa-fa

xlmr-large-qa-fa install

xlmr-large-qa-fa is an open source model from GitHub that offers a free installation service, and any user can find xlmr-large-qa-fa on GitHub to install. At the same time, huggingface.co provides the effect of xlmr-large-qa-fa install, users can directly use xlmr-large-qa-fa installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

xlmr-large-qa-fa install url in huggingface.co:

https://huggingface.co/m3hrdadfi/xlmr-large-qa-fa

Url of xlmr-large-qa-fa

xlmr-large-qa-fa huggingface.co Url

Provider of xlmr-large-qa-fa huggingface.co

m3hrdadfi
ORGANIZATIONS

Other API from m3hrdadfi

huggingface.co

Total runs: 33
Run Growth: 21
Growth Rate: 63.64%
Updated:August 11 2021
huggingface.co

Total runs: 2
Run Growth: -8
Growth Rate: -400.00%
Updated:April 03 2024