You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fuse some popular functions and automatically replace modules in an existing 🤗 transformers model with their corresponding fusion module
APIs
from pipegoose.nn import fusion
# and other parallelism ...
model = TensorParallel(model, parallel_context).parallelize()
model.fuse()
# or selective kernel fusion
model.fuse([fusion.LayerNorm, fusion.Attention])
@sami-bg Check out torch.fx. We could use it to detect modules in a transformers model that can be fused and replace them with the fused version: model.transformers.blocks[0].dropout = fused_dropout
Fuse some popular functions and automatically replace modules in an existing 🤗 transformers model with their corresponding fusion module
APIs
TODOs
Reading (could be ignored)
The text was updated successfully, but these errors were encountered: