• Stars
    star
    1,488
  • Rank 30,505 (Top 0.7 %)
  • Language
  • License
    Creative Commons ...
  • Created over 2 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿง  A study guide to learn about Transformers

Transformer Recipe

$$\operatorname{Attention}(Q, K, V)=\operatorname{softmax}\left(\frac{Q K^{T}}{\sqrt{d_{k}}}\right) V$$

Transformers have accelerated the development of new techniques and models for natural language processing (NLP) tasks. While it has mostly been used for NLP tasks, it is now seeing heavy adoption in other areas such as computer vision and reinforcement learning. That makes it one of the most important modern concepts to understand and be able to apply.

I am aware that a lot of machine learning and NLP students and practitioners are keen on learning about transformers. Therefore, I have prepared a study guide in the form of a list of resources and study materials to help guide students interested in learning about the world of Transformers.

To begin with, I have prepared a few links to materials that I used to better understand and implement transformer models from scratch.

High-level Introduction

First, try to get a very high-level introduction about transformers. Some references worth looking at:

๐Ÿ”— Introduction to Transformer - Lecture Notes (Elvis Saravia)

๐Ÿ”— Transformers From Scratch (Brandon Rohrer)

๐Ÿ”— How Transformers work in deep learning and NLP: an intuitive introduction (AI Summer)

๐Ÿ”— Stanford CS25 - Transformers United

๐Ÿ”— Deep Learning for Language Understanding (DeepMind)

๐Ÿ”— Transformer models: an introduction and catalog (Xavier Amatriain)

The Transformer Explained

Jay Alammar's illustrated explanations are exceptional. Once you get that high-level understanding of transformers, you can jump into this popular detailed and illustrated explanation of transformers:

๐Ÿ”— The Illustrated Transformer

This next article also breaks down Transformers into its components, explaining and illustrating in detail what each part does:

๐Ÿ”— Breaking Down the Transformer

Technical Summary

At this point, you may be looking for a technical summary and overview of transformers. Lilian Weng's blog posts are a gem and provide concise technical explanations/summaries:

๐Ÿ”— The Transformer Family

๐Ÿ”— The Transformer Family Version 2.0

Implementation

After the theory, it's important to test the knowledge. I typically prefer to understand things in more detail so I prefer to implement algorithms from scratch. For implementing transformers, I mainly relied on this tutorial:

๐Ÿ”— The Annotated Transformer | (Google Colab | GitHub)

๐Ÿ”— Language Modeling with nn.Transformer and TorchText

If you are looking for in-depth implementations on some of the latest transformers, you might also find the Papers with Code methods collection for Transformers useful.

Attention Is All You Need

This paper by Vaswani et al. introduced the Transformer architecture. Read it after you have a high-level understanding and want to get into the details. Pay attention to other references in the paper for diving deep.

๐Ÿ”— Attention Is All You Need

Applying Transformers

After some time studying and understanding the theory behind transformers, you may be interested in applying them to different NLP projects or research. At this time, your best bet is the Transformers library by HuggingFace.

๐Ÿ”— Transformers

The Hugging Face Team has also published a new book on NLP with Transformers, so you might want to check that out here.

Reading List on LLMs

As a bonus, here is a great reading list on LLMs by Sebastian Raschka.

๐Ÿ”— Understanding Large Language Models -- A Transformative Reading List


Feel free to suggest study material. In the next update, I am looking to add a more comprehensive collection of Transformer applications and papers. In addition, a code implementation for easy experimentation is coming as well. Stay tuned!

To get regular updates on new ML and NLP resources, follow me on Twitter.

More Repositories

1

Prompt-Engineering-Guide

๐Ÿ™ Guides, papers, lecture, notebooks and resources for prompt engineering
MDX
42,643
star
2

ML-YouTube-Courses

๐Ÿ“บ Discover the latest machine learning / AI courses on YouTube.
14,210
star
3

ml-visuals

๐ŸŽจ ML Visuals contains figures and templates which you can reuse and customize to improve your scientific writing.
11,353
star
4

ML-Papers-of-the-Week

๐Ÿ”ฅHighlighting the top ML papers every week.
8,525
star
5

