# meet3456/llm_from_scratch architecture

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

- Interactive diagram: https://gitdiagram.com/meet3456/llm_from_scratch
- Repository: https://github.com/meet3456/llm_from_scratch

## Overview

This repository appears to be an educational collection of notebooks exploring language-model concepts, rather than an application with a demonstrated runtime workflow. The notebook names identify topics from tokenization and embeddings through attention and GPT-2 weight loading, but their contents were not provided, so their internal sequence and dependencies cannot be verified. The only sampled executable code is a standalone greeting in `main.py`; no links between it and the notebooks are evidenced.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["Model Foundations"]
  node_tokenization["Tokenization<br/>[tokenization.ipynb]"]
  node_embeddings["Vector Embeddings"]
  node_architecture["LLM Architecture"]
end

subgraph group_attention["Attention Concepts"]
  node_attention_scratch["Attention Mechanism"]
  node_self_attention["Self Attention KQV"]
end

subgraph group_model["Model Exploration"]
  node_gpt2_weights["GPT-2 Weights"]
end

node_entrypoint["Greeting Entrypoint<br/>[main.py]"]

click node_tokenization "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/tokenization.ipynb"
click node_embeddings "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/vector_embeddings.ipynb"
click node_architecture "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/llm_architecture.ipynb"
click node_attention_scratch "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/attention_mechanism_from_scratch.ipynb"
click node_self_attention "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/self_attention_k_q_v.ipynb"
click node_gpt2_weights "https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/Loading_pretrained_gpt2_weights.ipynb"
click node_entrypoint "https://github.com/meet3456/llm_from_scratch/blob/main/main.py"

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_tokenization,node_embeddings,node_architecture toneBlue
class node_attention_scratch,node_self_attention toneAmber
class node_gpt2_weights toneMint
class node_entrypoint toneTeal
```

## Components

### Model Foundations

- [Tokenization](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/tokenization.ipynb): `notebooks/tokenization.ipynb`
- [Vector Embeddings](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/vector_embeddings.ipynb): `notebooks/vector_embeddings.ipynb`
- [LLM Architecture](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/llm_architecture.ipynb): `notebooks/llm_architecture.ipynb`

### Attention Concepts

- [Attention Mechanism](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/attention_mechanism_from_scratch.ipynb): `notebooks/attention_mechanism_from_scratch.ipynb`
- [Self Attention KQV](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/self_attention_k_q_v.ipynb): `notebooks/self_attention_k_q_v.ipynb`

### Model Exploration

- [GPT-2 Weights](https://github.com/meet3456/llm_from_scratch/blob/main/notebooks/Loading_pretrained_gpt2_weights.ipynb): `notebooks/Loading_pretrained_gpt2_weights.ipynb`

### Other components

- [Greeting Entrypoint](https://github.com/meet3456/llm_from_scratch/blob/main/main.py): `main.py`
