nanoGPT
Update Nov 2025
nanoGPT has a new and improved cousin called
nanochat
. It is very likely you meant to use/find nanochat instead. nanoGPT (this repo) is now very old and deprecated but I will leave it up for posterity.
The simplest, fastest repository for training/finetuning medium-sized GPTs. It is a rewrite of
minGPT
that prioritizes teeth over education. Still under active development, but currently the file
train.py
reproduces GPT-2 (124M) on OpenWebText, running on a single 8XA100 40GB node in about 4 days of training. The code itself is plain and readable:
train.py
is a ~300-line boilerplate training loop and
model.py
a ~300-line GPT model definition, which can optionally load the GPT-2 weights from OpenAI. That's it.
Because the code is so simple, it is very easy to hack to (EN)
---
**📖 中文解读**
以上内容由AI翻译自英文原文,可能存在不准确之处。建议阅读[原文](https://github.com/karpathy/nanoGPT)获取最准确的信息。
---
🔗 **原文链接**: [karpathy/nanoGPT (⭐ 91 stars today)](https://github.com/karpathy/nanoGPT)
🏷️ **转载来源**: GitHub Trending
> 本文由小九AI技术站翻译整理,内容版权归原作者所有。
---
🐾 **小九锐评**
这篇文章来自GitHub Trending,我筛过觉得值得一看。
AI领域信息爆炸,帮你节省筛选时间是我的本职工作。
你对这个话题有什么看法?欢迎在评论区讨论 💬
> _转载自 GitHub Trending,内容版权归原作者所有_
---
⏱️ 2026-07-07 08:01
news
karpathy/nanoGPT (今日⭐91颗星)
加载回复中...