Home/LLM Frameworks/LLMs-from-scratch
LLMs-from-scratch logo

LLMs-from-scratch

rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

GraphCanon updated Sep 20, 2026 · GitHub synced Sep 20, 2026

110views this month

105k stars16k forksLast push Sep 17, 2026 Jupyter Notebook Other

Decision brief

LLMs-from-scratch is a guide for building a ChatGPT-like language model using PyTorch, aimed at educational purposes and designed for use with accessible hardware.

Good fit when

  • When you are interested in understanding the inner workings of large language models and want to build one from scratch using PyTorch.
  • If you have limited access to specialized hardware and still want to experiment with building a language model, as the tool is designed to run on conventional laptops.

Avoid when

  • If you are looking for a quick and efficient way to deploy a pre-trained language model without delving into the implementation details.
  • When you require a production-ready solution, as LLMs-from-scratch is primarily designed for educational purposes and may not be optimized for industrial use.
Requirements:
Min 8 GB RAM; The code automatically utilizes GPUs if they are available, but it is designed to run on conventional laptops without specialized hardware.

Observed Sep 18, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (0d since push)
As of Sep 18, 2026
Provenance
Not a fork · Personal account
As of Sep 18, 2026
Security (OSV)
46 low (46 low)
As of Sep 18, 2026

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

git clone https://github.com/rasbt/LLMs-from-scratch

How it fits your stack(32)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Alternative

Depends on

Related

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A guide to building a large language model similar to ChatGPT using PyTorch, designed for educational purposes and accessible hardware requirements.

Capability facts

Languages
jupyter notebook, python

Source: github.language+pyproject.toml · Sep 18, 2026

Categories

Tags

README

Hardware Requirements The code in the main chapters of this book is designed to run on conventional laptops within a reasonable timeframe and does not require specialized hardware. This approach ensures that a wide audience can engage with the material. Additionally, the code aut...

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.