Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ms
|
| 5 |
+
datasets:
|
| 6 |
+
- squad_v2
|
| 7 |
+
metrics:
|
| 8 |
+
- exact_match
|
| 9 |
+
- f1
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Overview
|
| 13 |
+
This model is an experiment I and my friend did as a researcher internship at the National University of Singapore (NUS). We finetuned the model to our datasets in Finance and Healthcare domain, in the Malay Language.
|
| 14 |
+
|
| 15 |
+
# Details
|
| 16 |
+
- Finetuned from the base model by [timpal0l](https://huggingface.co/timpal0l/mdeberta-v3-base-squad2)
|
| 17 |
+
- The base datasets from [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/)
|
| 18 |
+
- Our [datasets](https://ids.nus.edu.sg/microsites/nzsg-nlp/datahub.html) in Finance and Healthcare domain
|
| 19 |
+
|
| 20 |
+
# Finetuned Detail
|
| 21 |
+
```py
|
| 22 |
+
from transformers import TrainingArguments
|
| 23 |
+
|
| 24 |
+
training_args = TrainingArguments(
|
| 25 |
+
output_dir='test_trainer',
|
| 26 |
+
evaluation_strategy='epoch',
|
| 27 |
+
num_train_epochs=20,
|
| 28 |
+
optim='adamw_torch',
|
| 29 |
+
report_to='all',
|
| 30 |
+
logging_steps=1,
|
| 31 |
+
)
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
# How to use the Model
|
| 35 |
+
```py
|
| 36 |
+
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
|
| 37 |
+
|
| 38 |
+
model_name = "primasr/multilingualbert-for-eqa-finetuned"
|
| 39 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 40 |
+
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
|
| 41 |
+
nlp = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
| 42 |
+
```
|