Skip to content
Back to the AI glossary

Glossary · AI concepts & terminology

Transformer

In short

A network architecture that uses an attention mechanism to recognise which parts of an input matter to each other. It is the technical basis of today’s large language models.

Reference: General AI knowledge

What it means

Vaswani and colleagues introduced the transformer in 2017 in the paper Attention Is All You Need. Its core is self-attention: for every token of an input the model computes how strongly it should take the other tokens into account, and combines them with the corresponding weights. Earlier recurrent networks processed a sequence step by step. The transformer looks at all positions at once, which greatly speeds up training on large computers.

The original architecture had an encoder and a decoder for machine translation. Today’s large language models mostly use only the decoder and generate text token by token. Models for images and speech now also build on transformers, such as the speech recognition model Whisper. According to the original paper, the computing effort of self-attention grows quadratically with the length of the input. That explains why long contexts are expensive and why context windows are limited.

In practice and in the audit

For your company the architecture is rarely the decisive question, yet it explains properties you have to plan for. The context window is limited, and long inputs cost more computing time and, with cloud services, more money. The model sees text as a sequence of tokens and computes with probabilities; its knowledge is spread across the weights and cannot be looked up. If you run a model locally, plan graphics memory for weights and context.

When choosing, measurements on your own tasks therefore count for more than details of the architecture. Ask the provider about the model version, the size of the context window, where processing takes place and how your data are handled. ISO/IEC 42001 requires in A.4.4 that the tools and models used are documented, and in A.6.2.4 that they are checked against defined criteria. ISO/IEC 22989:2022 describes in 5.12.1 the older types of neural network, including the recurrent networks that the transformer has largely replaced for language.

References in standards and law

I cite standards by clause number and in my own words, never verbatim. Legal texts link to EUR-Lex.

  • ISO/IEC 22989:2022, 5.12.1Types of neural network, including recurrent networks.
  • ISO/IEC 42001:2023, A.4.4Documenting tools and models.
  • ISO/IEC 42001:2023, A.6.2.4Verification and validation against defined criteria.

Frequently asked questions

Do I need to understand how a transformer works to use language models safely?

Not in detail. It helps to know that the model splits text into tokens, computes probabilities and only sees a limited context. The everyday rules follow from that: check results, choose inputs deliberately and split long documents.

Related terms

Further reading in the insights

Matching service

Running language models locally

Turning AI projects into tested software, on request with language models that run locally on your own hardware.

To AI implementation

Author: Lars Zimmermann

Term and explanation in my own words. Researched to the best of my knowledge and reviewed for accuracy.