Skip to content

Commit

Permalink
fix for t5
Browse files Browse the repository at this point in the history
  • Loading branch information
plutonium-239 committed May 15, 2024
1 parent 5923c23 commit de68424
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions memsave_torch/nn/LayerNorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def from_existing(cls, ln):
Returns:
obj: The MemSaveRMSLayerNorm object
"""
if ln.variance_epsilon is not None: # T5LayerNorm
ln.eps = ln.variance_epsilon
obj = cls(
ln.weight.shape,
ln.eps,
Expand Down

0 comments on commit de68424

Please sign in to comment.