AIAny
AI Train2024
Icon for item

minimind

Trains a sub-100M-parameter LLM from scratch — pretraining, SFT, LoRA, DPO/RLHF, and distillation, sized from ~26M up to ~100M-plus dense and MoE. Headline figure: the ~64M minimind-3 variant's SFT stage runs 1 epoch in ~2h and ~3 RMB on one NVIDIA 3090.

Introduction

Most "learn how LLMs work" resources stop at toy notebooks or hand you a frozen checkpoint to fine-tune. The interesting bet here is the opposite: the entire pipeline that produces a real, chatting language model fits on one consumer GPU. The project's headline data point is that the SFT stage of its ~64M minimind-3 variant runs 1 epoch in roughly 2 hours and about 3 RMB of GPU rental on a single NVIDIA 3090 — cheap enough that the architecture and every training stage become things you can actually rerun and break.

What Sets It Apart
  • It builds the model from absolute zero rather than fine-tuning an existing base — pretraining, SFT, LoRA, DPO/RLHF, and knowledge distillation are all present end to end. So the parts usually treated as black boxes become editable code.
  • The full modern training ladder lets you trace how a base model turns into something that follows instructions, not just read about it.
  • Sizes scale from ~26M up through ~100M-plus dense and MoE variants. So the same codebase covers both "smallest thing that talks" and experiments with mixture-of-experts routing.
  • A concrete cost figure is attached to the ~64M minimind-3 SFT run (~3 RMB, ~2 hours, one 3090). So reproducing that result is a planned afternoon, not an open-ended GPU bill.
  • A vocabulary-training example (train_tokenizer.py) is included for the curious, though the project deliberately ships and recommends its own minimind_tokenizer and advises against retraining it, since changing the vocab breaks weight, data, and ecosystem compatibility.
Who It's For

Great fit if you want to understand transformer LLMs by building one — students, engineers ramping into ML, or anyone who learns by rerunning the whole loop on hardware they own. Look elsewhere if you need a deployable assistant: these models are deliberately tiny and meant for study and experimentation, so their factual range and reasoning depth are far below production-grade models.

Information

  • Websitegithub.com
  • OrganizationsIndependent
  • Authorsjingyaogong
  • Published date2024/08/27

Categories

More Items

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub
AI Train2026

Provides a one-command CLI to fine-tune and post-train LLMs, with layer streaming that lets an 8B model be fine-tuned on a 4 GB laptop GPU. Auto-configures quantization, LoRA adapters, batching and evaluation gates, and supports export and serving workflows.

GitHub
AI Train2025

A PyTorch DTensor-native SPMD library for training and fine-tuning LLMs, VLMs, diffusion and retrieval models. Integrates with Hugging Face for day-0 model support, provides YAML-driven recipes, DTensor/FSDP2 parallelism and NVIDIA-optimized kernels (Transformer Engine, DeepEP, FlexAttn).