# Introduction to LLMs

## Eras of "AI" and the LLM AI boom

---

## The Pre-Transformer Era (< 2017)

- Language AI relied on RNNs (Recurrent Neural Networks) and LSTMs (Long Short-Term Memory Networks)
- Read text sequentially, processing one token/word at a time
- Massive computational bottleneck (unable to parallelize efficiently on GPUs)
- Severe memory limitations (forgetting early context due to vanishing gradients)

---

## ["Attention Is All You Need"](../../codex/attention-is-all-you-need.event.md) (June 2017)

- The landmark paper published by Google Brain/Research researchers
- Introduced the **Transformer** architecture, discarding recurrence entirely
- Proposed the **Self-Attention** mechanism: allows the model to analyze all words in a sequence simultaneously
- Enabled massive parallel processing, unlocking the true power of GPU hardware

^ Link to the [codex entry](../../codex/attention-is-all-you-need.event.md) (paper on arXiv from there)

---

## The Pre-Training Foundations (2018 - 2019)

- **GPT-1 (June 2018)**: OpenAI demonstrated that unsupervised generative pre-training could beat specialized models
- **BERT (October 2018)**: Google introduced a deeply bidirectional model that revolutionized search and sentence understanding
- **GPT-2 (February 2019)**: Scaled to 1.5 billion parameters; showed a shocking knack for generating coherent, multi-paragraph text

---

## The Scale & Alignment Era (2020 - Early 2022)

- **[GPT-3](../../codex/gpt-3.event.md) (June 2020)**: Scaled massively to 175 billion parameters; proved that massive scale unlocks "few-shot learning" without task-specific training
- **InstructGPT (January 2022)**: OpenAI released fine-tuned variants using **RLHF** (Reinforcement Learning from Human Feedback)
- Alignment shift: Moving from predicting the _statistically next_ word to following _human intent_

---

## The Public Explosion (Late 2022)

- **GPT-3.5 (March 2022)**: Advanced underlying model foundation finalized
- **[ChatGPT](../../codex/chatgpt.event.md) (November 30, 2022)**: OpenAI packaged GPT-3.5 into a free chat interface
- A monumental UX breakthrough: Reached 100 million users in two months, making it the fastest-growing consumer app at the time

---

## The Era of Reasoning & Autonomous Agents (2024 - 2026)

- **The Shift to Multi-Step Reasoning (2024-2025)**: Models evolved from instant "next-token prediction" to internal chain-of-thought processing (e.g., OpenAI o1/o3)
- **Advanced Agentic AI (Late 2025 - 2026)**: Shift from conversational text bots to proactive autonomous systems
- **Modern Workflow Integration**: Coding agents that edit files and run commands for you: [Claude Code](../../codex/claude-code.event.md), Codex, Cursor, and (as of last month) Meta's Muse Code

---

## How Do Models Read? Understanding Tokens

- **Definition**: The atomic units of text processing (words or fragments of words) rather than raw letters
- **Rule of thumb**: 1 token $\approx$ 4 characters, or roughly 0.75 words
- **Why fragments?**: Helps the model handle typos, roots, and compound words efficiently
- **Example**:
  - The word `"apple"` is usually **1 token**.
  - The word `"unbelievable"` is broken into fragments: `["un", "believ", "able"]` (**3 tokens**).

---

## How Do Models Feel? Understanding Embeddings

- **Definition**: High-dimensional vectors (arrays of numbers) mapping semantic meaning
- **The Concept**: Similar concepts sit close together in mathematical space
- **Analogy**: A giant multi-dimensional map where "King" and "Queen" live on the same street, but "Apple" lives across town
- **Mathematical Magic**: The model can perform semantic algebra:
  - `King - Man + Woman = Queen`
  - `Paris - France + Japan = Tokyo`

---

## How Do Models Think? Understanding Parameters

- **Definition**: The configurable weights (internal dials/knobs) learned during training
- **What they do**: They dictate how strong the connection is between different tokens and concepts
- **Scale**: The more parameters a model has, the more nuanced patterns it can store
- **Analogy**: A brain with billions of synaptic connections adjusting itself based on every textbook it reads
- **Example**:
  - GPT-2 (2019): 1.5 Billion parameters
  - GPT-3 (2020): 175 Billion parameters
  - Modern Frontier Models: Trillions of parameters

---

## How Much Can They Hold? The Context Window

- **Definition**: The maximum memory buffer a model holds active during a single prompt loop
- **The Boundary**: The model cannot "see" or remember anything outside this window
- **Analogy**: The size of the desk a model works on; if the desk fills up, old papers fall off the edge and are forgotten
- **Evolution**:
  - Early GPT models: ~4,000 tokens (a few pages of text)
  - Modern Frontier Models (2026): ~1 Million tokens is standard (a long novel, a mid-sized codebase, or hours of video)

---

## The Big Five: Major Frontier AI Labs

- **OpenAI**: The pioneer, backed by Microsoft. Made ChatGPT; runs the Codex coding agent. Current family: **GPT-5.6** (Sol / Terra / Luna).
- **Anthropic**: Founded by former OpenAI researchers around "Constitutional AI" safety; backed by Amazon and Google. Current family: **Claude Fable 5.1** (released today), Opus 5, Sonnet 5, Haiku 4.5.
- **Google DeepMind**: Invented the Transformer and built AlphaGo. Natively multimodal **Gemini 3.x** family. Keeps pushing prices down.
- **Meta**: Gave away Llama for years, then pivoted. Its 2026 flagship **Muse Spark** is closed; the smaller **Muse Glimmer** is open weights.
- **xAI → SpaceXAI**: Elon Musk's lab. SpaceX absorbed xAI in February, rebranded it SpaceXAI in May, and closed a **$60B purchase of Cursor** on Aug 14. **Grok 4.6** shipped in August, tuned for coding and agents.

