Transformers
  • 🌍GET STARTED
    • Transformers
    • Quick tour
    • Installation
  • 🌍TUTORIALS
    • Run inference with pipelines
    • Write portable code with AutoClass
    • Preprocess data
    • Fine-tune a pretrained model
    • Train with a script
    • Set up distributed training with BOINC AI Accelerate
    • Load and train adapters with BOINC AI PEFT
    • Share your model
    • Agents
    • Generation with LLMs
  • 🌍TASK GUIDES
    • 🌍NATURAL LANGUAGE PROCESSING
      • Text classification
      • Token classification
      • Question answering
      • Causal language modeling
      • Masked language modeling
      • Translation
      • Summarization
      • Multiple choice
    • 🌍AUDIO
      • Audio classification
      • Automatic speech recognition
    • 🌍COMPUTER VISION
      • Image classification
      • Semantic segmentation
      • Video classification
      • Object detection
      • Zero-shot object detection
      • Zero-shot image classification
      • Depth estimation
    • 🌍MULTIMODAL
      • Image captioning
      • Document Question Answering
      • Visual Question Answering
      • Text to speech
    • 🌍GENERATION
      • Customize the generation strategy
    • 🌍PROMPTING
      • Image tasks with IDEFICS
  • 🌍DEVELOPER GUIDES
    • Use fast tokenizers from BOINC AI Tokenizers
    • Run inference with multilingual models
    • Use model-specific APIs
    • Share a custom model
    • Templates for chat models
    • Run training on Amazon SageMaker
    • Export to ONNX
    • Export to TFLite
    • Export to TorchScript
    • Benchmarks
    • Notebooks with examples
    • Community resources
    • Custom Tools and Prompts
    • Troubleshoot
  • 🌍PERFORMANCE AND SCALABILITY
    • Overview
    • 🌍EFFICIENT TRAINING TECHNIQUES
      • Methods and tools for efficient training on a single GPU
      • Multiple GPUs and parallelism
      • Efficient training on CPU
      • Distributed CPU training
      • Training on TPUs
      • Training on TPU with TensorFlow
      • Training on Specialized Hardware
      • Custom hardware for training
      • Hyperparameter Search using Trainer API
    • 🌍OPTIMIZING INFERENCE
      • Inference on CPU
      • Inference on one GPU
      • Inference on many GPUs
      • Inference on Specialized Hardware
    • Instantiating a big model
    • Troubleshooting
    • XLA Integration for TensorFlow Models
    • Optimize inference using `torch.compile()`
  • 🌍CONTRIBUTE
    • How to contribute to transformers?
    • How to add a model to BOINC AI Transformers?
    • How to convert a BOINC AI Transformers model to TensorFlow?
    • How to add a pipeline to BOINC AI Transformers?
    • Testing
    • Checks on a Pull Request
  • 🌍CONCEPTUAL GUIDES
    • Philosophy
    • Glossary
    • What BOINC AI Transformers can do
    • How BOINC AI Transformers solve tasks
    • The Transformer model family
    • Summary of the tokenizers
    • Attention mechanisms
    • Padding and truncation
    • BERTology
    • Perplexity of fixed-length models
    • Pipelines for webserver inference
    • Model training anatomy
  • 🌍API
    • 🌍MAIN CLASSES
      • Agents and Tools
      • 🌍Auto Classes
        • Extending the Auto Classes
        • AutoConfig
        • AutoTokenizer
        • AutoFeatureExtractor
        • AutoImageProcessor
        • AutoProcessor
        • Generic model classes
          • AutoModel
          • TFAutoModel
          • FlaxAutoModel
        • Generic pretraining classes
          • AutoModelForPreTraining
          • TFAutoModelForPreTraining
          • FlaxAutoModelForPreTraining
        • Natural Language Processing
          • AutoModelForCausalLM
          • TFAutoModelForCausalLM
          • FlaxAutoModelForCausalLM
          • AutoModelForMaskedLM
          • TFAutoModelForMaskedLM
          • FlaxAutoModelForMaskedLM
          • AutoModelForMaskGenerationge
          • TFAutoModelForMaskGeneration
          • AutoModelForSeq2SeqLM
          • TFAutoModelForSeq2SeqLM
          • FlaxAutoModelForSeq2SeqLM
          • AutoModelForSequenceClassification
          • TFAutoModelForSequenceClassification
          • FlaxAutoModelForSequenceClassification
          • AutoModelForMultipleChoice
          • TFAutoModelForMultipleChoice
          • FlaxAutoModelForMultipleChoice
          • AutoModelForNextSentencePrediction
          • TFAutoModelForNextSentencePrediction
          • FlaxAutoModelForNextSentencePrediction
          • AutoModelForTokenClassification
          • TFAutoModelForTokenClassification
          • FlaxAutoModelForTokenClassification
          • AutoModelForQuestionAnswering
          • TFAutoModelForQuestionAnswering
          • FlaxAutoModelForQuestionAnswering
          • AutoModelForTextEncoding
          • TFAutoModelForTextEncoding
        • Computer vision
          • AutoModelForDepthEstimation
          • AutoModelForImageClassification
          • TFAutoModelForImageClassification
          • FlaxAutoModelForImageClassification
          • AutoModelForVideoClassification
          • AutoModelForMaskedImageModeling
          • TFAutoModelForMaskedImageModeling
          • AutoModelForObjectDetection
          • AutoModelForImageSegmentation
          • AutoModelForImageToImage
          • AutoModelForSemanticSegmentation
          • TFAutoModelForSemanticSegmentation
          • AutoModelForInstanceSegmentation
          • AutoModelForUniversalSegmentation
          • AutoModelForZeroShotImageClassification
          • TFAutoModelForZeroShotImageClassification
          • AutoModelForZeroShotObjectDetection
        • Audio
          • AutoModelForAudioClassification
          • AutoModelForAudioFrameClassification
          • TFAutoModelForAudioFrameClassification
          • AutoModelForCTC
          • AutoModelForSpeechSeq2Seq
          • TFAutoModelForSpeechSeq2Seq
          • FlaxAutoModelForSpeechSeq2Seq
          • AutoModelForAudioXVector
          • AutoModelForTextToSpectrogram
          • AutoModelForTextToWaveform
        • Multimodal
          • AutoModelForTableQuestionAnswering
          • TFAutoModelForTableQuestionAnswering
          • AutoModelForDocumentQuestionAnswering
          • TFAutoModelForDocumentQuestionAnswering
          • AutoModelForVisualQuestionAnswering
          • AutoModelForVision2Seq
          • TFAutoModelForVision2Seq
          • FlaxAutoModelForVision2Seq
      • Callbacks
      • Configuration
      • Data Collator
      • Keras callbacks
      • Logging
      • Models
      • Text Generation
      • ONNX
      • Optimization
      • Model outputs
      • Pipelines
      • Processors
      • Quantization
      • Tokenizer
      • Trainer
      • DeepSpeed Integration
      • Feature Extractor
      • Image Processor
    • 🌍MODELS
      • 🌍TEXT MODELS
        • ALBERT
        • BART
        • BARThez
        • BARTpho
        • BERT
        • BertGeneration
        • BertJapanese
        • Bertweet
        • BigBird
        • BigBirdPegasus
        • BioGpt
        • Blenderbot
        • Blenderbot Small
        • BLOOM
        • BORT
        • ByT5
        • CamemBERT
        • CANINE
        • CodeGen
        • CodeLlama
        • ConvBERT
        • CPM
        • CPMANT
        • CTRL
        • DeBERTa
        • DeBERTa-v2
        • DialoGPT
        • DistilBERT
        • DPR
        • ELECTRA
        • Encoder Decoder Models
        • ERNIE
        • ErnieM
        • ESM
        • Falcon
        • FLAN-T5
        • FLAN-UL2
        • FlauBERT
        • FNet
        • FSMT
        • Funnel Transformer
        • GPT
        • GPT Neo
        • GPT NeoX
        • GPT NeoX Japanese
        • GPT-J
        • GPT2
        • GPTBigCode
        • GPTSAN Japanese
        • GPTSw3
        • HerBERT
        • I-BERT
        • Jukebox
        • LED
        • LLaMA
        • LLama2
        • Longformer
        • LongT5
        • LUKE
        • M2M100
        • MarianMT
        • MarkupLM
        • MBart and MBart-50
        • MEGA
        • MegatronBERT
        • MegatronGPT2
        • Mistral
        • mLUKE
        • MobileBERT
        • MPNet
        • MPT
        • MRA
        • MT5
        • MVP
        • NEZHA
        • NLLB
        • NLLB-MoE
        • Nyströmformer
        • Open-Llama
        • OPT
        • Pegasus
        • PEGASUS-X
        • Persimmon
        • PhoBERT
        • PLBart
        • ProphetNet
        • QDQBert
        • RAG
        • REALM
        • Reformer
        • RemBERT
        • RetriBERT
        • RoBERTa
        • RoBERTa-PreLayerNorm
        • RoCBert
        • RoFormer
        • RWKV
        • Splinter
        • SqueezeBERT
        • SwitchTransformers
        • T5
        • T5v1.1
        • TAPEX
        • Transformer XL
        • UL2
        • UMT5
        • X-MOD
        • XGLM
        • XLM
        • XLM-ProphetNet
        • XLM-RoBERTa
        • XLM-RoBERTa-XL
        • XLM-V
        • XLNet
        • YOSO
      • 🌍VISION MODELS
        • BEiT
        • BiT
        • Conditional DETR
        • ConvNeXT
        • ConvNeXTV2
        • CvT
        • Deformable DETR
        • DeiT
        • DETA
        • DETR
        • DiNAT
        • DINO V2
        • DiT
        • DPT
        • EfficientFormer
        • EfficientNet
        • FocalNet
        • GLPN
        • ImageGPT
        • LeViT
        • Mask2Former
        • MaskFormer
        • MobileNetV1
        • MobileNetV2
        • MobileViT
        • MobileViTV2
        • NAT
        • PoolFormer
        • Pyramid Vision Transformer (PVT)
        • RegNet
        • ResNet
        • SegFormer
        • SwiftFormer
        • Swin Transformer
        • Swin Transformer V2
        • Swin2SR
        • Table Transformer
        • TimeSformer
        • UperNet
        • VAN
        • VideoMAE
        • Vision Transformer (ViT)
        • ViT Hybrid
        • ViTDet
        • ViTMAE
        • ViTMatte
        • ViTMSN
        • ViViT
        • YOLOS
      • 🌍AUDIO MODELS
        • Audio Spectrogram Transformer
        • Bark
        • CLAP
        • EnCodec
        • Hubert
        • MCTCT
        • MMS
        • MusicGen
        • Pop2Piano
        • SEW
        • SEW-D
        • Speech2Text
        • Speech2Text2
        • SpeechT5
        • UniSpeech
        • UniSpeech-SAT
        • VITS
        • Wav2Vec2
        • Wav2Vec2-Conformer
        • Wav2Vec2Phoneme
        • WavLM
        • Whisper
        • XLS-R
        • XLSR-Wav2Vec2
      • 🌍MULTIMODAL MODELS
        • ALIGN
        • AltCLIP
        • BLIP
        • BLIP-2
        • BridgeTower
        • BROS
        • Chinese-CLIP
        • CLIP
        • CLIPSeg
        • Data2Vec
        • DePlot
        • Donut
        • FLAVA
        • GIT
        • GroupViT
        • IDEFICS
        • InstructBLIP
        • LayoutLM
        • LayoutLMV2
        • LayoutLMV3
        • LayoutXLM
        • LiLT
        • LXMERT
        • MatCha
        • MGP-STR
        • Nougat
        • OneFormer
        • OWL-ViT
        • Perceiver
        • Pix2Struct
        • Segment Anything
        • Speech Encoder Decoder Models
        • TAPAS
        • TrOCR
        • TVLT
        • ViLT
        • Vision Encoder Decoder Models
        • Vision Text Dual Encoder
        • VisualBERT
        • X-CLIP
      • 🌍REINFORCEMENT LEARNING MODELS
        • Decision Transformer
        • Trajectory Transformer
      • 🌍TIME SERIES MODELS
        • Autoformer
        • Informer
        • Time Series Transformer
      • 🌍GRAPH MODELS
        • Graphormer
  • 🌍INTERNAL HELPERS
    • Custom Layers and Utilities
    • Utilities for pipelines
    • Utilities for Tokenizers
    • Utilities for Trainer
    • Utilities for Generation
    • Utilities for Image Processors
    • Utilities for Audio processing
    • General Utilities
    • Utilities for Time Series
Powered by GitBook
On this page
  • 🌍 Transformers Notebooks
  • BOINC AI’s notebooks 🌍
  • Community notebooks:
  1. DEVELOPER GUIDES

Notebooks with examples

🌍 Transformers Notebooks

You can find here a list of the official notebooks provided by BOINC AI.

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.

BOINC AI’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

A presentation of the various APIs in Transformers

How to run the models of the Transformers library task by task

How to use a tokenizer to preprocess your data

How to use the Trainer to fine-tune a pretrained model

The differences between the tokenizers algorithm

How to use the multilingual models of the library

PyTorch Examples

Natural Language Processing

Notebook
Description

How to train and use your very own tokenizer

How to easily start using transformers

Show how to preprocess the data and fine-tune a pretrained model on any GLUE task.

Show how to preprocess the data and fine-tune a pretrained model on a causal or masked LM task.

Show how to preprocess the data and fine-tune a pretrained model on a token classification task (NER, PoS).

Show how to preprocess the data and fine-tune a pretrained model on SQUAD.

Show how to preprocess the data and fine-tune a pretrained model on SWAG.

Show how to preprocess the data and fine-tune a pretrained model on WMT.

Show how to preprocess the data and fine-tune a pretrained model on XSUM.

Highlight all the steps to effectively train Transformer model on custom data

