NAiOS IconNAiOS Logo
NAiOS Wiki

Transformer

También: Transformer architecture · Transformer model · attention is all you need

The base architecture of almost all current language models

1 min de lectura

The Transformer is a neural network architecture introduced in 2017 in the paper "Attention Is All You Need". Its distinguishing feature is the attention mechanism (self-attention), which allows the model to weigh the importance of each word in relation to all others in a sequence, capturing long-range dependencies without processing the text in a strictly sequential manner.

Its relevance lies in the fact that it replaced previous architectures such as recurrent neural networks (RNN, LSTM), which were slow and struggled with long texts. By enabling parallel processing, the Transformer made it viable to train models at a massive scale, giving rise to the current generation of language models:

  • GPT and its variants (decoder-only).
  • BERT (encoder-only).
  • Translation and multimodal models (encoder-decoder).

An important practical nuance is that the cost of attention grows quadratically with respect to sequence length, which makes processing very long texts more expensive. Therefore, numerous optimized variants exist that seek to reduce this memory and computational consumption.

¿Quieres profundizar?

Lee nuestros artículos sobre IA aplicada en el blog de NAiOS.

Ir al Blog