# handsonllm/hands-on-large-language-models architecture

> Architecture diagram of the GitHub repository handsonllm/hands-on-large-language-models, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/handsonllm/hands-on-large-language-models
- Repository: https://github.com/handsonllm/hands-on-large-language-models

## Overview

This repository is the companion code for a practical book on large language models. A reader chooses a chapter notebook and runs its examples, with Google Colab recommended by the README. The notebooks progress from language-model foundations through applications and model adaptation; the bonus directory extends coverage to additional topics. The README documents chapter subjects and the Colab recommendation, but no notebook source was sampled, so the graph does not infer calls or execution dependencies between chapters.

Main entry points: [`chapter01/Chapter 1 - Introduction to Language Models.ipynb`](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter01/Chapter%201%20-%20Introduction%20to%20Language%20Models.ipynb) (Language Models), [`chapter02/Chapter 2 - Tokens and Token Embeddings.ipynb`](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter02/Chapter%202%20-%20Tokens%20and%20Token%20Embeddings.ipynb) (Tokens and Embeddings), [`chapter03/Chapter 3 - Looking Inside LLMs.ipynb`](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter03/Chapter%203%20-%20Looking%20Inside%20LLMs.ipynb) (Transformer Internals), [`chapter04/Chapter 4 - Text Classification.ipynb`](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter04/Chapter%204%20-%20Text%20Classification.ipynb) (Text Classification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["LLM Foundations"]
  node_ch1["Language Models"]
  node_ch2["Tokens and Embeddings"]
  node_ch3["Transformer Internals"]
end

subgraph group_applications["LLM Applications"]
  node_ch4["Text Classification"]
  node_ch5["Clustering and Topics"]
  node_ch6["Prompt Engineering"]
  node_ch7["Generation and Tools"]
  node_ch8["Semantic Search"]
end

subgraph group_representations["Multimodal and Embeddings"]
  node_ch9["Multimodal Models"]
  node_ch10["Embedding Models"]
end

subgraph group_adaptation["Model Adaptation"]
  node_ch11["BERT Fine-Tuning"]
  node_ch12["Generation Fine-Tuning"]
end

subgraph group_extensions["Bonus Topics"]
  node_bonus["Advanced Extensions"]
end

node_reader(("Reader"))

node_reader -->|"studies"| node_ch1
node_reader -->|"studies"| node_ch2
node_reader -->|"studies"| node_ch3
node_reader -->|"studies"| node_ch4
node_reader -->|"studies"| node_ch5
node_reader -->|"studies"| node_ch6
node_reader -->|"studies"| node_ch7
node_reader -->|"studies"| node_ch8
node_reader -->|"studies"| node_ch9
node_reader -->|"studies"| node_ch10
node_reader -->|"studies"| node_ch11
node_reader -->|"studies"| node_ch12
node_reader -.->|"explores"| node_bonus

click node_ch1 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter01/Chapter%201%20-%20Introduction%20to%20Language%20Models.ipynb"
click node_ch2 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter02/Chapter%202%20-%20Tokens%20and%20Token%20Embeddings.ipynb"
click node_ch3 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter03/Chapter%203%20-%20Looking%20Inside%20LLMs.ipynb"
click node_ch4 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter04/Chapter%204%20-%20Text%20Classification.ipynb"
click node_ch5 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter05/Chapter%205%20-%20Text%20Clustering%20and%20Topic%20Modeling.ipynb"
click node_ch6 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter06/Chapter%206%20-%20Prompt%20Engineering.ipynb"
click node_ch7 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter07/Chapter%207%20-%20Advanced%20Text%20Generation%20Techniques%20and%20Tools.ipynb"
click node_ch8 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter08/Chapter%208%20-%20Semantic%20Search.ipynb"
click node_ch9 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter09/Chapter%209%20-%20Multimodal%20Large%20Language%20Models.ipynb"
click node_ch10 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter10/Chapter%2010%20-%20Creating%20Text%20Embedding%20Models.ipynb"
click node_ch11 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter11/Chapter%2011%20-%20Fine-Tuning%20BERT.ipynb"
click node_ch12 "https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter12/Chapter%2012%20-%20Fine-tuning%20Generation%20Models.ipynb"
click node_bonus "https://github.com/handsonllm/hands-on-large-language-models/tree/main/bonus"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ch1,node_ch2,node_ch3 toneBlue
class node_ch4,node_ch5,node_ch6,node_ch7,node_ch8 toneAmber
class node_ch9,node_ch10 toneMint
class node_ch11,node_ch12 toneRose
class node_bonus,node_reader toneIndigo
```

## Components

### LLM Foundations

- [Language Models](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter01/Chapter%201%20-%20Introduction%20to%20Language%20Models.ipynb): `chapter01/Chapter 1 - Introduction to Language Models.ipynb`
- [Tokens and Embeddings](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter02/Chapter%202%20-%20Tokens%20and%20Token%20Embeddings.ipynb): `chapter02/Chapter 2 - Tokens and Token Embeddings.ipynb`
- [Transformer Internals](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter03/Chapter%203%20-%20Looking%20Inside%20LLMs.ipynb): `chapter03/Chapter 3 - Looking Inside LLMs.ipynb`

### LLM Applications

- [Text Classification](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter04/Chapter%204%20-%20Text%20Classification.ipynb): `chapter04/Chapter 4 - Text Classification.ipynb`
- [Clustering and Topics](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter05/Chapter%205%20-%20Text%20Clustering%20and%20Topic%20Modeling.ipynb): `chapter05/Chapter 5 - Text Clustering and Topic Modeling.ipynb`
- [Prompt Engineering](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter06/Chapter%206%20-%20Prompt%20Engineering.ipynb): `chapter06/Chapter 6 - Prompt Engineering.ipynb`
- [Generation and Tools](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter07/Chapter%207%20-%20Advanced%20Text%20Generation%20Techniques%20and%20Tools.ipynb): `chapter07/Chapter 7 - Advanced Text Generation Techniques and Tools.ipynb`
- [Semantic Search](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter08/Chapter%208%20-%20Semantic%20Search.ipynb): `chapter08/Chapter 8 - Semantic Search.ipynb`

### Multimodal and Embeddings

- [Multimodal Models](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter09/Chapter%209%20-%20Multimodal%20Large%20Language%20Models.ipynb): `chapter09/Chapter 9 - Multimodal Large Language Models.ipynb`
- [Embedding Models](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter10/Chapter%2010%20-%20Creating%20Text%20Embedding%20Models.ipynb): `chapter10/Chapter 10 - Creating Text Embedding Models.ipynb`

### Model Adaptation

- [BERT Fine-Tuning](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter11/Chapter%2011%20-%20Fine-Tuning%20BERT.ipynb): `chapter11/Chapter 11 - Fine-Tuning BERT.ipynb`
- [Generation Fine-Tuning](https://github.com/handsonllm/hands-on-large-language-models/blob/main/chapter12/Chapter%2012%20-%20Fine-tuning%20Generation%20Models.ipynb): `chapter12/Chapter 12 - Fine-tuning Generation Models.ipynb`

### Bonus Topics

- [Advanced Extensions](https://github.com/handsonllm/hands-on-large-language-models/tree/main/bonus): `bonus`

### Other components

- **Reader**

## Connections

- Reader → Language Models: studies (evidence: `README.md`)
- Reader → Tokens and Embeddings: studies (evidence: `README.md`)
- Reader → Transformer Internals: studies (evidence: `README.md`)
- Reader → Text Classification: studies (evidence: `README.md`)
- Reader → Clustering and Topics: studies (evidence: `README.md`)
- Reader → Prompt Engineering: studies (evidence: `README.md`)
- Reader → Generation and Tools: studies (evidence: `README.md`)
- Reader → Semantic Search: studies (evidence: `README.md`)
- Reader → Multimodal Models: studies (evidence: `README.md`)
- Reader → Embedding Models: studies (evidence: `README.md`)
- Reader → BERT Fine-Tuning: studies (evidence: `README.md`)
- Reader → Generation Fine-Tuning: studies (evidence: `README.md`)
- Reader → Advanced Extensions: explores
