UTIO

AI glossary · Models

Transformer

In one sentence

A transformer is a neural network architecture that processes every word in a text at once and uses an attention mechanism to work out which parts relate to each other. It's the foundation of almost every language model in use today.

Also known as: transformer architecture · transformer model · transformer network

What is a transformer?

Before transformers, language models read text one word at a time, left to right, carrying a running summary of what they’d seen. In long sentences, the beginning faded away. And because the work was sequential, training on large amounts of data was slow.

Put it to work

AI agents that look after your customers

From €49/mo + VAT

Voice, WhatsApp and email with the phone line included: agent, numbers and CRM in one fee.

See plans and pricing

The transformer fixed both problems. It looks at the whole text at once and, for every word, calculates how much attention to pay to each of the others. That calculation is called attention. In “The customer rang the garage because her car wouldn’t start”, attention helps link “her” to “the customer” rather than “the garage”.

Because every position is processed in parallel, transformers can be trained on enormous volumes of text using graphics cards. That’s where today’s LLMs and families like GPT come from.

Related to this term

UTIO agents

  • Available 24/7 in 26 languages
  • Set it up yourself for €0: built from your website
  • 14-day free trial, no card needed

From €49/mo + VAT

See plans and pricing

How it works

In simplified terms, a transformer:

  1. Converts each token into a vector of numbers and adds information about its position in the sentence.
  2. Applies attention: each token looks at all the others and takes in whatever is relevant. This happens several times in parallel (“multi-head attention”) so it can capture different kinds of relationship at once.
  3. Repeats the process across many stacked layers. Early layers pick up simple relationships; later ones capture more abstract meaning.
  4. Outputs a probability for every possible next token.

The original design had two halves, an encoder and a decoder, built for translation. Today’s generative models usually keep only the decoder. Variants such as mixture of experts change part of the block to make it more efficient.

Example

A travel agency in Edinburgh gets enquiries like: “I’d like to take my mum to Rome in May, but she can’t walk very far, which hotel would you suggest?” To answer well, the system has to connect “she” with “my mum”, and “can’t walk very far” with the choice of hotel, even though they sit apart in the sentence.

Linking distant parts of a text is exactly what transformer attention does. That’s why a modern assistant can follow long, rambling requests that a keyword-based system would miss.

How it affects your business

You don’t need to know how to build a transformer to use AI. Two practical consequences are worth knowing, though. First, the cost of attention grows with the length of the text, which is why models have a limited context window and why techniques like RAG send only what’s needed. Second, the model answers from the connections it finds in the text, not from verified facts, which is where hallucinations come from.

When a UTIO AI agent makes sense of a long message from your customer on WhatsApp, a transformer is doing that work under the hood.

Frequently asked questions

What does the T in GPT stand for?

Transformer. GPT stands for generative pre-trained transformer: a generative model, pre-trained on large amounts of text and built on the transformer architecture.

Who invented the transformer?

A team of Google researchers introduced it in 2017 in the paper 'Attention Is All You Need'. It was designed for machine translation and later adopted for almost every language task, as well as for images and audio.

Are there alternatives to the transformer?

Other architectures are being researched, such as state space models, and some systems combine them with transformers. Even so, the transformer remains the basis of most language models in use.

Related terms

  • LLM

    An LLM (large language model) is an AI model trained on vast amounts of text to predict the next word. That single skill lets it draft, summarise, translate, classify and hold a conversation.

  • GPT

    GPT (generative pre-trained transformer) is OpenAI's family of language models. The name sums up how they work: they generate text, are pre-trained on huge amounts of data and are built on the transformer architecture.

  • Neural network

    An artificial neural network is a mathematical model made of layers of connected units, called neurons, that turn a numeric input into an output. It learns by adjusting the weight of each connection based on examples.

  • Deep learning

    Deep learning is a type of machine learning that uses neural networks with many layers. Each layer picks out more abstract features of the data, which lets it handle text, speech and images without hand-written rules.

  • Token

    A token is the chunk of text a language model works with: a word, part of a word or a punctuation mark. Models read, count and bill in tokens, not in words or characters.

Updated on

← Back to the glossary

UTIO is the AI agent line of Universal Telecom, an operator registered with the CNMC.