英文

idT5用于印度尼西亚问题生成和问题回答

在 30% 的数据上,fine-tuned 了 mT5 的印度尼西亚版本,用于问题生成和问题回答任务。

实时演示

要求

!pip install transformers==4.4.2
!pip install sentencepiece==0.1.95
!git clone https://github.com/muchad/qaqg.git
%cd qaqg/

使用 ?

问题生成
from pipeline_qg import pipeline #pipeline_qg.py script in the cloned repo
qg = pipeline()

#sample
qg("Raja Purnawarman mulai memerintah Kerajaan Tarumanegara pada tahun 395 M.")

#output
=> [{'answer': 'Raja Purnawarman','question': 'Siapa yang memerintah Kerajaan Tarumanegara?'}, {'answer': '395 M','question': 'Kapan Raja Purnawarman memerintah Kerajaan Tarumanegara?'}]
问题回答
from pipeline_qa import pipeline #pipeline_qa.py script in the cloned repo
qa = pipeline()

#sample
qa({"context":"Raja Purnawarman mulai memerintah Kerajaan Tarumanegara pada tahun 395 M.","question":"Siapa pemimpin Kerajaan Tarumanegara?"})

#output
=> Raja Purnawarman
引用

论文: idT5: Indonesian Version of Multilingual T5 Transformer

@misc{https://doi.org/10.48550/arxiv.2302.00856,
  doi = {10.48550/ARXIV.2302.00856},  
  url = {https://arxiv.org/abs/2302.00856},  
  author = {Fuadi, Mukhlish and Wibawa, Adhi Dharma and Sumpeno, Surya},  
  keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences, I.2.7},  
  title = {idT5: Indonesian Version of Multilingual T5 Transformer},  
  publisher = {arXiv},  
  year = {2023}
}