StudyToCert

All certifications / Azure AI Fundamentals / Lessons

Microsoft Certified: Azure AI Fundamentals AI-900 · Domain 2: Fundamental principles of machine learning on Azure

The transformer architecture: tokens, embeddings and attention

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

A transformer is the design behind today's chatbots and writing assistants. It works in three big steps. First, it chops text into small pieces called tokens, which can be whole words or parts of words. Second, it turns each token into a long list of numbers, called an embedding, so that words with similar meanings get similar numbers. Third, it uses a trick called attention: every word looks at all the other words around it to figure out what it means here. Think of the word 'bat'. You only know whether it means an animal or a baseball bat by looking at the other words in the sentence. Attention lets the model do that for every word at once.

At Juniper Legal Services, Marcus from finance forwards you a puzzling usage report. The team's new document assistant, built on a language model in Azure, is billed by something called tokens, and one long contract cost far more than a stack of short emails. The same week, a paralegal asks why the assistant understood that 'bank' meant a riverbank in one sentence and a lender in the next. You are the person everyone thinks understands AI. What exactly is a token, how does the model know which 'bank' you mean, and why does any of this affect the bill?

The transformer is the neural network architecture behind today's language models, including the GPT family available through Azure OpenAI. Before transformers, language models read text one word at a time and struggled to connect words that were far apart. Transformers changed that and made it practical to train on enormous amounts of text. AI-900 expects you to know the main ideas at a conceptual level, not the mathematics: tokens, embeddings and attention, plus the difference between encoder and decoder models.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Azure AI Fundamentals for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Azure AI Fundamentals study plan