News for hackers. Stuff that matters.
Re:Transformers from Scratch by stared on Wednesday April 26, 2023 @06:22AM (#35711576)
Thank you for sharing!

For the "from scratch" version, I recommend "The GPT-3 Architecture, on a Napkin" https://dugas.ch/artificial_curiosity/GPT_architecture.html, which was there as well (https://news.ycombinator.com/item?id=33942597).

Then, to actually dive into details, "The Annotated Transformer", i.e. a walktrough "Attention Is All You Need", with code in PyTorch, https://nlp.seas.harvard.edu/2018/04/03/attention.html.

Re:Transformers from Scratch by ziyunli on Wednesday April 26, 2023 @01:38PM (#35717371)
There is a newer version of the second article https://nlp.seas.harvard.edu/annotated-transformer/