GitHub · 灵魂体仓库·· 17 天前AI 评分22
从零实现字符级大语言模型(PyTorch):bigram 基线到 GPT 风格 Transformer
bharath26t-create/LLM_sample
来源与原文
GitHub · 灵魂体仓库
发布时间:(北京时间)
阅读原始来源 · github.com ↗完整链接与内容说明
https://github.com/bharath26t-create/LLM_sample
本站目前仅有 AI 导读与摘要,未展示原文正文;技术细节、代码和完整结论请查看原始来源。
AI 导读
GitHub 开源项目 LLM_sample 用 PyTorch 从零构建字符级语言模型:先用 bigram 基线(loss 约 2.86 降至约 2.82),再实现 GPT 风格 decoder-only Transformer(n_layer=3、n_embd=128、n_head=4,仅训练 500 步)。项目附 data-extract.py 从 OpenWebText 抽样 1% 构建语料与 vocab.txt,灵感来自 Andrej Karpathy 的 makemore / nanoGPT。
来源:GitHub · 灵魂体仓库 · github.com