SirawitC/Transformer_from_scratch_pytorch

Build a transformer model from scratch using pytorch to understand its inner workings and gain hands-on experience with deep learning models in PyTorch.

44
/ 100
Emerging

This project provides a detailed guide for machine learning engineers or researchers to build a Transformer model from scratch using PyTorch. It explains each core component like tokenization, positional encoding, and multi-head attention, showing how they fit together. The output is a working Transformer model, ideal for those who want to understand the foundational architecture behind modern NLP models like BERT and GPT.

Use this if you are a deep learning practitioner who wants to understand the inner workings of Transformer models by implementing one yourself, rather than just using a pre-built library.

Not ideal if you are looking for a plug-and-play solution to immediately apply a Transformer model to a real-world problem without needing to understand its intricate components.

deep-learning-engineering natural-language-processing model-architecture neural-networks machine-learning-research
No Package No Dependents
Maintenance 6 / 25
Adoption 8 / 25
Maturity 16 / 25
Community 14 / 25

How are scores calculated?

Stars

42

Forks

7

Language

Python

License

MIT

Last pushed

Nov 25, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/SirawitC/Transformer_from_scratch_pytorch"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.