“Attention Is All You Need, quand les Transformers changent la donne” (épisode 12)
“De ChatGPT à DeepL ou AlphaFold, les Transformers sont omniprésents et ont objectivement révolutionnés le monde de l’IA :-) Proposé par Ashish Vaswani en 2017, sous le titre “Attention Is All You Need”, les Transformers sont des réseaux de type “séquence to sequences”, tout comme les réseaux de neurones récurrents (RNN), qui gèrent des données de type séquentiel. Leur force réside dans leur capacité à pondérer l’importance (mécanisme d’attention) de chaque terme de la séquence et à être fortement parallélisables.”
NoteToDo this week
Watch the video “Attention Is All You Need, quand les Transformers changent la donne” (épisode 12) before 2026-01-16.
Course
Course webpage: https://fidle.cnrs.fr/w3/archives/2024-2025/11-Optimisation.html
Video course: “Attention Is All You Need, quand les Transformers changent la donne” (épisode 12) (1h55 course)
Outline
- Principe des neurones récurrents
- Cellules et réseaux récurrents (RNN, LSTM, GRU)
- Une plongée dans l’architecture des transformers. De l’encodage au décodage… une question d’attention
- Trois grands types de transformers : encoder-only, decoder-only, encoder-decoder
- Le modèle BERT : entraînement et finetuning
- Utilisation des transformers dans différents domaines
- Nouveaux modèles émergents
Tutorial/practical
Time series with Recurrent Neural Network (RNN), using Keras3/PyTorch
- K3LADYB1 - Prediction of a 2D trajectory via RNN: Artificial dataset generation and prediction attempt via a recurrent network, using Keras 3 and PyTorch
Sentiment analysis with transformer, using PyTorch
- TRANS1 - IMDB, Sentiment analysis with Transformers
Using a Transformer to perform a sentiment analysis (IMDB)
Modified notebooks1:
Tensorflow-based transformers (01-distilbert_tensorflow.ipynb) modified for local use on laptops;PyTorch-based transformers (02-distilbert_pytorch.ipynb) (not tested yet);Lightning-based transformers (03-bert_pytorch_lightning.ipynb) with a bigger model (not tested yet);
Additional contents
- Tutorial on Transformers from Vincent Barra (Professor at Clermont-Auvergne University)
- Tutorial on Transformers from HuggingFace documentation
- Tutorial on Transformers from PyTorch documentation
- “How to Code BERT Using PyTorch – Tutorial With Examples” by Nilesh Barla, 2023 (
neptune.aiblog) - “Mastering BERT Model: Building it from Scratch with Pytorch” by Chan Chee Kean, 2022 (
medium.com“Data And Beyond” section)
Footnotes
These notebooks are part of the Fidle training but some of them are not available in the Fidle official notebook repository.↩︎