# infatoshi/fcc-intro-to-llms architecture

> Architecture diagram of the GitHub repository infatoshi/fcc-intro-to-llms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/infatoshi/fcc-intro-to-llms
- Repository: https://github.com/infatoshi/fcc-intro-to-llms

## Overview

This is a small educational project for learning to build language models from scratch, with a data-extraction script and several Jupyter notebooks. The sampled script confirms extraction of sampled OpenWebText archives into train/validation text and a character vocabulary. Notebook internals were not available, so their precise inputs, calls, and model outputs are not inferred; the README identifies Wizard of Oz as a fallback training/validation dataset.

Main entry points: [`data-extract.py`](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/data-extract.py) (Corpus extractor), [`vocab.txt`](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/vocab.txt) (Character vocabulary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_extract["Corpus extractor<br/>[data-extract.py]"]
  node_trainval["Train/validation text"]
  node_vocab["Character vocabulary<br/>[vocab.txt]"]
  node_wizard["Wizard of Oz corpus<br/>[wizard_of_oz.txt]"]
end

subgraph group_learning["LLM learning"]
  node_bigram["Bigram notebook<br/>[bigram.ipynb]"]
  node_v1["LLM notebook<br/>[v1.ipynb]"]
  node_torch["PyTorch examples"]
end

node_learner(("Learner"))
node_openwebtext[("OpenWebText archives")]

node_openwebtext -->|"reads archives"| node_extract
node_extract -->|"writes sampled text"| node_trainval
node_extract -->|"writes characters"| node_vocab

click node_extract "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/data-extract.py"
click node_vocab "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/vocab.txt"
click node_wizard "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/wizard_of_oz.txt"
click node_bigram "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/bigram.ipynb"
click node_v1 "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/v1.ipynb"
click node_torch "https://github.com/infatoshi/fcc-intro-to-llms/blob/main/torch-examples.ipynb"

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_extract,node_trainval,node_vocab,node_wizard toneBlue
class node_bigram,node_v1,node_torch,node_openwebtext toneAmber
class node_learner toneIndigo
```

## Components

### Data preparation

- [Corpus extractor](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/data-extract.py): `data-extract.py`
- **Train/validation text**
- [Character vocabulary](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/vocab.txt): `vocab.txt`
- [Wizard of Oz corpus](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/wizard_of_oz.txt): `wizard_of_oz.txt`

### LLM learning

- [Bigram notebook](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/bigram.ipynb): `bigram.ipynb`
- [LLM notebook](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/v1.ipynb): `v1.ipynb`
- [PyTorch examples](https://github.com/infatoshi/fcc-intro-to-llms/blob/main/torch-examples.ipynb): `torch-examples.ipynb`

### Other components

- **Learner**
- **OpenWebText archives**

## Connections

- OpenWebText archives → Corpus extractor: reads archives
- Corpus extractor → Train/validation text: writes sampled text
- Corpus extractor → Character vocabulary: writes characters
