安装验证分为三个关键步骤:
- 基础环境检查::
- 确认Python≥3.10并安装git
- (of a computer) run
import torch; print(torch.cuda.is_available())
验证CUDA支持
- Project deployment::
- pass (a bill or inspection etc)
git clone https://github.com/jingyaogong/minimind.git
Get source code - 使用清华源加速安装依赖:
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
- pass (a bill or inspection etc)
- Functional verification::
- 下载1.6GB的
pretrain_hq.jsonl
数据集到./dataset - (of a computer) run
python eval_model.py --load 1
测试基础推理能力
- 下载1.6GB的
遇到flash_attn
安装失败时,可暂时注释相关代码进行测试运行。
This answer comes from the articleMiniMind: 2 hours from scratch training 26M parameters GPT open source toolsThe