ML-Papers-Explained

Explanation to key concepts in ML
6,643
star
6

ML-Course-Notes

๐ŸŽ“ Sharing machine learning course / lecture notes.
5,857
star
7

Mathematics-for-ML

๐Ÿงฎ A collection of resources to learn mathematics for machine learning
4,127
star
8

ML-Notebooks

๐Ÿ”ฅ Machine Learning Notebooks
Jupyter Notebook
3,202
star
9

nlp_paper_summaries

โœ๏ธ A carefully curated list of NLP paper summaries
1,468
star
10

GNNs-Recipe

๐ŸŸ  A study guide to learn about Graph Neural Networks (GNNs)
1,046
star
11

MLOPs-Primer

A collection of resources to learn about MLOPs.
923
star
12

AI-Product-Index

A curated index to track AI-powered products.
744
star
13

d2l-study-group

๐Ÿง  Material for the Deep Learning Study Group
387
star
14

nlp_fundamentals

๐Ÿ“˜ Contains a series of hands-on notebooks for learning the fundamentals of NLP
Jupyter Notebook
362
star
15

nlp_newsletter

๐Ÿ“ฐNatural language processing (NLP) newsletter
300
star
16

awesome-ML-projects-guide

A guide to building awesome machine learning projects.
237
star
17

dair-ai.github.io

Home of DAIR.AI
HTML
189
star
18

emotion_dataset

๐Ÿ˜„ Dataset for Emotion Recognition Research
185
star
19

awesome-research-proposals-guide

A guide to improve your research proposals.
175
star
20

ml-nlp-paper-discussions

๐Ÿ“„ A repo containing notes and discussions for our weekly NLP/ML paper discussions.
151
star
21

keep-learning-ml

A club to keep learning about ML
89
star
22

notebooks

๐Ÿ”ฌ Sharing your data science notebooks with the community has never been this easy.
Jupyter Notebook
37
star
23

covid_19_search_application

Text Similarity Search Application using Modern NLP and Elasticsearch
Jupyter Notebook
30
star
24

odsc_2020_nlp

Repository for ODSC talk related to Deep Learning NLP
24
star
25

research_emotion_analysis

๐Ÿ˜„ Multilingual emotion analysis research
Python
18
star
26

data_science_writing_primer

Writing Primer for Data Scientists
Jupyter Notebook
17
star
27

maven-pe-for-llms-4

Prompt Engineering for Large Language Models - Notebooks, Demos, Exercises, and Projects
Jupyter Notebook
16
star
28

arxiv_analysis

A project to help explore research papers and fuel new discovery
Jupyter Notebook
16
star
29

pe-for-llms

Jupyter Notebook
14
star
30

llm-evaluator

Example for Logging LLM Evaluator Prompt Responses
Jupyter Notebook
14
star
31

paper_implementations

A project for implementing ML and NLP papers
14
star
32

maven-pe-for-llms

Jupyter Notebook
12
star
33

nlp-roadmap

A comprehensive roadmap to get informed of the NLP landscape.
9
star
34

ml-discussions

Discussing ML research, engineering, papers, resources, learning paths, best practices, and much more.
8
star
35

maven-pe-for-llms-6

Materials for the Prompt Engineering for LLMs (Cohort 6)
Jupyter Notebook
7
star
36

paper_presentations

All paper presentation material will be added here
6
star
37

maven-pe-for-llms-7

Code, Demos, and Exercises for Prompt Engineering for LLMs Course
Jupyter Notebook
5
star
38

nlp_research_highlights

Contains all issues of the NLP Research Highlights series
5
star
39

maven-pe-for-llms-8

Materials for the Prompt Engineering for LLMs (Cohort 8)
Jupyter Notebook
5
star
40

deep_affective_layer

๐Ÿ˜„ Building a deep learning based affective computing platform
4
star
41

maven-pe-for-llms-2

Jupyter Notebook
3
star
42

.github

2
star
43

meetups

Material for dair.ai meetups
2
star
44

tensorflow_notebooks

A repository containing Deep Learning and Machine Learning related TensorFlow notebooks.
1
star