llm-from-scratch-guide

llm-from-scratch-guide is a skill for Claude Code, Codex from wentorai/research-plugins. It costs 22 tokens per session (1,363 once invoked), scanned A, original, MIT.

A step-by-step learning guide for building a ChatGPT-like large language model with PyTorch, a Python framework for machine learning. It covers data preparation, tokenization, attention, pretraining, and instruction tuning.

In plain words
What is it for?
Use it to learn or experiment with the parts of a language model, including its training process and architecture.
Why use it?
It shows how a language model works internally, rather than treating it as a tool whose inner workings are hidden.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to learn or experiment with the parts of a language model, including its training process and architecture.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wentorai/research-plugins/llm-from-scratch-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wentorai/research-plugins --skill llm-from-scratch-guide
Clone the repo
git clone --depth 1 https://github.com/wentorai/research-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for llm-from-scratch-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/wentorai/research-plugins/llm-from-scratch-guide/github.svg)](https://agentmods.dev/skills/wentorai/research-plugins/llm-from-scratch-guide)
Your own site
<a href="https://agentmods.dev/skills/wentorai/research-plugins/llm-from-scratch-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/llm-from-scratch-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for llm-from-scratch-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/wentorai/research-plugins/llm-from-scratch-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/llm-from-scratch-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01363
Opus 5 $0.00011 $0.00681
Sonnet 5 $0.00004 $0.00273
Haiku 4.5 $0.00002 $0.00136

Measured 6d ago against content hash 6013ebc91793, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

llm-from-scratch-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/domains/ai-ml/llm-from-scratch-guide/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LLM From Scratch Guide

Overview

LLMs-from-scratch is a comprehensive educational repository with over 87,000 stars on GitHub that teaches you how to build a ChatGPT-like large language model from the ground up using PyTorch. Created by Sebastian Raschka, a machine learning researcher and author, the project provides a complete pipeline covering data preparation, tokenization, attention mechanisms, pretraining, and instruction finetuning.

Unlike tutorials that treat LLMs as black boxes, this project demystifies every component by walking through the full implementation. Each chapter corresponds to a Jupyter notebook with clear explanations, diagrams, and runnable code. The repository accompanies the book "Build a Large Language Model (From Scratch)" and serves as a standalone learning resource for researchers and engineers who want deep understanding of transformer-based language models.

The project is particularly valuable for academic researchers who need to understand the internals of LLMs for their own research, whether that involves modifying architectures, running ablation studies, or developing domain-specific language models for scientific applications.

Installation and Setup

Clone the repository and set up a Python environment with the required dependencies:

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

# Create a virtual environment
python -m venv llm-env
source llm-env/bin/activate

# Install dependencies
pip install -r requirements.txt

The project requires Python 3.10+ and PyTorch 2.0+. For GPU-accelerated training, ensure you have CUDA installed. The notebooks can also run on CPU for smaller model configurations, though training times will be significantly longer.

Key dependencies include:

  • PyTorch >= 2.0 for model implementation and training
  • tiktoken for BPE tokenization compatible with OpenAI models
  • matplotlib for training visualization
  • jupyter for interactive notebook execution

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 125 lines · 22 tokens per session scan A 6013ebc91793

Subscribe to this mod's changes

llm-from-scratch-guide is a skill published in the GitHub repository wentorai/research-plugins (291 stars, last pushed 2mo ago), licensed MIT. It adds 22 tokens to every session and 1,363 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fs-notebook-tabs

A computer-science capstone: an on-device ML keyboard that predicts next words privately — problem, method, evaluation, and defense answers. Built as a decision-grade coursework defense deck for professor, defense committee.

nexu-io/open-design · 47 tokens

implementing-llms-litgpt

Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.

davila7/claude-code-templates · 77 tokens

rwkv-architecture

RNN+Transformer hybrid with O(n) inference. Linear time, infinite context, no KV cache. Train like GPT (parallel), infer like RNN (sequential). Linux Foundation AI project. Production at Windows, Office, NeMo. RWKV-7 (March 2025). Models up to 14B parameters.

davila7/claude-code-templates · 72 tokens

nanogpt

Educational GPT implementation in 300 lines. Reproduces GPT-2 (124M) on OpenWebText. Clean, hackable code for learning transformers. By Andrej Karpathy. Perfect for understanding GPT architecture from scratch. Train on Shakespeare (CPU) or OpenWebText (multi-GPU).

davila7/claude-code-templates · 65 tokens

kaggle-learner

This skill should be used when the user asks to "learn from Kaggle", "study Kaggle solutions", "analyze Kaggle competitions", or mentions Kaggle competition URLs. Provides access to extracted knowledge from winning Kaggle solutions across NLP, CV, time series, tabular, and multimodal domains.

Galaxy-Dawn/claude-scholar · 69 tokens

data-science-engineering-foundation

State, resume, reconstruction, job-lifecycle, transition, and flow-state mechanics for the Data Science and Engineering Coach. Loaded by the coach; not a user entry point.

microsoft/hve-core · 43 tokens