Downloads · 30 days
32
1% of all-time downloads
aware-ai/mobilebert-squadv2
mobilebert-squadv2 is a question answering model from aware-ai. Use it when the input is a question plus a passage. It is set up for transformers.
This is based on mobile bert architecture suitable for handy devices or device with low resources.
Downloads · 30 days
32
1% of all-time downloads
All-time downloads
2.6K
Public
Parameters
24.6M
357 MB on disk
Likes
2
Public
Click a slice to open those files.
.bin98.6 MB · 28%
From the Hugging Face model README
This is based on mobile bert architecture suitable for handy devices or device with low resources.
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)