Skip to content

Commit 768f369

Browse files
committed
state transition should act on per gate loop head
1 parent 2ecea90 commit 768f369

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gateloop_transformer/gateloop_transformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def __init__(
200200
self.to_qkv = nn.Linear(dim, dim_inner * 3, bias = False)
201201

202202
self.to_a = nn.Sequential(
203-
nn.Linear(dim, dim_inner * 2),
204-
Rearrange('b n (h d c) -> (b h) n d c', h = heads, c = 2)
203+
nn.Linear(dim, heads * 2),
204+
Rearrange('b n (h c) -> (b h) n 1 c', h = heads, c = 2)
205205
)
206206

207207
self.merge_heads = Rearrange('(b h) n d -> b n (h d)', h = heads)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'gateloop-transformer',
55
packages = find_packages(exclude=[]),
6-
version = '0.0.15',
6+
version = '0.0.16',
77
license='MIT',
88
description = 'GateLoop Transformer',
99
author = 'Phil Wang',

0 commit comments

Comments
 (0)