How to use different decoding methods for language generation with transformers

How to guide language generation with user-provided constraints

How Reformer pushes the limits of language modeling

Computer Vision

Notebook
Description

Show how to preprocess the data using Torchvision and fine-tune any pretrained Vision model on Image Classification

Show how to preprocess the data using Albumentations and fine-tune any pretrained Vision model on Image Classification

Show how to preprocess the data using Kornia and fine-tune any pretrained Vision model on Image Classification

Show how to perform zero-shot object detection on images with text queries

Show how to fine-tune BLIP for image captioning on a custom dataset

Show how to build an image similarity system

Show how to preprocess the data and fine-tune a pretrained SegFormer model on Semantic Segmentation

Show how to preprocess the data and fine-tune a pretrained VideoMAE model on Video Classification

Audio

Notebook
Description

Show how to preprocess the data and fine-tune a pretrained Speech model on TIMIT

Show how to preprocess the data and fine-tune a multi-lingually pretrained speech model on Common Voice

Show how to preprocess the data and fine-tune a pretrained Speech model on Keyword Spotting

Biological Sequences

Notebook
Description

See how to tokenize proteins and fine-tune a large pre-trained protein “language” model

See how to go from protein sequence to a full protein model and PDB file

See how to tokenize DNA and fine-tune a large pre-trained DNA “language” model

