# Om-Alve/smolGPT

Repository: https://github.com/Om-Alve/smolGPT
Canonical: https://ross.abutalabs.com/products/smolgpt
Language: Python
License: MIT
License Family: permissive
Last push: 2025-02-15T04:12:05+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 6, release rhythm 35, longevity 42
- inputs: {"age_days": 598, "days_push": 564, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1475, forks 126 (observed 2026-08-28T04:04:49.793759+00:00)

## What it is
A minimal pure-PyTorch implementation for training small GPT-style LLMs from scratch, featuring flash attention, RMSNorm, SwiGLU, RoPE, and modern sampling techniques. It includes a full training pipeline with dataset preprocessing, SentencePiece tokenizer training, and text generation sampling, aimed at education.

## Use cases
- train a small GPT model from scratch
- learn how transformers and LLMs work internally
- generate text with a custom-trained language model
- train an LLM on the TinyStories dataset
- experiment with flash attention and RoPE in PyTorch
- build a custom tokenizer with SentencePiece

## When to choose
- you want a readable, minimal codebase to learn LLM training internals
- you need to train a small GPT on a custom dataset with a modern GPU
- you want an educational alternative to heavyweight frameworks like nanoGPT

## When to avoid
- you need production-grade LLM training at scale with distributed support
- you want a ready-made large pretrained model for real applications
- you need multi-GPU or multi-node training out of the box

## Facets
- artifact type: library
- maturity: active
- function: llm-training, llm-inference, machine-learning, deep-learning
- domain: large-language-models, deep-learning, machine-learning, education, tutorials
- platform: python, cross-platform
- tags: pytorch, gpt, transformer, flash-attention, tinystories, educational, from-scratch, sentencepiece, rope, text-generation, tokenization, gpu, linux

## Member repositories
- Om-Alve/smolGPT (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:49.793759+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:29.825130+00:00, confidence not recorded.
  - readme: https://github.com/Om-Alve/smolGPT (fetched 2026-08-28T04:04:49.793759+00:00, sha d2ca6c477dd5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
