Transformer

AI concepts
About 1 min read

A deep learning architecture that parallelizes input sequence processing with self-attention at its core, serving as the foundation for most modern LLMs.

Also known as
TransformerTransformer model

Detailed explanation

Transformer is a deep learning architecture proposed in Google's 2017 paper "Attention Is All You Need". Unlike RNNs and LSTMs, which process sequences sequentially from front to back, it references all positions of the input simultaneously using a self-attention mechanism. This enables parallel computation, which speeds up training and effectively captures relationships between distant words (long-range dependencies). Nearly all of today's large language models, including GPT, BERT, Claude, and Gemini, are built on this structure, which is also expanding beyond text into image and audio domains.

Why it matters for tool selection

Most of the chatbots, coding assistants, and translation tools we use today run on Transformer-based models. While you rarely need to work with the architecture directly, understanding that the input length (context window) a model can reference at once and the processing costs stem from this architecture's attention calculations helps clarify your criteria when choosing tools that require processing long documents or comparing cost and latency.

Key model aspects to check

  • How large of a context window (number of tokens handled at once) the model used by the tool supports.
  • How response latency and token costs increase as the input length grows.
  • Whether it is a multimodal model that can process image and audio inputs alongside text.
  • Whether there are any usage constraints depending on whether it is an open-weight model or an API-only model.

Real-world use cases

To extract key clauses by inputting a contract spanning dozens of pages at once, the model's context window must support that length. Because Transformer attention calculations grow sharply as the input gets longer, the processing capability and cost for the same task can vary significantly depending on the model and tool.

Related terms

LLMGPTAttentionBERT