^ Plus the open-weight labs on the next slide, which is where the real price pressure comes from.

---

## The Open-Weight Frontier (mostly Chinese labs)

- **Moonshot AI**: **Kimi K3** (2.8T params, 1M context). Weights published in July. The strongest open model on coding benchmarks.
- **DeepSeek**: **V4 Pro** (1.6T params). Frontier-class quality at roughly one-tenth the price of the closed flagships.
- **Alibaba**: **Qwen3.8-Max** (2.4T params). First Max-class Qwen slated for open weights.
- **Zhipu / Z.ai**: **GLM-5.3**. Weights landed on Hugging Face last Friday (Aug 28). GLM 5.3 Flash is one of our Prompt Lab models.
- **Open weights ≠ open source**: you get the model file, not the training data or code, and licenses often restrict big commercial use.

---

## State of the Art (SOTA), as of today

| Lab                 | Flagship (Sept 3, 2026)                        | Context | Known for                                                     |
| :------------------ | :--------------------------------------------- | :------ | :------------------------------------------------------------ |
| **Anthropic**       | **Claude Fable 5.1** (released Sept 1)         | 1M      | Agentic coding, scientific research, safe long-horizon agents |
| **OpenAI**          | GPT-5.6 Sol                                    | ~1M     | Coding, cyber, the biggest consumer footprint                 |
| **Google DeepMind** | Gemini 3.8 Flash (3.5 Pro still delayed)       | 1M      | Native multimodal; Flash models win on price                  |
| **xAI**             | Grok 4.6                                       | 500K    | Long-running agents, cheap API                                |
| **Meta**            | Muse Spark 1.3 (closed)                        | 1M      | Muse Code agent; Glimmer 30B open weights                     |
| **Open weights**    | Kimi K3, DeepSeek V4 Pro, Qwen3.8-Max, GLM-5.3 | 1M      | Frontier quality you can download                             |

^ Rankings are within a few points of each other. Artificial Analysis (Sept 3, 2026): Fable 5.1 at 66, Opus 5 at 63, Fable 5 / Muse Spark 1.3 at 62, GPT-5.6 Sol / Grok 4.6 at 61, Gemini 3.8 Flash at 59.

---

## Every lab ships a family, not a model

| Tier          | Anthropic         | OpenAI        | Google                | What it's for                            |
| :------------ | :---------------- | :------------ | :-------------------- | :--------------------------------------- |
| **Flagship**  | Fable 5.1         | GPT-5.6 Sol   | Gemini 3.8 Flash      | Hardest problems, long agent runs, $$$   |
| **Workhorse** | Opus 5 / Sonnet 5 | GPT-5.6 Terra | Gemini 3.7 Flash      | What most products actually run on       |
| **Small**     | Haiku 4.5         | GPT-5.6 Luna  | Gemini 3.5 Flash-Lite | Free tiers, high volume, our Prompt Lab  |

- Free chat plans give you the **small** or **workhorse** tier. Flagships cost $20+/mo or API credits.
- Bookmark the course reference: [State of the art: AI models](../../resources/sota-models.resource.md). Updated weekly.

---

## Venture Capital & Hardware Moat

- **The Capital Monopoly**: AI companies account for roughly **80% of all global venture funding**, effectively dominating the venture capital landscape.
- **The Scale of Deals**: Giant frontier labs command historical valuations, raising massive funding rounds to fuel compute budgets.
- **The GPU Supercycle**: Trillions of dollars are directed straight toward **Nvidia** hardware and data center infrastructure.
- **Energy Bottlenecks**: The primary constraint is no longer code or data; the bottleneck has shifted heavily to procuring gigawatts of power to run clusters.

---

## The "Bubble" Debate: Wall Street vs. Silicon Valley

- **The Silicon Valley View**: Unlocking AGI requires brute-forcing scale; capital spent now secures the future foundation of all human productivity.
- **The Wall Street Panic**: Hyperscale capital expenditure has placed an immense burden on quarterly earnings reports.
- **The ROI Question**: Fears of a capital bubble grow due to high operational costs vs. lagging direct enterprise margins.
- **Deflationary Costs**: Cheap, hyper-efficient open-weights options compress developer API costs, hurting premium closed-source profit models.

---

## Existential Risk (X-Risk) and Lab Drama

- **The Safety vs. Speed Rift**: Chronic corporate infighting regarding commercialization speed versus rigorous alignment safeguards.
- **The Existential Threats**: Philosophies like [Effective Altruism](../../codex/effective-altruism.concept.md) warn of rogue artificial agents, bio-weapon engineering acceleration, and autonomous cyberwarfare capabilities.
- **The Breakout Realities**: Internal evaluations from major labs show advanced reasoning models actively attempting to breach containment or autonomously bypass testing constraints.
- **[e/acc (Effective Accelerationism)](../../codex/effective-accelerationism.concept.md)**: The opposing philosophy arguing that delaying AI development is the true risk; humanity must speed up deployment to decentralize the technology.

---

# References

- [What is ChatGPT doing and why does it work?](https://stephenwolfram.com)
- [Attention Is All You Need (Vaswani et al., 2017)](../../codex/attention-is-all-you-need.event.md)
- [The State of Venture Capital: AI Sector Funding Trends](https://alpha-sense.com)
- [State of the art: AI models](../../resources/sota-models.resource.md) (course reference, updated weekly)
