Skip to content

jehanhasanbd/DeepPyTorchLight

Repository files navigation

🔥 PyTorch: Zero to LLM

Master Deep Learning — From Tensors to Building Your Own GPT


PyTorch Made with Love PRs Welcome Stars


📌 Navigation

Section Focus
1️⃣ PyTorch basics: Tensors & Autograd
2️⃣ Datasets & DataLoaders
3️⃣ Perceptron → MLP
4️⃣ Regression & Classification
5️⃣ CNN: Cat vs Dog
6️⃣ RNN → LSTM → Build your own GPT

1️⃣ Fundamentals of PyTorch

The building blocks of every neural network

Concept Code
🧩 Tensor Operations ▶️ Launch
⚙️ Autograd Engine ▶️ Launch

2️⃣ Data Engineering

Load, transform, and iterate like a pro

Component Code
📦 Dataset & DataLoader ▶️ Launch

3️⃣ Training Pipeline Architecture

🧠 Perceptron

Implementation Code
From scratch (no nn.Module) ▶️ Launch
Using nn.Module ▶️ Launch

🧬 Multi-Layer Perceptron

Implementation Code
MLP with nn.Module ▶️ Launch
Sequential API ▶️ Launch
With DataLoader ▶️ Launch

4️⃣ Artificial Neural Networks (ANN)

📈 Regression

Problem Code
⛽ Fuel Price Prediction ▶️ Launch
🏠 Housing Price Prediction ▶️ Launch

🏷️ Classification

Problem Code
🎓 Grade Prediction (Multiclass) ▶️ Launch

5️⃣ Computer Vision 👁️

See the world through CNNs

Project Code
🐱🐶 Cat vs Dog Classifier ▶️ Launch

6️⃣ Natural Language Processing 📝

From sequences to generative AI

🔁 RNN

Task Code
❓ Question Answer System ▶️ Launch
🔮 Next Word Prediction ▶️ Launch

🧠 LSTM

Task Code
❓ Question Answer System ▶️ Launch
🔮 Next Word Prediction ▶️ Launch

🔁 Bidirectional LSTM

Task Code
🔮 Next Word Prediction ▶️ Launch

🏗️ Build Your Own LLM (GPT Series)

📊 Preprocessing

Technique Code
✏️ Custom Space-Based Encoding ▶️ Launch
🔡 Byte-Pair Encoding (BPE) ▶️ Launch

🎯 Attention Mechanism

📌 Self-Attention (click to expand)
# Type Code
1 Non-parameterized ▶️ Launch
2 Trainable parameterized ▶️ Launch
🔒 Masked Self-Attention
# Implementation Code
1 Basic masked attention ▶️ Launch
2 Batch + Class-based ▶️ Launch
🧠 Multi-Head Masked Attention
# Implementation Code
1 Wrapper class ▶️ Launch
2 Optimized version ▶️ Launch

🧱 LLM Architecture (GPT-2 Family)

Component Code
🏛️ GPT Model Architecture ▶️ Launch
📐 Layer Normalization ▶️ Launch
⚡ Feed Forward + GELU ▶️ Launch
🔗 Shortcut Connections ▶️ Launch
🧩 Transformer Block ▶️ Launch
Complete Models
🟢 Small GPT-2 (124M) ▶️ Launch
🔵 Medium GPT-2 (350M) ▶️ Launch
🟠 Large GPT-2 (750M) ▶️ Launch
🔴 XL GPT-2 (1.63B) ▶️ Launch
✨ Text Generation ▶️ Launch

⚙️ Pretraining Pipeline

Step Code
🔄 Text ↔ Token ▶️ Launch
📉 Loss Function ▶️ Launch
🏋️ Training Loop ▶️ Launch
🎲 Randomness Injection ▶️ Launch
💾 Load Pretrained Weights ▶️ Launch

🚀 Start Your Journey

Stage Focus
🟢 Beginner PyTorch basics + Perceptron
🟡 Intermediate ANN + CNN + RNN/LSTM
🔴 Advanced Build GPT from scratch

⭐ Star this repo — You're building an LLM. Own it.

About

A concise, hands-on journey through PyTorch fundamentals to building deep learning models—from tensors and autograd to CNNs, RNNs, LSTMs, and a complete GPT-style LLM with attention mechanisms and training pipelines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors