xformers icon indicating copy to clipboard operation
xformers copied to clipboard

Support backward for RMSNorm

Open samsja opened this issue 6 months ago • 2 comments

Support Backward in RMSNorm

hello,

It seems that we can't use RMSNorm with a backward pass (see code here )

I was wondering if you plan to support it in the future, or if you knew any workaround to have a fast implementation of RMSNorm.

Thanks in advance

samsja avatar Jan 04 '24 16:01 samsja

Hi, This is a fairly old code that we won't improve moving forward (and it will most likely become deprecated). I would encourage you to try using torch compile for that particular code, and it should be fast + generate a correct backward pass

danthe3rd avatar Jan 24 '24 12:01 danthe3rd

Hi, This is a fairly old code that we won't improve moving forward (and it will most likely become deprecated). I would encourage you to try using torch compile for that particular code, and it should be fast + generate a correct backward pass

I indeed ended using torch compile for this. Thanks for the update

samsja avatar Jan 24 '24 12:01 samsja