Skip to content

Commit

Permalink
fix value residual
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 31, 2024
1 parent 9917a88 commit d88537d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'x-transformers',
packages = find_packages(exclude=['examples']),
version = '1.42.2',
version = '1.42.3',
license='MIT',
description = 'X-Transformers - Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion x_transformers/x_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ def forward(
diff_values = repeat(diff_values, 'b h n d -> b (r h) n d', r = h // kv_h)
else:
# https://arxiv.org/abs/2410.17897v1
v = v + value_residual
v = 0.5 * (v + value_residual)

# attention is all we need

Expand Down

0 comments on commit d88537d

Please sign in to comment.