Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
ifaposto 
posted an update 4 days ago
Post
124
I’ve uploaded a minimal, self-contained implementation of manual autograd for a transformer-based classifier in PyTorch. It can help build intuition for what autograd is doing under the hood and is a useful hands-on reference for low-level differentiation in Transformer models, such as writing custom backward passes and tracing how gradients flow through attention blocks.

🐙 GitHub:

https://github.com/ifiaposto/transformer_custom_autograd/tree/main

📓 Colab:

https://colab.research.google.com/drive/1Lt7JDYG44p7YHJ76eRH_8QFOPkkoIwhn