Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Transformers from Scratch in PyTorch

Rebuilding GPT’s foundation — no shortcuts, no HuggingFace.

This repo implements the Transformer architecture (the backbone of GPT and modern LLMs) from first principles in PyTorch. It’s not about speed. It’s about understanding the math → code → model.


🔥 What’s Inside

  • Scaled Dot-Product Attention
  • Multi-Head Attention
  • Positional Encoding
  • Encoder & Decoder Layers
  • End-to-End Transformer (+ toy training loop)

⚡ Quick Start

Clone locally:

git clone https://github.com/umer-ateeq/Coding-Transformers-using-pytorch.git
cd Coding-Transformers-using-pytorch

📚 Learn More

📖 Full write-up on Medium


💡 Star ⭐ if you find it useful — feedback from researchers & practitioners is welcome!

About

Breaking down the Attention Is All You Need paper into clean, modular PyTorch code — making the Transformer architecture accessible to learners and researchers. Full Article: https://medium.com/@Umer-Ateeq/61c75d3457f1

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages