HarderThenHarder / transformers_tasks

⭐️ NLP Algorithms with transformers lib. Supporting Text-Classification, Text-Generation, Information-Extraction, Text-Matching, RLHF, SFT etc.

Home Page:https://www.zhihu.com/column/c_1451236880973426688

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问大模型微调需要多少显存?

Crayon-s7 opened this issue · comments

commented

这取决于您的 max_soruce_lengthmax_target_length 的设置。
在我的实验中,整个训练句子(source + target)加起来 800 个 token 下需要大约 31 G 左右的显存(V100)。

请问一下,如果有两片16G(T4)的卡,要怎么跑这个实验呢?用MUlti_gpu的方法试了一下,都是爆显存错误。

请问一下,如果有两片16G(T4)的卡,要怎么跑这个实验呢?用MUlti_gpu的方法试了一下,都是爆显存错误。

@HarderThenHarder 相同的显卡,len调到200两张卡都爆,同问