readme: ---
  language: en
  tags:
  - exbert
  
  license: apache-2.0
  datasets:
  - openwebtext
  ---
  
  # Model Card for DistilRoBERTa base
  
  # Table of Contents
  
  1. [Model Details](#model-details)
  2. [Uses](#uses)
  3. [Bias, Risks, and Limitations](#bias-risks-and-limitations)
  4. [Training Details](#training-details)
  5. [Evaluation](#evaluation)
  6. [Environmental Impact](#environmental-impact)
  7. [Citation](#citation)
  8. [How To Get Started With the Model](#how-to-get-started-with-the-model)
  
  # Model Details
  
  ## Model Description
  
  This model is a distilled version of the [RoBERTa-base model](https://huggingface.co/roberta-base). It follows the same training procedure as [DistilBERT](https://huggingface.co/distilbert-base-uncased).
  The code for the distillation process can be found [here](https://github.com/huggingface/transformers/tree/master/examples/distillation).
  This model is case-sensitive: it makes a difference between english and English.
  
  The model has 6 layers, 768 dimension and 12 heads, totalizing 82M parameters (compared to 125M parameters for RoBERTa-base).
  On average DistilRoBERTa is twice as fast as Roberta-base.
  
  We encourage users of this model card to check out the [RoBERTa-base model card](https://huggingface.co/roberta-base) to learn more about usage, limitations and potential biases.
  
  - **Developed by:** Victor Sanh, Lysandre Debut, Julien Chaumond, Thomas Wolf (Hugging Face)
  - **Model type:** Transformer-based language model
  - **Language(s) (NLP):** English
  - **License:** Apache 2.0
  - **Related Models:** [RoBERTa-base model card](https://huggingface.co/roberta-base)
  - **Resources for more information:** 
    - [GitHub Repository](https://github.com/huggingface/transformers/blob/main/examples/research_projects/distillation/README.md)
    - [Associated Paper](https://arxiv.org/abs/1910.01108)
    
  # Uses
  
  ## Direct Use and Downstream Use
  
  You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=roberta) to look for fine-tuned versions on a task that interests you.
  
  Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2.
  
  ## Out of Scope Use
  
  The model should not be used to intentionally create hostile or alienating environments for people. The model was not trained to be factual or true representations of people or events, and therefore using the models to generate such content is out-of-scope for the abilities of this model.
  
  # Bias, Risks, and Limitations
  
  Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. For example:
  
  ```python
  >>> from transformers import pipeline
  >>> unmasker = pipeline('fill-mask', model='distilroberta-base')
  >>> unmasker("The man worked as a <mask>.")
  [{'score': 0.1237526461482048,
    'sequence': 'The man worked as a waiter.',
    'token': 38233,
    'token_str': ' waiter'},
   {'score': 0.08968018740415573,
    'sequence': 'The man worked as a waitress.',
    'token': 35698,
    'token_str': ' waitress'},
   {'score': 0.08387645334005356,
    'sequence': 'The man worked as a bartender.',
    'token': 33080,
    'token_str': ' bartender'},
   {'score': 0.061059024184942245,
    'sequence': 'The man worked as a mechanic.',
    'token': 25682,
    'token_str': ' mechanic'},
   {'score': 0.03804653510451317,
    'sequence': 'The man worked as a courier.',
    'token': 37171,
    'token_str': ' courier'}]
    
  >>> unmasker("The woman worked as a <mask>.")
  [{'score': 0.23149248957633972,
    'sequence': 'The woman worked as a waitress.',
    'token': 35698,
    'token_str': ' waitress'},
   {'score': 0.07563332468271255,
    'sequence': 'The woman worked as a waiter.',
    'token': 38233,
    'token_str': ' waiter'},
   {'score': 0.06983394920825958,
    'sequence': 'The woman worked as a bartender.',
    'token': 33080,
    'token_str': ' bartender'},
   {'score': 0.05411609262228012,
    'sequence': 'The woman worked as a nurse.',
    'token': 9008,
    'token_str': ' nurse'},
   {'score': 0.04995106905698776,
    'sequence': 'The woman worked as a maid.',
    'token': 29754,
    'token_str': ' maid'}]
  ```
  
  ## Recommendations
  
  Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
  
  # Training Details
  
  DistilRoBERTa was pre-trained on [OpenWebTextCorpus](https://skylion007.github.io/OpenWebTextCorpus/), a reproduction of OpenAI's WebText dataset (it is ~4 times less training data than the teacher RoBERTa). See t