swift 微调minicpm-v-v2_5-chat 使用 ModelScope自定义数据集报错,怎么解决? 显存溢出 torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 640.00 MiB. GPU 0 has a total capacty of 47.50 GiB of which 36.56 MiB is free. Process 643962 has 47.46 GiB memory in use. Of the allocated memory 46.18 GiB is allocated by PyTorch, and 958.07 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF 微调 公开数据集是正常的
您参考这个脚本,参考以下链接 https://github.com/modelscope/swift/blob/main/examples/pytorch/llm/scripts/minicpm_2b_sft_chat/lora_ddp/sft.sh 此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352