Examples#

Transformers examples are the starting point for many users of the transformers library. Hence, they are the core feature of model-hub’s support for transformers library. In fact, each transformer example corresponding to a core transformer task has an associated task in model-hub that is guaranteed to work with Determined and verified for correctness. See the table below for a summary of the model-hub transformers examples:

Task

Dataset

Filename

language-modeling

WikiText-2

language-modeling.tgz

multiple-choice

SWAG

multiple-choice.tgz

question-answering

SQuAD and SQuAD version 2

question-answering.tgz

text-classification

GLUE and XNLI

text-classification.tgz

token-classification

CoNLL-2003

token-classification.tgz

summarization

CNN/DailyMail and XSum

Coming Soon

translation

WMT-16

Coming Soon

Each of the Determined trials above subclasses the BaseTransformerTrial and makes use of helper functions in model_hub.huggingface to drastically reduce the code needed to run the example. See the api for more details.