Machine Learning
40.9K subscribers
3.65K photos
33 videos
48 files
689 links
Real Machine Learning — simple, practical, and built on experience.
Learn step by step with clear explanations and working code.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
Optimizing the model's performance through Prompt Tuning with the PEFT library.

Full-fledged fine-tuning of language models requires a huge amount of video memory and completely overwrites the network's weights. We will apply the Prompt Tuning method (retraining virtual token prompts), which freezes the main model and adjusts only a tiny matrix of virtual embeddings. This allows adapting AI to a narrow task using a regular user's graphics card and without the risk of destroying the neural network's basic knowledge.

📦 First, we will install the necessary libraries for working with transformers and effective fine-tuning methods (PEFT).

pip install torch transformers peft

The packages have been successfully installed in the system and are ready for configuring lightweight training. We will create a basic Prompt Tuning configuration for training just twenty virtual tokens instead of billions of model parameters.

from peft import PromptTuningConfig, PromptTuningInit, get_peft_model
from transformers import AutoModelForCausalLM

peft_config = PromptTuningConfig(
task_type="CAUSAL_LM",
prompt_tuning_init=PromptTuningInit.TEXT,
num_virtual_tokens=20,
prompt_tuning_init_text="Classify the sentiment of this text:",
tokenizer_name_or_path="gpt2"
)

🔄 The configuration is initialized and links the text prompt to the trainable virtual embeddings. We will wrap the base model in a PEFT container to freeze the main weights and leave only the new tokens available for gradient descent.

base_model = AutoModelForCausalLM.from_pretrained("gpt2")
peft_model = get_peft_model(base_model, peft_config)
peft_model.print_trainable_parameters()

🚀 The model is ready for training, and the percentage of active parameters will be displayed on the screen (usually less than 0.01%).

python3 -c "from peft import PromptTuningConfig; print('PEFT Setup: OK')"

📝 Expected output: PEFT Setup: OK

pip uninstall peft -y

💡 Prompt Tuning — an ideal choice when you need to train a model for many different customers or tasks simultaneously. Instead of gigabyte-sized copies of neural networks, you store only lightweight configuration files weighing a few kilobytes, dynamically substituting them at inference.

#PromptTuning #PEFT #AI #MachineLearning #DeepLearning #DataScience

Join Best TG Channels https://t.iss.one/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
4🔥1
If you want to finally understand how neural networks actually learn, I recommend these notes from Stanford CS224N. 🧠

"Computing Neural Network Gradients" explains the calculation of gradients and backpropagation without black-box formulas. 📉

Inside:
• Chain Rule
• Computational Graphs
• Vectorized derivatives
• Efficient gradient calculation
• Step-by-step examples with formula analysis

Many people use PyTorch or TensorFlow every day, but never understood what happens after calling .backward(). 🔥

These notes just fill this gap. 🛠️

PDF:
https://web.stanford.edu/class/cs224n/readings/gradient-notes.pdf

#NeuralNetworks #DeepLearning #StanfordCS #Backpropagation #MachineLearning #AIResearch

Join Best TG Channels https://t.iss.one/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
2
Parallax: A Parameterized Local Linear Attention That Keeps Softmax and Adds a Learned Covariance Correction Branch 🧠

The Transformer’s attention mechanism has barely changed since 2017. Most efficiency work has tried to replace softmax attention outright. A new paper takes a different route. It keeps softmax attention and bolts on a correction branch. 🔄

A team of researchers from Northwestern University, Tilde Research, and University of Washington introduce a parameterized Local Linear Attention called ‘Parallax’ that scales to LLM pretraining and codesigns with Muon. 🎓

Parallax does not chase efficiency by cutting compute. It adds compute deliberately, then makes that compute cheaper to run on modern GPUs. 💻

More: https://www.marktechpost.com/2026/05/31/parallax-a-parameterized-local-linear-attention-that-keeps-softmax-and-adds-a-learned-covariance-correction-branch/

#Parallax #LLM #AI #DeepLearning #Transformer #TechNews

Join Best TG Channels https://t.iss.one/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
5
If you already have 200 open tabs with courses, articles, and GitHub repositories on ML, this repository might save the situation a bit. 😅

Awesome Machine Learning Resources is a huge collection of sub-collections on machine learning, deep learning, and AI. 🤖

Instead of endless Google searches, everything is organized into categories:

• fundamentals of machine learning
• neural networks and modern architectures
• tasks and application areas
• datasets
• libraries and tools
• fairness and AI ethics
• production ML and MLOps

Each link has a short description, so you can quickly understand whether it's worth opening it or skipping it. 📝

I particularly liked that the authors mark abandoned collections with an icon if they haven't been updated in over a year. ⚠️

https://github.com/ZhiningLiu1998/awesome-machine-learning-resources

#MachineLearning #DeepLearning #AI #MLOps #DataScience #TechResources

Join Best TG Channels https://t.iss.one/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
3
This media is not supported in your browser
VIEW IN TELEGRAM
Someone spent several months manually writing a 200-page guide on mathematics and the basics of machine learning. 📘

No marketing fluff or endless links between articles. Just an attempt to gather all the most important things in one place. 🎯

Inside:

• neural networks: backpropagation, SGD, Adam, BatchNorm; ⚙️
• classic ML: SVM, Gradient Boosting, K-Means, PCA; 📊
• hardware for AI: Tensor Cores, Systolic Arrays, CUDA; 🖥️
• transformers: Multi-Head Attention, KV Cache, LoRA; 🧠
• computer vision: ViT, CNN, MAE, IoU, NMS, VLM; 👁️
• agent systems: ReAct, memory, orchestration, OpenClaw. 🤖

The author describes it as the material he would have wanted to receive himself several years ago. 🕰️

And yes, the entire guide is distributed free of charge. 🆓

https://www.arjunvirk.com/writing/ml-guide

#MachineLearning #AI #DeepLearning #DataScience #NeuralNetworks #Tech

Join Best TG Channels https://t.iss.one/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
3