Repository navigation
一份以 minimind 为代码对照的中文 LLM 机制手册 #926
chenchen8486
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
感谢 minimind 的开源工作。
我在学习分词、RoPE、RMSNorm、SwiGLU、GQA 以及预训练 / 微调链路时,一直以本仓库的 PyTorch 实现为对照,整理了一份可离线浏览的中文机制手册《LLM 机制学习手册》。手册按 LLM 全链路分章(数据、分词、位置编码、架构、预训练、中间训练、后训练、推理部署等),公式和示意图之外,部分机制会注明对照的是 minimind 的哪个文件、哪几行。仓库里的
minimind-master/是上游的只读副本,保留原始 Apache 2.0 许可证,权利仍归原作者。在线阅读:https://chenchen8486.github.io/LLM_learning/
仓库:https://github.com/chenchen8486/LLM_learning
例如第 13.2 节讲 KV Cache 时,对照的是
model/model_minimind.py里 Attention 的 past_key_value 拼接(约 121–123 行)、generate 的切片(269–270 行)和缓存回写(286 行),并按仓库的默认配置估算了缓存显存。这只是一份学习向的机制说明,不是对官方文档的替代,也不是在为本项目求 star。如果说明里有对照不准确的地方,欢迎直接指出,我会改正。
All reactions