Train even larger DNA models in a memory-efficient way

Other modalities

Notebook
Description

See how to train Time Series Transformer on a custom dataset

Utility notebooks

Notebook
Description

Highlight how to export and run inference workloads through ONNX

How to benchmark models with transformers

TensorFlow Examples

Natural Language Processing

Notebook
Description

How to train and use your very own tokenizer

How to easily start using transformers

Show how to preprocess the data and fine-tune a pretrained model on any GLUE task.

Show how to preprocess the data and fine-tune a pretrained model on a causal or masked LM task.

Show how to preprocess the data and fine-tune a pretrained model on a token classification task (NER, PoS).

Show how to preprocess the data and fine-tune a pretrained model on SQUAD.

Show how to preprocess the data and fine-tune a pretrained model on SWAG.

Show how to preprocess the data and fine-tune a pretrained model on WMT.

Show how to preprocess the data and fine-tune a pretrained model on XSUM.

Computer Vision

Notebook
Description

Show how to preprocess the data and fine-tune any pretrained Vision model on Image Classification

Show how to preprocess the data and fine-tune a pretrained SegFormer model on Semantic Segmentation

Biological Sequences

Notebook
Description

See how to tokenize proteins and fine-tune a large pre-trained protein “language” model

Utility notebooks

Notebook
Description

