NJX-njx/microgpt

🔬 The most atomic GPT-2 implementation in 265 lines of pure Python & CUDA. A bilingual "Rosetta Stone" for understanding LLM internals from scratch. No dependencies, just math and kernels.

19
/ 100
Experimental

This project offers a compact, understandable implementation of a GPT-2 style language model. It helps developers learn how large language models work internally by providing side-by-side Python and CUDA code. You input a text corpus, and it trains a model to generate new text, helping you understand the process from raw data to text generation.

Use this if you are a developer or researcher looking to deeply understand the core algorithms of a GPT-2 style LLM through a highly optimized, minimalist codebase.

Not ideal if you need a production-ready LLM, a library for building applications, or a tool that doesn't require direct code interaction.

LLM-internals GPU-optimization model-architecture deep-learning-education
No License No Package No Dependents
Maintenance 10 / 25
Adoption 6 / 25
Maturity 3 / 25
Community 0 / 25

How are scores calculated?

Stars

21

Forks

Language

HTML

License

Last pushed

Mar 05, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/NJX-njx/microgpt"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.