Show HN: ZigFormer – 用纯 Zig 语言实现的 LLM
3 分•作者: habedi0•7 个月前
大家好,
我制作了 ZigFormer 的早期版本,这是一个用 Zig 语言实现的小型 LLM,不依赖于 PyTorch 或 JAX 等外部机器学习框架。ZigFormer 的模型基于教科书式的 LLM(如 OpenAI 的 GPT-2),既可以用作 Zig 库,也可以作为独立应用程序来训练模型并与之聊天。
这主要是一个教育项目。我在这里分享它,以防其他人觉得它有趣或有用。
项目链接:<a href="https://github.com/CogitatorTech/zigformer" rel="nofollow">https://github.com/CogitatorTech/zigformer</a>
查看原文
Hi everyone,<p>I've made an early version of ZigFormer, a small LLM implemented in Zig with no dependencies on external ML frameworks like PyTorch or JAX. ZigFormer is modelled after a textbook LLM (like GPT-2 from OpenAI) and can be used as a Zig library as well as a standalone application to train a model and chat with it.<p>This was mainly an educational project. I'm sharing it here in case others find it interesting or useful.<p>Link to the project: <a href="https://github.com/CogitatorTech/zigformer" rel="nofollow">https://github.com/CogitatorTech/zigformer</a>