原文整理页

Andrej Karpathy 发布了一个仅用 243 行纯 Python 代码实现的 GPT 训练与推理项目,展示了模型的核心算法逻辑

来源作者:Andrej Karpathy (@karpathy)原始来源:https://x.com/karpathy/status/2021694437152157847

中文导读

Andrej Karpathy 发布了一个仅用 243 行纯 Python 代码实现的 GPT 训练与推理项目,展示了模型的核心算法逻辑。

正文 Markdown

New art project. Train and inference GPT in 243 lines of pure, dependency-free Python. This is the *full* algorithmic content of what is needed. Everything else is just for efficiency. I cannot simplify this any further. https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95