m-aliabbas commited on
Commit
78873df
1 Parent(s): 4bf184a

Create README.md

Browse files

# Mobile-Bert fine-tuned on Squad V2 dataset

This is based on mobile bert architecture suitable for handy devices or device with low resources.

## usage

using transformers library first load model and Tokenizer
```
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

model_name = "aware-ai/mobilebert-squadv2"

model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
```
use question answering pipeline

```
qa_engine = pipeline('question-answering', model=model, tokenizer=tokenizer)
QA_input = {
'question': 'your question?',
'context': '. your context ................ '
}
res = qa_engine (QA_input)
```

Files changed (1) hide show
  1. README.md +8 -0
README.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - squad_v2
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ pipeline_tag: question-answering
8
+ ---