Skip to content

Commit 91fbae0

Browse files
committed
dep torch 2.1+
1 parent c21603c commit 91fbae0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gateloop_transformer/simplified_gate_loop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def abs_clamp_eps(t, eps = 1e-20):
2525
# https://github.com/glassroom/heinsen_sequence
2626
# graciously shared to the world by Franz A. Heinsen in https://arxiv.org/abs/2311.06281 in October 2023
2727

28-
def heinsen_associative_scan(a, kv):
29-
log_a = a.clamp(min = 1e-20).log()
30-
log_kv = abs_clamp_eps(kv).to(dtype = torch.complex64).log()
28+
def heinsen_associative_scan(a, kv, eps = 1e-20):
29+
log_a = a.clamp(min = eps).log()
30+
log_kv = abs_clamp_eps(kv, eps = eps).to(dtype = torch.complex64).log()
3131

3232
a_star = torch.cumsum(log_a, dim = 1)
3333
log_x0_plus_b_star = torch.logcumsumexp(log_kv - a_star, dim = 1)

setup.py

Lines changed: 2 additions & 2 deletions
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.2.1',
6+
version = '0.2.2',
77
license='MIT',
88
description = 'GateLoop Transformer',
99
author = 'Phil Wang',
@@ -18,7 +18,7 @@
1818
install_requires=[
1919
'einops>=0.7.0',
2020
'rotary-embedding-torch',
21-
'torch>=2.0',
21+
'torch>=2.1',
2222
],
2323
classifiers=[
2424
'Development Status :: 4 - Beta',

0 commit comments

Comments
 (0)