---
title: "Transformer architecture"
source: "https://systems-analysis.info/eng/Transformer_architecture"
wiki: "systems-analysis.info/eng"
article: "Transformer_architecture"
language: "en"
categories:
  - "Category:English"
  - "Category:Large language models"
  - "Category:LLM core concepts"
  - "Category:Machine learning"
  - "Category:Technology"
revision_id: 422
wiki_created_at: 2026-09-06T22:23:19Z
wiki_modified_at: 2026-09-06T22:23:19Z
downloaded_at: 2026-09-07T22:23:18Z
---

# Transformer architecture

**Transformer architecture** is a neural network architecture introduced in 2017 by Google researchers in the paper "Attention Is All You Need"<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>. It revolutionized the field of natural language processing (NLP) and has become the foundation for most modern [large language models](https://systems-analysis.info/eng/Large_language_model "Large language model") (LLMs), such as BERT, GPT, and Gemini. The key innovation of the Transformer is the **self-attention** mechanism, which allows the model to weigh the importance of different parts of the input data and process sequences in parallel, abandoning the recurrence inherent in RNNs and LSTMs.

## Historical Context and Prerequisites

Before 2017, the dominant architectures for processing sequential data, such as text, were recurrent neural networks (RNNs) and their advanced variant, long short-term memory (LSTM) networks.

### Problems with RNN/LSTM Addressed by the Transformer

- **Sequential Processing Limitations:** RNNs and LSTMs process data token by token, which prevents intra-sequence parallelism and slows down training on large datasets.
- **Vanishing and Exploding Gradients Problem:** In long sequences, gradients propagated backward through many steps can either vanish or explode, making it difficult to train long-term dependencies.
- **Long-Term Dependencies:** Information from the beginning of a sequence can be lost by the time the end is reached.

The Transformer's approach is a **complete departure from recurrence** in favor of an attention mechanism. It provides a **constant dependency path length** between any two positions ($O(1)$), which facilitates the modeling of long-range dependencies, although the basic implementation of self-attention has a **quadratic computational complexity** with respect to the sequence length ($O(n^{2})$)<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)[\[2\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-tay2020-2)</sup>. The vanishing/exploding gradients problem doesn't "disappear" but is **mitigated** by residual connections, LayerNorm, and the training regimen; modern implementations often use the **Pre-LayerNorm (Pre-LN)** variant for greater training stability<sup>[\[3\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-xiong2020-3)</sup>.

## Architecture and Key Components

The original Transformer architecture consists of two main parts: an **encoder** and a **decoder**. Both components are stacks of identical layers ($N = 6$ in the original paper)<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>.

- **Encoder Layer Structure:** (1) multi-head self-attention (MHA), (2) a position-wise feed-forward network (FFN); each sub-layer is surrounded by a residual connection and LayerNorm<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>.
- **Decoder Layer Structure:** (1) **masked** self-attention (a causal mask prevents access to future positions), (2) **cross-attention** to the encoder outputs, (3) an FFN—also with residuals and LayerNorm<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>.

### Attention Mechanism and Self-Attention

The attention mechanism computes a weighted sum of value vectors (Value), where the weights are determined by the compatibility of keys (Key) with queries (Query). The Transformer uses **Scaled Dot-Product Attention**:

${Attention}(Q,K,V) = {softmax}\!\left( \frac{QK^{\top}}{\sqrt{d_{k}}} \right)V$

Where $d_{k}$ is the dimension of the keys/queries; dividing by $\sqrt{d_{k}}$ prevents the softmax function from saturating<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>. When $Q$, $K$, and $V$ are generated from the same sequence, the mechanism is called **self-attention**.

### Multi-Head Attention

Instead of a single set of matrices $(W_{Q},W_{K},W_{V})$, $h$ parallel "heads" are used, each of which projects $Q,K,V$ into lower-dimensional subspaces, computes attention independently, and then the results are concatenated and projected<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>:

${MultiHead}(Q,K,V) = {Concat}(\text{head}_{1},\ldots,\text{head}_{h})W^{O},\quad\text{where~}\text{head}_{i} = {Attention}(QW_{i}^{Q},KW_{i}^{K},VW_{i}^{V}).$

**Variants for Inference Acceleration:**

- **MQA (Multi-Query Attention):** All heads share a single key/value pair, which significantly reduces the size and memory traffic of the KV cache during decoding<sup>[\[4\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-shazeer2019-4)</sup>.
- **GQA (Grouped-Query Attention):** A compromise between MHA and MQA—several groups of heads share K/V; its quality is close to MHA with MQA-like speed<sup>[\[5\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-ainslie2023-5)</sup>.

### Positional Encoding

Since self-attention is invariant to token order, **positional encodings** are added to the input embeddings.

- **Original sinusoidal encodings** (PE) from<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>:

$\text{PE}(\text{pos},2i) = \sin\!\left( \text{pos}/10000^{2i/d_{\text{model}}} \right),\quad\text{PE}(\text{pos},2i + 1) = \cos\!\left( \text{pos}/10000^{2i/d_{\text{model}}} \right).$

- **Modern relative/rotary variants:**
  - **RoPE (Rotary Position Embeddings)** encodes relative shifts by rotating the $Q$/$K$ vectors; it is used in several modern LLMs<sup>[\[6\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-su2021-6)</sup>.
  - **ALiBi** introduces a linear bias to attention scores, which improves extrapolation to lengths longer than those seen during training<sup>[\[7\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-press2021-7)</sup>.

### Position-wise FFN, Residuals, and Normalization

Each encoder and decoder layer, in addition to attention, contains a **position-wise feed-forward network (FFN)**:

${FFN}(x) = \max(0,xW_{1} + b_{1})W_{2} + b_{2}.$

**Residual connections** and **Layer Normalization** are used around each sub-layer: ${LayerNorm}(x + {Sublayer}(x))$. The original paper used the **Post-LN** variant<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>; modern LLMs often use **Pre-LN** for better training stability and less reliance on a long warm-up period<sup>[\[3\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-xiong2020-3)</sup>.

## Evolution and Modern Variants

Early methods based on recurrent neural networks (RNNs) and their advanced variants, such as LSTMs, processed text sequentially, one token at a time. Although this approach intuitively matched the structure of language, it created a significant limitation: it hindered parallel computation and made it difficult to capture dependencies between elements that were far apart in the text. In 2017, a group of researchers from Google introduced a paper titled "Attention Is All You Need." In it, they described a new architecture—the "Transformer." This model was the first to completely abandon the use of recurrent neural networks, replacing them with an "attention" mechanism. The main innovation was that the attention mechanism allowed the Transformer to weigh the importance of every word in the input sequence when generating the corresponding word in the output. Crucially, the model could process all words simultaneously. This capability for parallel processing made it possible to train much larger models on vast amounts of data. This resulted in the emergence of modern large language models (LLMs).

The Transformer architecture served as the basis for numerous models, which can be broadly divided into three classes.

### 1. [Encoder-only Models](https://systems-analysis.info/eng/Encoder-only_models "Encoder-only models")

- **Example:** [BERT](https://systems-analysis.info/eng/BERT_(language_model) "BERT (language model)") (and RoBERTa, ALBERT)<sup>[\[8\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-devlin2019-8)</sup>.
- **Principle:** Pre-training on a **masked language modeling (MLM)** task with a bidirectional context.
- **Application:** Understanding tasks (classification, NER, etc.).

### 2. [Decoder-only Models](https://systems-analysis.info/eng/Decoder-only_models_(architecture) "Decoder-only models (architecture)")

- **Example:** The GPT series ([GPT-1/2/3](https://systems-analysis.info/eng/GPT_(OpenAI) "GPT (OpenAI)"))<sup>[\[9\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-radford2018-9)[\[10\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-brown2020-10)</sup>, [LLaMA](https://systems-analysis.info/eng/LLaMA_(Meta_AI) "LLaMA (Meta AI)")<sup>[\[11\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-llama2023-11)</sup>, [Claude](https://systems-analysis.info/eng/Claude_(Anthropic) "Claude (Anthropic)").
- **Principle:** **Causal language modeling (CLM)**—predicting the next token; a causal mask is applied to the attention mechanism<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>.
- **Application:** Text generation, dialogue, and code.

### 3. [Encoder-decoder Models](https://systems-analysis.info/eng/Encoder%E2%80%93decoder_architecture "Encoder–decoder architecture")

- **Example:** The original Transformer, [T5](https://systems-analysis.info/eng/T5_(Text-to-Text_Transfer_Transformer) "T5 (Text-to-Text Transfer Transformer)"), BART<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)[\[12\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-raffel2019-12)</sup>.
- **Principle:** The encoder builds a representation of the input, and the decoder generates the output using cross-attention to the encoder's features<sup>[\[1\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-vaswani2017-1)</sup>.
- **Application:** Seq2seq tasks (translation, summarization, etc.).

### 4. [Multimodal](https://systems-analysis.info/eng/Multimodal_large_language_models "Multimodal large language models") and Alternative Architectures

- **Vision Transformer (ViT)**—an adaptation for images (by splitting them into patches)<sup>[\[13\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-dosovitskiy2020-13)</sup>; **Swin Transformer**—a hierarchical model using *shifted windows*<sup>[\[14\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-liu2021-swin-14)</sup>.
- **Alternatives for long sequences:**
  - **Mamba**—selective state space models (SSMs) with linear complexity<sup>[\[15\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-gu2023-mamba-15)</sup>.
  - **RWKV**—an RNN-like architecture with parallelizable training and linear inference complexity<sup>[\[16\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-peng2023-rwkv-16)</sup>.
  - **Hybrids** (e.g., **[Jamba](https://systems-analysis.info/eng/Jamba_(language_model) "Jamba (language model)")**): Alternate between Transformer and Mamba blocks; sometimes supplemented with MoE<sup>[\[17\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-lieber2024-jamba-17)</sup>.

## Training and Optimization Techniques

The effectiveness of the Transformer is closely tied to training techniques and infrastructure.

- **Pre-training Strategies:** CLM and MLM; also contrastive and denoising objectives (ELECTRA, T5)<sup>[\[12\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-raffel2019-12)</sup>.
- **Fine-tuning Techniques:**
  - **Full fine-tuning** of all parameters.
  - **Parameter-Efficient Fine-Tuning (PEFT):** **LoRA** introduces low-rank adapters while keeping the base weights frozen<sup>[\[18\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-hu2021-lora-18)</sup>.
- **Behavioral Alignment:** **RLHF**—Reinforcement Learning from Human Feedback<sup>[\[19\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-ouyang2022-rlhf-19)</sup>.
- **System-level Inference Optimizations:** **PagedAttention/vLLM** increases serving throughput via paged management of the KV cache; especially useful for long sequences and large batches<sup>[\[20\]](https://systems-analysis.info/eng/Transformer_architecture#cite_note-kwon2023-vllm-20)</sup>.

## External links

- <a href="https://jalammar.github.io/illustrated-transformer/" class="external text" rel="nofollow">The Illustrated Transformer — A visual explanation of the Transformer architecture</a>
- <a href="https://en.wikipedia.org/wiki/Transformer_(deep_learning)" class="external text" rel="nofollow">Transformer (deep learning) — Wikipedia</a>

## Literature

- Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). *Attention Is All You Need*. NeurIPS. <a href="https://arxiv.org/abs/1706.03762" class="external text" rel="nofollow">arXiv:1706.03762</a>.
- Devlin, J., Chang, M.-W., Lee, K., Toutanova, K. (2019). *BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding*. <a href="https://arxiv.org/abs/1810.04805" class="external text" rel="nofollow">arXiv:1810.04805</a>.
- Radford, A., Narasimhan, K., Salimans, T., Sutskever, I. (2018). *Improving Language Understanding by Generative Pre-Training*. OpenAI Technical Report.
- Brown, T. B., Mann, B., Ryder, N., et al. (2020). *Language Models Are Few-Shot Learners*. NeurIPS. <a href="https://arxiv.org/abs/2005.14165" class="external text" rel="nofollow">arXiv:2005.14165</a>.
- Raffel, C., Shazeer, N., Roberts, A., et al. (2019). *Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer*. <a href="https://arxiv.org/abs/1910.10683" class="external text" rel="nofollow">arXiv:1910.10683</a>.
- Dosovitskiy, A., Beyer, L., Kolesnikov, A., et al. (2020). *An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale*. <a href="https://arxiv.org/abs/2010.11929" class="external text" rel="nofollow">arXiv:2010.11929</a>.
- Liu, Z., Lin, Y., Cao, Y., et al. (2021). *Swin Transformer: Hierarchical Vision Transformer using Shifted Windows*. <a href="https://arxiv.org/abs/2103.14030" class="external text" rel="nofollow">arXiv:2103.14030</a>.
- Tay, Y., Dehghani, M., Bahri, D., Metzler, D. (2020). *Efficient Transformers: A Survey*. <a href="https://arxiv.org/abs/2009.06732" class="external text" rel="nofollow">arXiv:2009.06732</a>.
- Xiong, R., Yang, Y., He, D., et al. (2020). *On Layer Normalization in the Transformer Architecture*. ICML. <a href="https://arxiv.org/abs/2002.04745" class="external text" rel="nofollow">arXiv:2002.04745</a>.
- Su, J., Lu, Y., Pan, S., et al. (2021). *RoFormer: Rotary Position Embedding*. <a href="https://arxiv.org/abs/2104.09864" class="external text" rel="nofollow">arXiv:2104.09864</a>.
- Press, O., Smith, N. A., Lewis, M. (2021). *Train Short, Test Long: Attention with Linear Biases (ALiBi)*. <a href="https://arxiv.org/abs/2108.12409" class="external text" rel="nofollow">arXiv:2108.12409</a>.
- Shazeer, N. (2019). *Fast Transformer Decoding: One Write-Head is All You Need* (MQA). <a href="https://arxiv.org/abs/1911.02150" class="external text" rel="nofollow">arXiv:1911.02150</a>.
- Ainslie, J., Lee-Thorp, J., de Jong, M., et al. (2023). *GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints*. EMNLP. <a href="https://arxiv.org/abs/2305.13245" class="external text" rel="nofollow">arXiv:2305.13245</a>.
- Kwon, W., Li, Z., Zhuang, S., et al. (2023). *Efficient Memory Management for LLM Serving with PagedAttention* (vLLM). <a href="https://arxiv.org/abs/2309.06180" class="external text" rel="nofollow">arXiv:2309.06180</a>.
- Touvron, H., Lavril, T., Izacard, G., et al. (2023). *LLaMA: Open and Efficient Foundation Language Models*. <a href="https://arxiv.org/abs/2302.13971" class="external text" rel="nofollow">arXiv:2302.13971</a>.
- Gu, A., Dao, T. (2023). *Mamba: Linear-Time Sequence Modeling with Selective State Spaces*. <a href="https://arxiv.org/abs/2312.00752" class="external text" rel="nofollow">arXiv:2312.00752</a>.
- Peng, B., et al. (2023). *RWKV: Reinventing RNNs for the Transformer Era*. <a href="https://arxiv.org/abs/2305.13048" class="external text" rel="nofollow">arXiv:2305.13048</a>.
- Lieber, O., Lenz, B., Bata, H., et al. (2024). *Jamba: A Hybrid Transformer-Mamba Language Model*. <a href="https://arxiv.org/abs/2403.19887" class="external text" rel="nofollow">arXiv:2403.19887</a>.
- Hu, E. J., Shen, Y., Wallis, P., et al. (2021). *LoRA: Low-Rank Adaptation of Large Language Models*. <a href="https://arxiv.org/abs/2106.09685" class="external text" rel="nofollow">arXiv:2106.09685</a>.
- Ouyang, L., Wu, J., Jiang, X., et al. (2022). *Training language models to follow instructions with human feedback*. <a href="https://openreview.net/forum?id=TG8KACxEON" class="external text" rel="nofollow">OpenReview</a>.

## References

1.  <span id="cite_note-vaswani2017-1">↑ <sup>[1.00](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-0)</sup> <sup>[1.01](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-1)</sup> <sup>[1.02](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-2)</sup> <sup>[1.03](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-3)</sup> <sup>[1.04](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-4)</sup> <sup>[1.05](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-5)</sup> <sup>[1.06](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-6)</sup> <sup>[1.07](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-7)</sup> <sup>[1.08](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-8)</sup> <sup>[1.09](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-9)</sup> <sup>[1.10](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-10)</sup> <sup>[1.11](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-vaswani2017_1-11)</sup> Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). *Attention Is All You Need*. NeurIPS. arXiv:1706.03762.</span>
2.  <span id="cite_note-tay2020-2">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-tay2020_2-0) Tay, Y., Dehghani, M., Bahri, D., Metzler, D. (2020). *Efficient Transformers: A Survey*. arXiv:2009.06732.</span>
3.  <span id="cite_note-xiong2020-3">↑ <sup>[3.0](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-xiong2020_3-0)</sup> <sup>[3.1](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-xiong2020_3-1)</sup> Xiong, R., Yang, Y., He, D., et al. (2020). *On Layer Normalization in the Transformer Architecture*. ICML. arXiv:2002.04745.</span>
4.  <span id="cite_note-shazeer2019-4">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-shazeer2019_4-0) Shazeer, N. (2019). *Fast Transformer Decoding: One Write-Head is All You Need*. arXiv:1911.02150.</span>
5.  <span id="cite_note-ainslie2023-5">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-ainslie2023_5-0) Ainslie, J., Lee-Thorp, J., de Jong, M., et al. (2023). *GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints*. EMNLP. arXiv:2305.13245.</span>
6.  <span id="cite_note-su2021-6">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-su2021_6-0) Su, J., Lu, Y., Pan, S., et al. (2021). *RoFormer: Rotary Position Embedding*. arXiv:2104.09864.</span>
7.  <span id="cite_note-press2021-7">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-press2021_7-0) Press, O., Smith, N. A., Lewis, M. (2021). *Train Short, Test Long: Attention with Linear Biases (ALiBi)*. arXiv:2108.12409.</span>
8.  <span id="cite_note-devlin2019-8">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-devlin2019_8-0) Devlin, J., Chang, M.-W., Lee, K., Toutanova, K. (2019). *BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding*. arXiv:1810.04805.</span>
9.  <span id="cite_note-radford2018-9">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-radford2018_9-0) Radford, A., Narasimhan, K., Salimans, T., Sutskever, I. (2018). *Improving Language Understanding by Generative Pre-Training*. OpenAI.</span>
10. <span id="cite_note-brown2020-10">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-brown2020_10-0) Brown, T. B., Mann, B., Ryder, N., et al. (2020). *Language Models Are Few-Shot Learners*. NeurIPS. arXiv:2005.14165.</span>
11. <span id="cite_note-llama2023-11">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-llama2023_11-0) Touvron, H., Lavril, T., Izacard, G., et al. (2023). *LLaMA: Open and Efficient Foundation Language Models*. arXiv:2302.13971.</span>
12. <span id="cite_note-raffel2019-12">↑ <sup>[12.0](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-raffel2019_12-0)</sup> <sup>[12.1](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-raffel2019_12-1)</sup> Raffel, C., Shazeer, N., Roberts, A., et al. (2019). *Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer*. JMLR. arXiv:1910.10683.</span>
13. <span id="cite_note-dosovitskiy2020-13">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-dosovitskiy2020_13-0) Dosovitskiy, A., Beyer, L., Kolesnikov, A., et al. (2020). *An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale*. ICLR. arXiv:2010.11929.</span>
14. <span id="cite_note-liu2021-swin-14">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-liu2021-swin_14-0) Liu, Z., Lin, Y., Cao, Y., et al. (2021). *Swin Transformer: Hierarchical Vision Transformer using Shifted Windows*. ICCV. arXiv:2103.14030.</span>
15. <span id="cite_note-gu2023-mamba-15">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-gu2023-mamba_15-0) Gu, A., Dao, T. (2023). *Mamba: Linear-Time Sequence Modeling with Selective State Spaces*. arXiv:2312.00752.</span>
16. <span id="cite_note-peng2023-rwkv-16">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-peng2023-rwkv_16-0) Peng, B., et al. (2023). *RWKV: Reinventing RNNs for the Transformer Era*. arXiv:2305.13048.</span>
17. <span id="cite_note-lieber2024-jamba-17">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-lieber2024-jamba_17-0) Lieber, O., Lenz, B., Bata, H., et al. (2024). *Jamba: A Hybrid Transformer-Mamba Language Model*. arXiv:2403.19887.</span>
18. <span id="cite_note-hu2021-lora-18">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-hu2021-lora_18-0) Hu, E. J., Shen, Y., Wallis, P., et al. (2021). *LoRA: Low-Rank Adaptation of Large Language Models*. arXiv:2106.09685.</span>
19. <span id="cite_note-ouyang2022-rlhf-19">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-ouyang2022-rlhf_19-0) Ouyang, L., Wu, J., Jiang, X., et al. (2022). *Training language models to follow instructions with human feedback*. OpenReview.</span>
20. <span id="cite_note-kwon2023-vllm-20">[↑](https://systems-analysis.info/eng/Transformer_architecture#cite_ref-kwon2023-vllm_20-0) Kwon, W., Li, Z., Zhuang, S., et al. (2023). *Efficient Memory Management for LLM Serving with PagedAttention*. arXiv:2309.06180.</span>
