← all repositories
tanishqkumar/beyond-nanogpt

Bridging nanoGPT and Research, One File at a Time

Annotated, from-scratch implementations of almost 100 modern techniques to help newcomers close the gap between tutorial code and research papers.

beyond-nanogpt
Not currently ranked — collecting fresh signals.
star history

What it does

This repository contains minimal, by-hand implementations spanning LLM internals, vision transformers, generative models, reinforcement learning, and distributed systems fundamentals. Each module is heavily commented to surface the subtle details that papers and production codebases usually skip. It is designed as a readable reference for developers who have worked through nanoGPT and want to understand how research ideas actually work before running their own experiments.

The interesting bit

Instead of wrapping libraries or stitching together pre-built blocks, the author re-derives techniques like speculative decoding, tensor parallelism, and flow matching from scratch. The comments act as inline marginalia, calling out the implementation tricks that make the math executable.

Key highlights

  • Covers attention variants (grouped-query, linear, multi-latent), architectures (Mamba, Mixture-of-Experts, DiT), and LLM optimizations (KV caching, RoPE, speculative decoding)
  • Includes full RL pipelines: PPO, A3C, IMPALA, and a partial AlphaZero implementation with MCTS self-play
  • Generative models run from GANs and VAEs up to DDPM and flow matching
  • Systems code covers GPU communication algorithms, DDP, tensor parallelism, and basic Triton kernels
  • Agents and evals: a coding agent with ReAct and tool use, plus GSM8k, MMLU, and SimpleQA benchmarks

Caveats

  • Several listed modules—such as Neural Radiance Fields, Paged Attention, continuous batching, and full RLHF/DPO training—remain unchecked on the roadmap
  • Most scripts expect a GPU; CPU execution is technically possible but described as “untenably slow”
  • A few advanced pieces, like multi-GPU tensor parallelism, obviously need multi-GPU nodes

Verdict

Worth bookmarking if you are a self-taught developer trying to graduate from tutorials into research literacy. Skip it if you need production-hardened frameworks rather than pedagogical skeletons.

Frequently asked

What is tanishqkumar/beyond-nanogpt?
Annotated, from-scratch implementations of almost 100 modern techniques to help newcomers close the gap between tutorial code and research papers.
Is beyond-nanogpt open source?
Yes — tanishqkumar/beyond-nanogpt is open source, released under the MIT license.
What language is beyond-nanogpt written in?
tanishqkumar/beyond-nanogpt is primarily written in Python.
How popular is beyond-nanogpt?
tanishqkumar/beyond-nanogpt has 1.3k stars on GitHub.
Where can I find beyond-nanogpt?
tanishqkumar/beyond-nanogpt is on GitHub at https://github.com/tanishqkumar/beyond-nanogpt.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.