deepset / tinyroberta-squad2

huggingface.co
Total runs: 9.0K
24-hour runs: 0
7-day runs: 1.4K
30-day runs: -514
Model's Last Updated: Setembro 26 2024
question-answering

Introduction of tinyroberta-squad2

Model Details of tinyroberta-squad2

tinyroberta-squad2

This is the distilled version of the deepset/roberta-base-squad2 model. This model has a comparable prediction quality and runs at twice the speed of the base model.

Overview

Language model: tinyroberta-squad2
Language: English
Downstream-task: Extractive QA
Training data: SQuAD 2.0
Eval data: SQuAD 2.0
Code: See an example QA pipeline on Haystack
Infrastructure : 4x Tesla v100

Hyperparameters
batch_size = 96
n_epochs = 4
base_LM_model = "deepset/tinyroberta-squad2-step1"
max_seq_len = 384
learning_rate = 3e-5
lr_schedule = LinearWarmup
warmup_proportion = 0.2
doc_stride = 128
max_query_length = 64
distillation_loss_weight = 0.75
temperature = 1.5
teacher = "deepset/robert-large-squad2"
Distillation

This model was distilled using the TinyBERT approach described in this paper and implemented in haystack . Firstly, we have performed intermediate layer distillation with roberta-base as the teacher which resulted in deepset/tinyroberta-6l-768d . Secondly, we have performed task-specific distillation with deepset/roberta-base-squad2 as the teacher for further intermediate layer distillation on an augmented version of SQuADv2 and then with deepset/roberta-large-squad2 as the teacher for prediction layer distillation.

Usage
In Haystack

Haystack is an NLP framework by deepset. You can use this model in a Haystack pipeline to do question answering at scale (over many documents). To load the model in Haystack :

reader = FARMReader(model_name_or_path="deepset/tinyroberta-squad2")
# or 
reader = TransformersReader(model_name_or_path="deepset/tinyroberta-squad2")
In Transformers
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

model_name = "deepset/tinyroberta-squad2"

# a) Get predictions
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
    'question': 'Why is model conversion important?',
    'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
}
res = nlp(QA_input)

# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
Performance

Evaluated on the SQuAD 2.0 dev set with the official eval script .

"exact": 78.69114798281817,
"f1": 81.9198998536977,

"total": 11873,
"HasAns_exact": 76.19770580296895,
"HasAns_f1": 82.66446878592329,
"HasAns_total": 5928,
"NoAns_exact": 81.17746005046257,
"NoAns_f1": 81.17746005046257,
"NoAns_total": 5945
Authors

Branden Chan: branden.chan@deepset.ai
Timo Möller: timo.moeller@deepset.ai
Malte Pietsch: malte.pietsch@deepset.ai
Tanay Soni: tanay.soni@deepset.ai
Michel Bartels: michel.bartels@deepset.ai

About us

deepset is the company behind the open-source NLP framework Haystack which is designed to help you build production ready NLP systems that use: Question answering, summarization, ranking etc.

Some of our other work:

Get in touch and join the Haystack community

For more info on Haystack, visit our GitHub repo and Documentation .

We also have a Discord community open to everyone!

Twitter | LinkedIn | Discord | GitHub Discussions | Website

By the way: we're hiring!

Runs of deepset tinyroberta-squad2 on huggingface.co

9.0K
Total runs
0
24-hour runs
500
3-day runs
1.4K
7-day runs
-514
30-day runs

More Information About tinyroberta-squad2 huggingface.co Model

More tinyroberta-squad2 license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

tinyroberta-squad2 huggingface.co

tinyroberta-squad2 huggingface.co is an AI model on huggingface.co that provides tinyroberta-squad2's model effect (), which can be used instantly with this deepset tinyroberta-squad2 model. huggingface.co supports a free trial of the tinyroberta-squad2 model, and also provides paid use of the tinyroberta-squad2. Support call tinyroberta-squad2 model through api, including Node.js, Python, http.

tinyroberta-squad2 huggingface.co Url

https://huggingface.co/deepset/tinyroberta-squad2

deepset tinyroberta-squad2 online free

tinyroberta-squad2 huggingface.co is an online trial and call api platform, which integrates tinyroberta-squad2's modeling effects, including api services, and provides a free online trial of tinyroberta-squad2, you can try tinyroberta-squad2 online for free by clicking the link below.

deepset tinyroberta-squad2 online free url in huggingface.co:

https://huggingface.co/deepset/tinyroberta-squad2

tinyroberta-squad2 install

tinyroberta-squad2 is an open source model from GitHub that offers a free installation service, and any user can find tinyroberta-squad2 on GitHub to install. At the same time, huggingface.co provides the effect of tinyroberta-squad2 install, users can directly use tinyroberta-squad2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

tinyroberta-squad2 install url in huggingface.co:

https://huggingface.co/deepset/tinyroberta-squad2

Url of tinyroberta-squad2

tinyroberta-squad2 huggingface.co Url

Provider of tinyroberta-squad2 huggingface.co

deepset
ORGANIZATIONS

Other API from deepset

huggingface.co

Total runs: 50.8K
Run Growth: 37.0K
Growth Rate: 72.79%
Updated: Setembro 26 2024
huggingface.co

Total runs: 27.6K
Run Growth: 4.1K
Growth Rate: 14.76%
Updated: Setembro 26 2024
huggingface.co

Total runs: 11.7K
Run Growth: 6.2K
Growth Rate: 53.20%
Updated: Maio 19 2021
huggingface.co

Total runs: 408
Run Growth: -1.0K
Growth Rate: -251.72%
Updated: Setembro 26 2024
huggingface.co

Total runs: 400
Run Growth: -24
Growth Rate: -6.00%
Updated: Setembro 26 2024