特斯拉前 AI 总监、OpenAI 创始团队成员 Andrej Karpathy 用 C 代码完成了 GPT-2 大模型训练过程:karpathy/llm.c: LLM training in simple, raw C/CUDA (github.com)
下载源码
git clone --recursive https://github.com/karpathy/llm.c.git
下载模型
从HF-Mirror - Huggingface 镜像站下载gpt2模型:
cd llm.c
./hfd.sh openai-community/gpt2 --tool aria2c -x 4