openskills.info
Course Preview

Transformer Models

Transformer models are neural network architectures that use self-attention to process sequences in parallel rather than step by step. They power modern language models, machine translation, and many other tasks where understanding relationships between elements in a sequence is critical.

itArtificial intelligence and machine learning

Transformer Models

The transformer is the neural network architecture behind every major large language model — GPT, Claude, Gemini, Llama, and the rest. Introduced in the 2017 paper "Attention Is All You Need," it replaced the recurrent and convolutional architectures that came before it, and it did so by discarding an assumption those architectures had never questioned: that a model needs to read text one token at a time, in order.

This course goes deeper into that architecture than a general orientation to LLMs does. If you haven't already, the LLM Foundations course in this catalog covers what a large language model is, how it's trained, and what it can and can't do — the mental model this course builds on. Here, the focus narrows to the mechanism itself: self-attention, multi-head attention, positional encoding, and the block structure that everything else is built from.

Why transformers replaced RNNs and CNNs

Before the transformer, sequence models were recurrent: a recurrent neural network (RNN) processed a sentence one token at a time, carrying forward a hidden state that summarized everything seen so far. That design had two structural problems. It couldn't be parallelized — token 50 couldn't be processed until tokens 1 through 49 were done — which made training slow. And it struggled with long-range dependencies, since information from early in a long sequence had to survive being compressed through dozens of sequential updates before it could influence a later token.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://arxiv.org/abs/1706.03762
  • https://huggingface.co/learn/llm-course/chapter1/4
  • https://huggingface.co/learn/llm-course/chapter1/5
  • https://huggingface.co/blog/designing-positional-encoding