ChatGLM-6B
ChatGLM-6B copied to clipboard
[BUG/Help] 显存占用感觉比10b的大
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
在一张80g显存的卡上训练,之前训练10b的glm模型可以开到batchsize4,这个模型开到2就很容易爆显存。有用amp,不知道什么原因。 直接用huggingface的代码没办法做模型并行,不知道有什么好的办法
Expected Behavior
No response
Steps To Reproduce
none
Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :
Anything else?
No response
同,想用huggingface仓库代码微调,但是奈何模型太大,没法微调
同感觉,大家有找到原因吗
一个可能的原因是 官方给的模型文件 不适配 trainer的模型并行,具体怎么改可以参考https://github.com/yuanzhoulvpi2017/zero_nlp/blob/main/simple_thu_chatglm6b/thuglm/modeling_chatglm.py 我这里可以work 了