从零开始在8GB显存上训练LLM。我开心

Reddit r/LocalLLaMA 工具

摘要

构建了一个仓库,用于在8GB显存上从零训练一个微型语言模型(25M参数),支持MTP,但指出mHC和BitNet的局限性。

我昨天发了个帖子:[https://www.reddit.com/r/LocalLLaMA/comments/1tqjuzg/why\_is\_there\_no\_community\_project\_for\_training/](https://www.reddit.com/r/LocalLLaMA/comments/1tqjuzg/why_is_there_no_community_project_for_training/) 我今天写了个程序:[https://github.com/epoyraz/train-a-model-from-scratch](https://github.com/epoyraz/train-a-model-from-scratch) 亮点:\- 用8GB显存从零训练tinystories。耶 \- mHC不好(模型太小) \- BitNet太慢(训练时没有内存增益) \- TurboQuant(不需要) \- MTP可行。耶耶耶(但让训练变慢) 嗯……这不是LLM,是个25M的小模型:[https://huggingface.co/epoyraz/tinystories-25m](https://huggingface.co/epoyraz/tinystories-25m)
查看原文

相似文章

rasbt/LLMs-from-scratch

GitHub Trending (daily)

该仓库提供开源代码,用于从零开始构建、预训练和微调一个类似GPT的大型语言模型,是Sebastian Raschka同名书籍的官方代码配套。