Skip to content

Commit

Permalink
fix bug with xpos, thanks to @andersonbcdefg
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed May 5, 2023
1 parent 22cac59 commit 2605ece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rotary_embedding_torch/rotary_embedding_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_scale(self, t, cache_key = None):

scale = 1.
if self.use_xpos:
power = t - (len(t) // 2) / self.scale_base
power = (t - len(t) // 2) / self.scale_base
scale = self.scale ** rearrange(power, 'n -> n 1')
scale = torch.cat((scale, scale), dim = -1)

Expand Down
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 = 'rotary-embedding-torch',
packages = find_packages(),
version = '0.2.2',
version = '0.2.3',
license='MIT',
description = 'Rotary Embedding - Pytorch',
long_description_content_type = 'text/markdown',
Expand Down

0 comments on commit 2605ece

Please sign in to comment.