Transformers documentation
π€ Transformers Notebooks
Transformers
and get access to the augmented documentation experience
to get started
π€ Transformers Notebooks
You can find here a list of the official notebooks provided by Hugging Face.
Also, we would like to list here interesting content created by the community. If you wrote some notebook(s) leveraging π€ Transformers and would like to be listed here, please open a Pull Request so it can be included under the Community notebooks.
Hugging Faceβs notebooks π€
Documentation notebooks
You can open any page of the documentation as a notebook in Colab (there is a button directly on said pages) but they are also listed here if you need them:
| Notebook | Description | |||
|---|---|---|---|---|
| Quicktour of the library | A presentation of the various APIs in Transformers | π Open in Colab | π Open in AWS Studio | |
| Summary of the tasks | How to run the models of the Transformers library task by task | π Open in Colab | π Open in AWS Studio | |
| Preprocessing data | How to use a tokenizer to preprocess your data | π Open in Colab | π Open in AWS Studio | |
| Fine-tuning a pretrained model | How to use the Trainer to fine-tune a pretrained model | π Open in Colab | π Open in AWS Studio | π Open in AMD Dev Cloud |
| Summary of the tokenizers | The differences between the tokenizers algorithm | π Open in Colab | π Open in AWS Studio | π Open in AMD Dev Cloud |
| Multilingual models | How to use the multilingual models of the library | π Open in Colab | π Open in AWS Studio | π Open in AMD Dev Cloud |
PyTorch Examples
Natural Language Processing
Computer Vision
Audio
| Notebook | Description | ||
|---|---|---|---|
| How to fine-tune a speech recognition model in English | Show how to preprocess the data and fine-tune a pretrained Speech model on TIMIT | π Open in Colab | π Open in AWS Studio |
| How to fine-tune a speech recognition model in any language | Show how to preprocess the data and fine-tune a multi-lingually pretrained speech model on Common Voice | π Open in Colab | π Open in AWS Studio |
| How to fine-tune a model on audio classification | Show how to preprocess the data and fine-tune a pretrained Speech model on Keyword Spotting | π Open in Colab | π Open in AWS Studio |
Biological Sequences
| Notebook | Description | ||
|---|---|---|---|
| How to fine-tune a pre-trained protein model | See how to tokenize proteins and fine-tune a large pre-trained protein βlanguageβ model | π Open in Colab | π Open in AWS Studio |
| How to generate protein folds | See how to go from protein sequence to a full protein model and PDB file | π Open in Colab | π Open in AWS Studio |
| How to fine-tune a Nucleotide Transformer model | See how to tokenize DNA and fine-tune a large pre-trained DNA βlanguageβ model | π Open in Colab | π Open in AWS Studio |
| Fine-tune a Nucleotide Transformer model with LoRA | Train even larger DNA models in a memory-efficient way | π Open in Colab | π Open in AWS Studio |
Other modalities
| Notebook | Description | ||
|---|---|---|---|
| Probabilistic Time Series Forecasting | See how to train Time Series Transformer on a custom dataset | π Open in Colab | π Open in AWS Studio |
Utility notebooks
| Notebook | Description | ||
|---|---|---|---|
| How to export model to ONNX | Highlight how to export and run inference workloads through ONNX | π Open in Colab | π Open in AWS Studio |
Optimum notebooks
π€ Optimum is an extension of π€ Transformers, providing a set of performance optimization tools enabling maximum efficiency to train and run models on targeted hardware.
| Notebook | Description | ||
|---|---|---|---|
| How to quantize a model with ONNX Runtime for text classification | Show how to apply static and dynamic quantization on a model using ONNX Runtime for any GLUE task. | π Open in Colab | π Open in AWS Studio |
| How to fine-tune a model on text classification with ONNX Runtime | Show how to preprocess the data and fine-tune a model on any GLUE task using ONNX Runtime. | π Open in Colab | π Open in AWS Studio |
| How to fine-tune a model on summarization with ONNX Runtime | Show how to preprocess the data and fine-tune a model on XSUM using ONNX Runtime. | π Open in Colab | π Open in AWS Studio |
Community notebooks
More notebooks developed by the community are available here.
Update on GitHub