# train-llm-from-scratch

A straightforward method for training your LLM, from downloading data to generating text.

Canonical page: https://www.reposhelf.co.uk/projects/github/fareedkhan-dev/train-llm-from-scratch.html

- Project ID: FareedKhan-dev/train-llm-from-scratch
- Source: GitHub
- Original project: https://github.com/FareedKhan-dev/train-llm-from-scratch
- Description attribution: project author metadata
- Categories: AI &amp; machine learning
- Technologies: Python
- Licence: MIT
- Repository availability checked: 2026-11-05T16:49:32.487Z
- Demo page loaded: 2026-11-19T14:51:49.135Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> I am Looking for a PhD position in AI. GitHub

> I implemented a transformer model from scratch using PyTorch, based on the paper Attention is All You Need. You can use my scripts to train your own billion or million parameter LLM using a single GPU, or a small one on a laptop CPU with no GPU at all.

> This started as a pretraining tutorial. It now goes all the way from raw text to an aligned, reasoning style model, with every algorithm hand written in plain PyTorch \(no trl, no peft, no transformers\). The whole journey is one idea repeated: turn text into numbers, predict the next token, then keep changing the data and the loss until the model does what we want.



## Author-documented requirements and audience

> I am Looking for a PhD position in AI. GitHub





Not recorded: Account, External API key, Paid service, Self-hosting. Missing information does not mean there are no requirements.

Source: https://github.com/FareedKhan-dev/train-llm-from-scratch/blob/main/README.md

Extraction checked: 2026-11-05T16:49:32.607Z

Last recorded source update: 2026-10-02T14:45:19.000Z

Saved release: Not recorded. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=FareedKhan-dev%2Ftrain-llm-from-scratch). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