See how to train at high speed on Google’s TPU hardware

Optimum notebooks

Notebook
Description

Community notebooks:

PreviousBenchmarksNextCommunity resources

Last updated 1 year ago

🌍 is an extension of 🌍 Transformers, providing a set of performance optimization tools enabling maximum efficiency to train and run models on targeted hardwares.

Show how to apply static and dynamic quantization on a model using for any GLUE task.

Show how to apply static, dynamic and aware training quantization on a model using for any GLUE task.

Show how to preprocess the data and fine-tune a model on any GLUE task using .

Show how to preprocess the data and fine-tune a model on XSUM using .

More notebooks developed by the community are available .

🌍
Optimum
here
Quicktour of the library
Summary of the tasks
Preprocessing data
Fine-tuning a pretrained model
Summary of the tokenizers
Multilingual models
Train your tokenizer
Train your language model
How to fine-tune a model on text classification
How to fine-tune a model on language modeling
How to fine-tune a model on token classification
How to fine-tune a model on question answering
How to fine-tune a model on multiple choice
How to fine-tune a model on translation
How to fine-tune a model on summarization
How to train a language model from scratch
How to generate text
How to generate text (with constraints)
Reformer
How to fine-tune a model on image classification (Torchvision)
How to fine-tune a model on image classification (Albumentations)
How to fine-tune a model on image classification (Kornia)
How to perform zero-shot object detection with OWL-ViT
How to fine-tune an image captioning model
How to build an image similarity system with Transformers
How to fine-tune a SegFormer model on semantic segmentation
How to fine-tune a VideoMAE model on video classification
How to fine-tune a speech recognition model in English
How to fine-tune a speech recognition model in any language
How to fine-tune a model on audio classification
How to fine-tune a pre-trained protein model
How to generate protein folds
How to fine-tune a Nucleotide Transformer model
Fine-tune a Nucleotide Transformer model with LoRA
Probabilistic Time Series Forecasting
How to export model to ONNX
How to use Benchmarks
Train your tokenizer
Train your language model
How to fine-tune a model on text classification
How to fine-tune a model on language modeling
How to fine-tune a model on token classification
How to fine-tune a model on question answering
How to fine-tune a model on multiple choice
How to fine-tune a model on translation
How to fine-tune a model on summarization
How to fine-tune a model on image classification
How to fine-tune a SegFormer model on semantic segmentation
How to fine-tune a pre-trained protein model
How to train TF/Keras models on TPU
How to quantize a model with ONNX Runtime for text classification
ONNX Runtime
How to quantize a model with Intel Neural Compressor for text classification
Intel Neural Compressor (INC)
How to fine-tune a model on text classification with ONNX Runtime
ONNX Runtime
How to fine-tune a model on summarization with ONNX Runtime
ONNX Runtime