PyData London 2025

Diving into Transformer Model Internals
06-08, 14:45–15:30 (Europe/London), Grand Hall

While everybody and their dog is building applications on generative AI, the inner workings of transformers - the model architecture behind genAI age - is a mystery for most people. In this talk, I'll walk through how transformers are implemented, using real-life Python code from the HuggingFace transformers library.


The inner workings of transformers is a huge topic, and one that constantly evolves, so it's impossible to cover absolutely everything in 30 minutes. I'd like the audience to take away from this talk the "minimal viable knowledge" that helps them to understand the most salient details, and to build an intuition around what goes on under the hood.

We'll cover:

  1. An overview of how transformers process text using an example
  2. Transformers as a concept vs specific implementations, particularly HuggingFace's transformers library
  3. A code tour of the HuggingFace transformers library

This talk is primarily aimed at programmers and software engineers, who want to build a coder's intuition for how this stuff really works, as well as data scientists who want to better understand how transformers are implemented internally.


Prior Knowledge Expected

Previous knowledge expected

Programmer, and CTO at Fuzy Labs. I enjoy AI, MLOps, bio-inspired computing and functional programming.