t5-small / README.md
autoevaluator's picture
Add evaluation results on the default config and test split of xsum
d0f6f39
|
raw
history blame
10.7 kB
metadata
language:
  - en
  - fr
  - ro
  - de
  - multilingual
license: apache-2.0
tags:
  - summarization
  - translation
datasets:
  - c4
model-index:
  - name: t5-small
    results:
      - task:
          type: summarization
          name: Summarization
        dataset:
          name: xsum
          type: xsum
          config: default
          split: test
        metrics:
          - type: rouge
            value: 16.5478
            name: ROUGE-1
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZmQ2MjBmOTljY2M0MzljOTM4ZWE4MjNlYmMyZGUxYjI0YjhlNmNlNmVhM2VjZTY5Y2Y2Y2JiYmQyMTgzM2E1ZiIsInZlcnNpb24iOjF9.5jwUlQLjukb5FI7glMwDgKIvCKsl67wOa7cakVI0wxnlkp4psP1FR-aBbYnDHfKaO0HH7c-BNKo02OH3I09ABw
          - type: rouge
            value: 2.0449
            name: ROUGE-2
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNWM2NmQyMWZlMGRmNWViZjRiMGRjY2RkYTM4NmU3OGU1MTQxMjE1YmNkN2NhMjg2ZTAwNDc2NjAxMDQxMzM5NSIsInZlcnNpb24iOjF9.Bnt1hjaO22eQQTA5S0treGE3RebS4N-c9LG2XTLRSyLaVUEoYBP-vfAf0thQieWmhu3l6HcpjWNZweCvLK3TBg
          - type: rouge
            value: 12.9983
            name: ROUGE-L
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNzhjODNjZTMxNTM5MjY5Y2I5ZDVjOGJmYzQwYWE3ZWUzNGVjYTgwYzk3M2Q3OWY4Y2YwYWFmOWE1NjY5ZGQ4YSIsInZlcnNpb24iOjF9.xWgzNDCy6hAF3C8KbrE-XYBEXZQlRzx9R9GN7zkr8ZxayFxR5C0CfrE9BxbmyE4hwu6lFvERIBFrfN8hgzTDBg
          - type: rouge
            value: 13.2996
            name: ROUGE-LSUM
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiY2Y2Yzc2N2ZjNzU5ZGQxNmUzNzE5NWUxODEwMTZkZjNhMzRkOGUxZDllODkyYjY3ZTk4MDNlYzQ3YzVjYzA0ZSIsInZlcnNpb24iOjF9.FbC7tfJTtBGp3y_-BxPXBVGDb33DUzzGLvONaRJWTOUpB0uBipWaRuQEz5iwqKWkkP5FNOr5zwZ_JQ4y4VgECw
          - type: loss
            value: 3.8955957889556885
            name: loss
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYmQ3N2IxMTY0Y2NmMmU4Y2RhZDAwMjc1NTk4ODMzMjEyZjE1ODAxMTBjYjg4ZWJlODkyMjI0Njg4OGE5NDNlYiIsInZlcnNpb24iOjF9.naeDnPJkewRtLbtmdLDp7Gapk3tzIQD6krs-zPdHgLDTSyZ05S6GIPRGCN8PT3gosnawG9fEEk_O09v9r4luCw
          - type: gen_len
            value: 18.9674
            name: gen_len
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOGYxOGNjNGM5YTc4YTk1M2VhZDE4ZmNlNTUwY2JkN2Q5NjhmZGY1NzRmZDIyZDUyNTQ1MmE5Yzk3NjhjOTdiNiIsInZlcnNpb24iOjF9.yemtSqIGeaGgrVZOIB6ahuZMhP1J-fDIbMbjve9G3e90uOPCOpmc16jFHEB19A4s5MLMQVdn-pDqgP5h706JDg

Model Card for T5 Small

model image

Table of Contents

  1. Model Details
  2. Uses
  3. Bias, Risks, and Limitations
  4. Training Details
  5. Evaluation
  6. Environmental Impact
  7. Citation
  8. Model Card Authors
  9. How To Get Started With the Model

Model Details

Model Description

The developers of the Text-To-Text Transfer Transformer (T5) write:

With T5, we propose reframing all NLP tasks into a unified text-to-text-format where the input and output are always text strings, in contrast to BERT-style models that can only output either a class label or a span of the input. Our text-to-text framework allows us to use the same model, loss function, and hyperparameters on any NLP task.

T5-Small is the checkpoint with 60 million parameters.

Uses

Direct Use and Downstream Use

The developers write in a blog post that the model:

Our text-to-text framework allows us to use the same model, loss function, and hyperparameters on any NLP task, including machine translation, document summarization, question answering, and classification tasks (e.g., sentiment analysis). We can even apply T5 to regression tasks by training it to predict the string representation of a number instead of the number itself.

See the blog post and research paper for further details.

Out-of-Scope Use

More information needed.

Bias, Risks, and Limitations

More information needed.

Recommendations

More information needed.

Training Details

Training Data

The model is pre-trained on the Colossal Clean Crawled Corpus (C4), which was developed and released in the context of the same research paper as T5.

The model was pre-trained on a on a multi-task mixture of unsupervised (1.) and supervised tasks (2.). Thereby, the following datasets were being used for (1.) and (2.):

  1. Datasets used for Unsupervised denoising objective:
  1. Datasets used for Supervised text-to-text language modeling objective

Training Procedure

In their abstract, the model developers write:

In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts every language problem into a text-to-text format. Our systematic study compares pre-training objectives, architectures, unlabeled datasets, transfer approaches, and other factors on dozens of language understanding tasks.

The framework introduced, the T5 framework, involves a training procedure that brings together the approaches studied in the paper. See the research paper for further details.

Evaluation

Testing Data, Factors & Metrics

The developers evaluated the model on 24 tasks, see the research paper for full details.

Results

For full results for T5-small, see the research paper, Table 14.

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: Google Cloud TPU Pods
  • Hours used: More information needed
  • Cloud Provider: GCP
  • Compute Region: More information needed
  • Carbon Emitted: More information needed

Citation

BibTeX:

@article{2020t5,
  author  = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
  title   = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {140},
  pages   = {1-67},
  url     = {http://jmlr.org/papers/v21/20-074.html}
}

APA:

  • Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., ... & Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(140), 1-67.

Model Card Authors

This model card was written by the team at Hugging Face.

How to Get Started with the Model

Use the code below to get started with the model.

Click to expand
from transformers import T5Tokenizer, T5Model

tokenizer = T5Tokenizer.from_pretrained("t5-small")
model = T5Model.from_pretrained("t5-small")

input_ids = tokenizer(
    "Studies have been shown that owning a dog is good for you", return_tensors="pt"
).input_ids  # Batch size 1
decoder_input_ids = tokenizer("Studies show that", return_tensors="pt").input_ids  # Batch size 1

# forward pass
outputs = model(input_ids=input_ids, decoder_input_ids=decoder_input_ids)
last_hidden_states = outputs.last_hidden_state

See the Hugging Face T5 docs and a Colab Notebook created by the model developers for more examples.