Wikidepia commited on
Commit
270dfb7
1 Parent(s): 9b9c401

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -0
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: id
3
+ ---
4
+
5
+ # IndoBERT-Lite-squad base fine-tuned on Full Translated SQuAD v2
6
+
7
+ [IndoBERT-Lite](https://huggingface.co/indobenchmark/indobert-lite-base-p2) trained by [Indo Benchmark](https://www.indobenchmark.com/) and fine-tuned on [Translated SQuAD 2.0](https://github.com/Wikidepia/indonesia_dataset/tree/master/question-answering/squad) for **Q&A** downstream task.
8
+
9
+ ## Model in action
10
+
11
+ Fast usage with **pipelines**:
12
+
13
+ ```python
14
+ from transformers import BertTokenizerFast, pipeline
15
+
16
+ tokenizer = BertTokenizerFast.from_pretrained(
17
+ 'Wikidepia/indobert-lite-squad'
18
+ )
19
+ qa_pipeline = pipeline(
20
+ "question-answering",
21
+ model="Wikidepia/indobert-lite-squad",
22
+ tokenizer=tokenizer
23
+ )
24
+
25
+ qa_pipeline({
26
+ 'context': "Setelah menghabiskan waktu satu tahun di Praha, Einstein tinggal di Swiss antara tahun 1895 dan 1914, melepas kewarganegaraan Jermannya pada tahun 1896, dan lulus sarjana dari sekolah politeknik federal Swiss (kelak Eidgenössische Technische Hochschule, ETH) di Zürich pada tahun 1900.",
27
+ 'question': "Kapan Einstein melepas kewarganegaraan Jerman?"
28
+ })
29
+ ```
30
+
31
+ # Output:
32
+
33
+ ```json
34
+ {
35
+ "score":0.9799205660820007,
36
+ "start":147,
37
+ "end":151,
38
+ "answer":"1896"
39
+ }
40
+ ```
41
+
42
+ README copied from [mrm8488's repository](https://huggingface.co/mrm8488/bert-tiny-finetuned-squadv2)