Forwarded from Machine Learning with Python
π A Free AI Course for Beginners by Microsoft
For those just getting into artificial intelligence, Microsoft offers a free course.
It runs for 12 weeks and includes 24 lessons with theory, hands-on assignments, labs, and quizzes.
The curriculum covers neural networks and deep learning, computer vision, natural language processing, genetic algorithms, and AI ethics. For practice, it uses the two main ML frameworksβTensorFlow and PyTorch.
Each lesson follows the same structure: first, reading material, then a Jupyter notebook with code, and for some topics, a lab. The course is in English but has been translated into dozens of languages.
β‘οΈ All materials and links are on GitHub
https://github.com/microsoft/AI-For-Beginners/blob/main/translations/ru/README.md
What's your AI level right now?
β€οΈ β Advanced user
π₯ β Almost zero
#AICourse #Microsoft #DeepLearning #TensorFlow #PyTorch #MachineLearning
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
π Level up your AI & Data Science skills with HelloEncyclo β a growing all-in-one platform featuring hands-on courses in LLMs, Deep Learning, MLOps, Data Engineering, and more.
β 13 courses live + 40+ coming soon
π― One access, lifetime updates
π Use code: PRESALE-BOOK-WAVE-2GFG
π https://helloencyclo.com/?ref=HUSSEINSHEIKHO
For those just getting into artificial intelligence, Microsoft offers a free course.
It runs for 12 weeks and includes 24 lessons with theory, hands-on assignments, labs, and quizzes.
The curriculum covers neural networks and deep learning, computer vision, natural language processing, genetic algorithms, and AI ethics. For practice, it uses the two main ML frameworksβTensorFlow and PyTorch.
Each lesson follows the same structure: first, reading material, then a Jupyter notebook with code, and for some topics, a lab. The course is in English but has been translated into dozens of languages.
β‘οΈ All materials and links are on GitHub
https://github.com/microsoft/AI-For-Beginners/blob/main/translations/ru/README.md
What's your AI level right now?
β€οΈ β Advanced user
π₯ β Almost zero
#AICourse #Microsoft #DeepLearning #TensorFlow #PyTorch #MachineLearning
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
π Level up your AI & Data Science skills with HelloEncyclo β a growing all-in-one platform featuring hands-on courses in LLMs, Deep Learning, MLOps, Data Engineering, and more.
β 13 courses live + 40+ coming soon
π― One access, lifetime updates
π Use code: PRESALE-BOOK-WAVE-2GFG
π https://helloencyclo.com/?ref=HUSSEINSHEIKHO
β€1
The Attention Mechanism allows transformer neural networks to determine the connection between words in a text and dynamically focus on the most important context. We will step by step implement the basic algorithm Scaled Dot-Product Attention, using classic matrices of queries (Query), keys (Key) and values (Value). This will help us to visually see how the attention weights are mathematically calculated and how the model matches the tokens with each other. π§ β¨
To start, we will install the PyTorch library for performing tensor calculations. π οΈ
pip install torch
The library has been successfully loaded and is ready for mathematical modeling of transformer layers. β
We will generate random vectors Query, Key and Value to simulate the passage of tokens through linear projections. π²
import torch
import torch.nn.functional as F
q = torch.randn(1, 3, 4) # (batch, seq_len, dim)
k = torch.randn(1, 3, 4)
v = torch.randn(1, 3, 4)
The tensors have been initialized and represent three hidden states for a sequence of three words. π
We will calculate the token similarity matrix through the scalar product and then scale it by the square root of the vector dimensions. π’
scores = torch.bmm(q, k.transpose(1, 2)) / (q.shape[-1] ** 0.5)
attention_weights = F.softmax(scores, dim=-1)
output = torch.bmm(attention_weights, v)
The scalar product has been translated into probability weights, based on which the final contextual vector has been formed. π
A control run of the output dimension calculation:
python3 -c "import torch; q, k = torch.randn(1, 3, 4), torch.randn(1, 3, 4); print('Attention OK') if torch.bmm(q, k.transpose(1, 2)).shape == (1, 3, 3) else print('Error')"Expected output: Attention OK β
The Self-Attention formula lies at the heart of all modern LLMs, allowing them to process long contexts in parallel, unlike old recurrent networks (RNNs). Understanding this base is critically important for working with transformers, optimizing architectures and configuring KV-cache mechanisms. ππ§
#PyTorch #Transformer #DeepLearning #AI #MachineLearning #LLM
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
π Level up your AI & Data Science skills with HelloEncyclo β a growing all-in-one platform featuring hands-on courses in LLMs, Deep Learning, MLOps, Data Engineering, and more.
β 13 courses live + 40+ coming soon
π― One access, lifetime updates
π Use code: PRESALE-BOOK-WAVE-2GFG
π https://helloencyclo.com/?ref=HUSSEINSHEIKHO
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
AI PYTHON π
Youβve been invited to add the folder βAI PYTHON πβ, which includes 14 chats.
β€4