fcakyon
initial commit
a603b71
|
raw
history blame
1.88 kB
metadata
language: tr
datasets:
  - tquad1
  - tquad2
  - xquad
tags:
  - answer-extraction
  - question-answering
  - question-generation
  - text-generation
  - text2text-generation
license: cc-by-4.0

mt5-base for Turkish Question Generation

Automated question generation and question answering using text-to-text transformers by OBSS AI.

from core.api import GenerationAPI
generation_api = GenerationAPI(model_url_or_path='mt5-base-3task-highlight-tquad2')

Overview

Language model: mt5-base Language: Turkish Downstream-task: Extractive QA/QG, Answer Extraction Training data: TQuADv2-train Code: https://github.com/obss/turkish-question-generation Paper: https://arxiv.org/abs/2111.06476

Hyperparameters

batch_size = 256
n_epochs = 15
base_LM_model = "mt5-base"
max_source_length = 512
max_target_length = 64
learning_rate = 1.0e-3
task_lisst = ["qa", "qg", "ans_ext"]
qg_format = "highlight"

Performance

Refer to paper.

Usage 🔥

from core.api import GenerationAPI
generation_api = GenerationAPI('mt5-base-3task-highlight-tquad2')

context = """
Bu modelin eğitiminde, Türkçe soru cevap verileri kullanılmıştır.
Paylaşılan model kullanılarak, Türkçe metinlerden otomatik olarak soru ve cevap
üretilebilir. Bu proje ile paylaşılan kaynak kodu ile Türkçe Soru Üretme
/ Soru Cevaplama konularında yeni akademik çalışmalar yapılabilir.
Projenin detaylarına paylaşılan Github ve Arxiv linklerinden ulaşılabilir.
"""

# a) Fully Automated Question Generation
generation_api(task='question-generation', context=context)

# b) Question Answering
question = "Bu model ne işe yarar?"
generation_api(task='question-answering', context=context, question=question)

# b) Answer Extraction
generation_api(task='answer-extraction', context=context)