AGENTIA
AI BaseLLMs & Transformers
05 · Foundation models

LLMs & Transformers

The architecture, training objective, adaptation methods, and systems ideas behind modern language models.

Academic pathway3 curated papersReadable formulas
Learning outcomes
  • Explain self-attention, positional information, and autoregressive decoding
  • Choose prompting, retrieval, fine-tuning, or preference optimization
  • Estimate memory, latency, and quality trade-offs
Core equations · rendered for reading, not code
Scaled dot-product attention
Attention(Q,K,V) = softmax(QKᵀ / √dₖ) V

Scores query–key compatibility, normalizes it, and mixes value vectors.

LoRA adaptation
W′ = W₀ + (α/r) BA

Freezes the base matrix and learns a low-rank update, reducing trainable parameters.

Next-token likelihood
L = − Σₜ log P(xₜ | x₍<t₎)

Language models learn by assigning high probability to the next observed token.

Deep study guide

A reusable technical reading framework for moving from vocabulary to working understanding. Use it alongside the formulas and papers below.

4-part knowledge map
01

Conceptual map

The architecture, training objective, adaptation methods, and systems ideas behind modern language models. Start by naming the representation, objective, and source of evidence in any system you study. This habit separates a useful model explanation from a list of buzzwords.

02

Technical reasoning

Use the learning outcomes as checks for understanding: Explain self-attention, positional information, and autoregressive decoding; Choose prompting, retrieval, fine-tuning, or preference optimization; Estimate memory, latency, and quality trade-offs. For each claim, ask what assumptions make it true, what data it needs, and how it could fail.

03

Equations to implementation

Translate each equation into a small experiment before treating it as memorized knowledge. Scaled dot-product attention: Scores query–key compatibility, normalizes it, and mixes value vectors. LoRA adaptation: Freezes the base matrix and learns a low-rank update, reducing trainable parameters. Next-token likelihood: Language models learn by assigning high probability to the next observed token.

04

Evidence and research practice

Read primary work with a repeatable lens: problem, method, data, measurement, limits, and what would change your mind. This section starts with “Attention Is All You Need”, “BERT: Pre-training of Deep Bidirectional Transformers”, “LoRA: Low-Rank Adaptation of Large Language Models”. Follow citations outward only after you can explain the central claim in your own words.

Build exercise

Implement a minimal example using Scaled dot-product attention; record inputs, outputs, and a failure case.

Evaluate exercise

Define a baseline, a success metric, a stress test, and the evidence required before you trust an improvement.

Extend exercise

Choose one paper from the library, reproduce a small claim, then write down the questions its evaluation leaves open.

Research library

Primary sources and peer-reviewed work to deepen this page.

Each card includes a summary and direct paper link
NeurIPS2017

Attention Is All You Need

A. Vaswani et al.

Introduces the Transformer: parallel self-attention replaces recurrence for sequence modeling.

#attention#Transformer
Read paper / source
NAACL2018

BERT: Pre-training of Deep Bidirectional Transformers

J. Devlin et al.

Shows that bidirectional masked-language pretraining transfers effectively to many NLP tasks.

#pretraining#NLP
Read paper / source
ICLR2021

LoRA: Low-Rank Adaptation of Large Language Models

E. J. Hu et al.

Adapts large models with compact low-rank trainable matrices while preserving the base weights.

#fine-tuning#efficiency
Read paper / source
Continue your pathway