Oneflow-Inc / libai

LiBai(李白): A Toolbox for Large-Scale Distributed Parallel Training
https://libai.readthedocs.io
Apache License 2.0
391 stars 55 forks source link

use fuse multi head att #411

Closed xiezipeng-ML closed 2 years ago

xiezipeng-ML commented 2 years ago

测试Fuse_Multi_Head_Attention的性能增益

oneflow分支:python3 -m pip install --pre oneflow -f https://staging.oneflow.info/branch/release/mt5_opt/cu112

对应的oneflow commit:2d080aa

libai分支:use_fuse_multi_head_att

projects/T5/configs/t5_model_config.py中测量model.cfg.scale_mask_softmax_fusion = Falsemodel.cfg.scale_mask_softmax_fusion = True上的吞吐区别

@ouyangyu @chengtbf