New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在测评的时候显存总是有空闲,如何全部利用显存呢,单机 8*80G的 A800 #1017
Comments
我也是有同样的问题,有的模型可以把显存吃满,比如我用Qwen14b-chat就可以把8*A800差不多吃满,但是有的模型,比如autoj-bilingual-6b,我的八卡每张卡的占用率还不到10%,我怀疑这个是跟模型有关 另外,感觉开启VLLM会让占用率变高推理速度变快,如果是使用HuggingFaceCausalLM占用率和速度都会低一些 |
Please check the
|
实际上原理就是每一个GPU都是加载了一个模型的实例进去推理,所以占用的显存不高。若 batch_size>1,需要同时设置 batch_padding=True,否则实际仍然是按照单 batch 来进行推理的。另外我们测试下来会发现 batch_padding=True 时由于 positional encoding 错位等原因,评测精度会下降,因此建议不要走 batch。 |
增加 --max-workers-per-gpu 参数即可,这样子一张卡将会有多个worker实例 |
你们评估mmlu 需要多久,我跑llama 13b,batch=1测 mmlu_gen 半天不动:
|
没测过mmlu,我这边测试,cmmlu+ceval,Internlm-7b,h800*2情况下大概半个小时 |
Prerequisite
Type
I'm evaluating with the officially supported tasks/models/datasets.
Environment
在用零一万物 34B进行 ceval测评的时候,显存只用了到了20%左右,调整哪个参数可以100%使用显存呢
Reproduces the problem - code/configuration sample
调整了batch_size也没有用
Reproduces the problem - command or script
调整了batch_size也没有用
Reproduces the problem - error message
调整了batch_size也没有用
Other information
调整了batch_size也没有用
The text was updated successfully, but these errors were encountered: