lhtpluto

Results 39 comments of lhtpluto

Epoch: 0, Step: 19, Val loss: 1.11943359375, Val acc: 0.7218769788742065 ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/ai/MOSS/finetune_moss.py:324 in │ │ │ │ 321 │ os.makedirs(args.output_dir, exist_ok=True) │ │...

> [finetune_moss - 副本.txt](https://github.com/OpenLMLab/MOSS/files/11766790/finetune_moss.-.txt) 万分感谢 测试可用,而且能直接生成: config.json generation_config.json pytorch_model.bin.index.json pytorch_model-00001-of-00004.bin pytorch_model-00002-of-00004.bin pytorch_model-00003-of-00004.bin pytorch_model-00004-of-00004.bin

> [finetune_moss - 副本.txt](https://github.com/OpenLMLab/MOSS/files/11766790/finetune_moss.-.txt) 求指点,明明train.jsonl中只有20条数据,val.jsonl中也只有20条数据,使用[finetune_moss - 副本.txt](https://github.com/OpenLMLab/MOSS/files/11766790/finetune_moss.-.txt)后,Load data successfully, total 1000 training samples 晕了 ,训练量一下子增加了50倍 目前我的临时解决办法是,用原有finetune_moss.py 标记数据,然后用您的[finetune_moss - 副本.txt](https://github.com/OpenLMLab/MOSS/files/11766790/finetune_moss.-.txt)再训练数据,这种情况训练量是正常的。

> ![1686905626110](https://user-images.githubusercontent.com/15343318/246368493-d4a73f46-e43c-4ab4-a625-2cf38e874899.png) 测试用的,忘了删 Time to load fused_adam op: 0.1592857837677002 seconds /root/anaconda3/envs/moss/lib/python3.8/site-packages/deepspeed/ops/adam/fused_adam.py:96: UserWarning: The torch.cuda.*DtypeTensor constructors are no longer recommended. It's best to use methods such as torch.tensor(data, dtype=*, device='cuda') to...

> 这里你直接改成原有finetune_moss.py 的代码就行了,不要那个for,直接append。用点子智慧咂 出错原因是没有删除上次的train_data文件 删除后恢复正常 万分感谢您的帮助

纯GPU微调,4张V100肯定不够用,显存不足 如在DeepSpeed里offload到CPU,可以;我用这个办法在一张48GB显存的机器上fp32\fp16微调成功,大约需要机器有额外300GB内存,int4微调我没试验过;

> 对GPU有什么要求,8张3090的可以进行微调? 显存不足,参考https://github.com/OpenLMLab/MOSS/issues/189 可以把DeepSpeed Offload到CPU上,这样你需要至少额外290GB的内存

> deepspeed_config: zero_stage: 3 moss的配置是deepspeed stage3 模型是分开加载到跟个模型,我使用1batch_size,8卡的瞬时基本每张卡都到70G显存以上了,官网没有开源,我改好,目前int8可以finetune 大神,是指int8 的finetune 需要80GB*8的显存吗? 不知道48GB*8的显存能否finetune?

硬件环境:RTX 6000 ADA (48GB) *1 内存:512GB 模型:moss-moon-003-base 同样问题

修改 sft.yaml,deepspeed_config:   gradient_accumulation_steps: 1   gradient_clipping: 1.0   offload_optimizer_device: cpu   offload_param_device: cpu   zero3_init_flag: true   zero3_save_16bit_model: true   zero_stage: 3 把deepspeed offload到CPU上 问题解决 硬件环境:RTX 6000 ADA (48GB) *1 内存:512GB 模型:moss-moon-003-base 正在微调中