Back to directory

MiniMind

MiniMind is a from-scratch project and tutorial for training a roughly 64-million-parameter language model in about two hours on a single consumer GPU, without relying on high-level training-library abstractions.

MiniMind

It implements a minimal model architecture in both dense and mixture-of-experts form, aligned to the Qwen3 family, along with its own tokenizer and a full pipeline covering pretraining, supervised fine-tuning, LoRA, RLHF through DPO, RLAIF through PPO, GRPO and CISPO, tool use, agentic reinforcement learning, and distillation, all written from scratch in PyTorch rather than through third-party training-library abstractions.

The same codebase extends to a vision-language variant, a multimodal omni model, a diffusion language model and a linear-attention model. It supports single- and multi-GPU training with Wandb or SwanLab logging, is compatible with common serving stacks such as llama.cpp, vLLM and Ollama, and includes a minimal OpenAI-compatible chat server and a Streamlit web demo.

Apache-2.0 licensed.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.