
# idT5 for Indonesian Question Generation and Question Answering

[idT5](https://huggingface.co/muchad/idt5-base) (Indonesian version of [mT5](https://huggingface.co/google/mt5-base)) is fine-tuned on 30% of [translated SQuAD v2.0](https://github.com/Wikidepia/indonesian_datasets/tree/master/question-answering/squad) for **Question Generation** and **Question Answering** tasks.

## Live Demo
* **Question Generation:** [ai.muchad.com/qg](https://ai.muchad.com/qg/)
* **Question Answering:** [t.me/caritahubot](https://t.me/caritahubot)

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

## Usage 🚀
#### Question Generation
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/muchad/qaqg/blob/main/idT5_Question_Generation.ipynb)

```
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?'}]
```


#### Question Answering

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/muchad/qaqg/blob/main/idT5_Question_Answering.ipynb)

```
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
```

#### Citation

Paper: [idT5: Indonesian Version of Multilingual T5 Transformer](https://arxiv.org/abs/2302.00856)

```
@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}
}
```
{"language": "id", "license": "apache-2.0", "tags": ["question-generation", "multitask-model", "idt5"], "datasets": ["SQuADv2.0"], "widget": [{"text": "generate question: <hl> Dua orang <hl> pengembara berjalan di sepanjang jalan yang berdebu dan tandus di hari yang sangat panas. Tidak lama kemudian, mereka menemukan sebuah pohon besar. </s>"}, {"text": "question: Siapa pemimpin Kerajaan Tarumanegara? context: Raja Purnawarman mulai memerintah Kerajaan Tarumanegara pada tahun 395 M. </s>"}]}
transformers pytorch t5 text2text-generation question-generation multitask-model idt5 id dataset:SQuADv2.0 arxiv:2302.00856 license:apache-2.0 autotrain_compatible endpoints_compatible has_space text-generation-inference region:us
TAGS
#transformers #pytorch #t5 #text2text-generation #question-generation #multitask-model #idt5 #id #dataset-SQuADv2.0 #arxiv-2302.00856 #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 


# idT5 for Indonesian Question Generation and Question Answering

idT5 (Indonesian version of mT5) is fine-tuned on 30% of translated SQuAD v2.0 for Question Generation and Question Answering tasks.

## Live Demo
* Question Generation: URL
* Question Answering: t.me/caritahubot

## Requirements


## Usage 
#### Question Generation
![Open In Colab](URL




#### Question Answering

![Open In Colab](URL



Paper: idT5: Indonesian Version of Multilingual T5 Transformer


# idT5 for Indonesian Question Generation and Question Answering

idT5 (Indonesian version of mT5) is fine-tuned on 30% of translated SQuAD v2.0 for Question Generation and Question Answering tasks. ## Live Demo
* Question Generation: URL
* Question Answering: t.me/caritahubot ## Requirements ## Usage #### Question Generation
![Open In Colab](URL #### Question Answering

![Open In Colab](URL



Paper: idT5: Indonesian Version of Multilingual T5 Transformer
TAGS
#transformers #pytorch #t5 #text2text-generation #question-generation #multitask-model #idt5 #id #dataset-SQuADv2.0 #arxiv-2302.00856 #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
 # idT5 for Indonesian Question Generation and Question Answering

idT5 (Indonesian version of mT5) is fine-tuned on 30% of translated SQuAD v2.0 for Question Generation and Question Answering tasks. ## Live Demo
* Question Generation: URL
* Question Answering: t.me/caritahubot ## Requirements ## Usage #### Question Generation
![Open In Colab](URL #### Question Answering

![Open In Colab](URL



Paper: idT5: Indonesian Version of Multilingual T5 Transformer
passage: TAGS
#transformers #pytorch #t5 #text2text-generation #question-generation #multitask-model #idt5 #id #dataset-SQuADv2.0 #arxiv-2302.00856 #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
# idT5 for Indonesian Question Generation and Question Answering

idT5 (Indonesian version of mT5) is fine-tuned on 30% of translated SQuAD v2.0 for Question Generation and Question Answering tasks.## Live Demo
* Question Generation: URL
* Question Answering: t.me/caritahubot## Requirements## Usage#### Question Generation
![Open In Colab](URL#### Question Answering

![Open In Colab](URL



Paper: idT5: Indonesian Version of Multilingual T5 Transformer