Downloads · 30 days
5
13% of all-time downloads
randy090302/IndoBERT-SQuAD
IndoBERT-SQuAD is a question answering model from randy090302. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
5
13% of all-time downloads
All-time downloads
38
Public
Repo size
880 MB
Likes
0
Public
Click a slice to open those files.
.bin440 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of indolem/indobert-base-uncased on the None dataset. It achieves the following results on the evaluation set:
IndoBERT is the Indonesian version of BERT model. We train the model using over 220M words, aggregated from three main sources:
We trained the model for 2.4M steps (180 epochs) with the final perplexity over the development set being 3.97 (similar to English BERT-base).
This IndoBERT was used to examine IndoLEM - an Indonesian benchmark that comprises of seven tasks for the Indonesian language, spanning morpho-syntax, semantics, and discourse.
SQuAD2.0 combines the 100,000 questions in SQuAD1.1 with over 50,000 unanswerable questions written adversarially by crowdworkers to look similar to answerable ones. To do well on SQuAD2.0, systems must not only answer questions when possible, but also determine when no answer is supported by the paragraph and abstain from answering.
| Dataset | Split | # samples |
|---|---|---|
| SQuAD2.0 | train | 130k |
| SQuAD2.0 | eval | 12.3k |
The model was trained on a Tesla T4 GPU and 12GB of RAM.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.4098 | 1.0 | 8202 | 1.3860 |
| 1.1716 | 2.0 | 16404 | 1.8555 |
| 1.2909 | 3.0 | 24606 | 1.8025 |
| Metric | # Value |
|---|---|
| EM | 52.17 |
| F1 | 69.22 |
from transformers import pipeline
qa_pipeline = pipeline(
"question-answering",
model="esakrissa/IndoBERT-SQuAD",
tokenizer="esakrissa/IndoBERT-SQuAD"
)
qa_pipeline({
'context': """Sudah sejak tahun 1920-an, Ubud terkenal di antara wisatawan barat. Kala itu pelukis Jerman; Walter Spies dan pelukis Belanda; Rudolf Bonnet menetap di sana. Mereka dibantu oleh Tjokorda Gde Agung Sukawati, dari Puri Agung Ubud. Sekarang karya mereka bisa dilihat di Museum Puri Lukisan, Ubud.""",
'question': "Sejak kapan Ubud terkenal di antara wisatawan barat?"
})
output:
{
'answer': '1920-an'
'start': 18,
'end': 25,
'score': 0.8675463795661926,
}
<a id="1">[1]</a>Fajri Koto and Afshin Rahimi and Jey Han Lau and Timothy Baldwin. 2020. IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP. Proceedings of the 28th COLING. <a id="2">[2]</a>rifkybujana/IndoBERT-QA