nanochat is a from-scratch, end-to-end “mini ChatGPT” that shows the entire path from raw text to a chatty web app in one small, dependency-lean codebase. The repository stitches together every stage of the lifecycle: tokenizer training, pretraining a Transformer on a large web corpus, mid-training on dialogue and multiple-choice tasks, supervised fine-tuning, optional reinforcement learning for alignment, and finally efficient inference with caching. Its north star is approachability and speed: you can boot a fresh GPU box and drive the whole pipeline via a single script, producing a usable chat model in hours and a clear markdown report of what happened. The code is written to be read—concise training loops, transparent configs, and minimal wrappers—so you can audit each step, tweak it, and rerun without getting lost in framework indirection.

Features

  • One-script “speedrun” from clean machine to chat model
  • Full pipeline coverage: tokenizer, pretrain, SFT, optional RL, inference
  • Minimal, readable training loops and configs for easy modification
  • Web UI and CLI chat frontends with streaming responses
  • Efficient inference with KV caching and throughput-friendly batching
  • Automatic run artifacts and markdown reports for reproducibility

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow nanochat

nanochat Web Site

Other Useful Business Software
The #1 solution for profitable resource management Icon
The #1 solution for profitable resource management

Designed to give Operations and Finance leaders the insight and foresight they need to achieve profitable delivery at scale.

Unlike spreadsheets or clunky PSAs, Float offers a clear, centralized view to schedule teams, plan capacity, estimate work, and track margins in real-time so that you can keep your people and profits on track.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of nanochat!

Additional Project Details

Programming Language

Python

Related Categories

Python Artificial Intelligence Software

Registered

2025-10-13