minimind icon indicating copy to clipboard operation
minimind copied to clipboard

🚀🚀 「大模型」2小时完全从0训练26M的小参数GPT!🌏 Train a 26M-parameter GPT from scratch in just 2h!

Results 74 minimind issues
Sort by recently updated
recently updated
newest added

作者大大,感谢开源。对于以下第一行所示的流程: ![Image](https://github.com/user-attachments/assets/841c6165-d4af-42d2-b0e5-76ed63eda171) 这里有个疑问。首先定位到 `train_full_sft.py` 脚本: ```bash ... def init_model(lm_config): tokenizer = AutoTokenizer.from_pretrained('./model/minimind_tokenizer') model = MiniMindLM(lm_config) moe_path = '_moe' if lm_config.use_moe else '' ckp = f'./out/pretrain_{lm_config.dim}{moe_path}.pth' state_dict = torch.load(ckp, map_location=args.device) model.load_state_dict(state_dict,...

@jingyaogong 大佬新年好呀! 我是一个纯小白,一直在找一个教程,看完您的这个,感觉找到了!这详细程度无敌了,感谢您的付出。 我现在遇到一个问题: 您已经提供了修改模型配置的地方:./model/LMConfig.py 我就是个纯小白,也确实能找到您提供的这些文件,但是我该修改哪些参数才能换到我想换的模型呢,希望大佬能指条明路。 还有一个小问题,比如我想加一些可以回答我自定义的问题,比如: Q:世界上谁最帅? A:当然是@jingyaogong 类似于这种的问题对,或者一段描述文本,我怎么做会完成这个目的呢? 感谢大佬的付出

![Image](https://github.com/user-attachments/assets/c0fe1b8e-2397-461f-8c75-82c764ed0ec0)

What to do if I'd like to extend the model's ability to English or other languages? Thanks

想把MiniMind和DeepSeek结合使用,不知道如何实现,有没有详细操作流程,求大佬赐教

我之前参考过您的项目作为deepseekmini的复现基础 值得肯定的是小参数的语言模型确实由于数据量的问题可能很难学习推理能力 但是如何确定最小推理学习参数边界是我所打算探讨的事情 huggingface项目slm指出即使超过最佳的数据与模型参数配比,模型的性能仍然在提升 换句话说,现在的模型普遍处于参数稀疏的性价比边界。 您的项目中预训练的数据过少,而sft的数据过多,对于教学或者达到一个比较好的聊天交流体验来说,确实很适合。 但是也是由于这样的原因,像这样的模型更难实现极小参数最大性能的配比,也更难走上强化学习的方向。 目前的最小验证比是1.5b模型参数同样可以学习推理能力,参考[DeepScaleR-1.5B-Preview](https://huggingface.co/agentica-org/DeepScaleR-1.5B-Preview)。 我目前正在做这方面的实验,但是就一些发现来说,在一些消融实验上qwen0.5b指令模型注重于刷榜而损失了性能,这也是qwen系列的通病,这可能是大多数人实验失败的原因,即使是qwen基座模型同样备受质疑。 如果想要实现一个极小参数的r1zero,不妨直接提高预训练语料比例,长退火之后直接rl吧。

The checkpoint path and tokenizer path should be passed outside, not hard code.

Currently, the `ckp_dir` and `tokenizer path` is hard coded in `train_full_sft.py`. I made an update so both of them can be passed from outside.

您好,我使用最简单的方式进行训练,使用pretrain_hq.jsonl + sft_mini_512.jsonl。在执行`python train_full_sft.py`出现这个问题,请问这怎么回事? ![Image](https://github.com/user-attachments/assets/e9566a0d-743c-4dc5-9b4f-1da86d4c8b16) ![Image](https://github.com/user-attachments/assets/359500ca-de7d-4c6c-bd81-d12609f690b0)