x-transformers 1.32.15__py3-none-any.whl → 1.34.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- x_transformers/x_transformers.py +3 -3
- {x_transformers-1.32.15.dist-info → x_transformers-1.34.0.dist-info}/METADATA +1 -1
- {x_transformers-1.32.15.dist-info → x_transformers-1.34.0.dist-info}/RECORD +6 -6
- {x_transformers-1.32.15.dist-info → x_transformers-1.34.0.dist-info}/WHEEL +1 -1
- {x_transformers-1.32.15.dist-info → x_transformers-1.34.0.dist-info}/LICENSE +0 -0
- {x_transformers-1.32.15.dist-info → x_transformers-1.34.0.dist-info}/top_level.txt +0 -0
x_transformers/x_transformers.py
CHANGED
@@ -8,7 +8,7 @@ import torch
|
|
8
8
|
import torch.nn.functional as F
|
9
9
|
from torch import nn, einsum, Tensor
|
10
10
|
from torch.nn import Module, ModuleList, ModuleDict
|
11
|
-
from torch.
|
11
|
+
from torch.amp import autocast
|
12
12
|
|
13
13
|
from functools import partial, wraps
|
14
14
|
from collections import namedtuple
|
@@ -521,7 +521,7 @@ class RotaryEmbedding(Module):
|
|
521
521
|
t = torch.arange(seq_len, device = device)
|
522
522
|
return self.forward(t)
|
523
523
|
|
524
|
-
@autocast(enabled = False)
|
524
|
+
@autocast('cuda', enabled = False)
|
525
525
|
def forward(self, t):
|
526
526
|
max_pos = t.max() + 1
|
527
527
|
|
@@ -545,7 +545,7 @@ def rotate_half(x):
|
|
545
545
|
x = torch.stack((-x2, x1), dim = -1)
|
546
546
|
return rearrange(x, '... d r -> ... (d r)')
|
547
547
|
|
548
|
-
@autocast(enabled = False)
|
548
|
+
@autocast('cuda', enabled = False)
|
549
549
|
def apply_rotary_pos_emb(t, freqs, scale = 1):
|
550
550
|
rot_dim, seq_len, orig_dtype = freqs.shape[-1], t.shape[-2], t.dtype
|
551
551
|
|
@@ -5,11 +5,11 @@ x_transformers/continuous.py,sha256=cIVEdhfei258__ziV7kQBrJMxCel54bExBTDrO9rfCI,
|
|
5
5
|
x_transformers/dpo.py,sha256=LjvWgCkqTl-UuehrzQ8nkX5guLr4whYwsmm7SKSwdls,3450
|
6
6
|
x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg,9252
|
7
7
|
x_transformers/nonautoregressive_wrapper.py,sha256=ys_p8obc7lTeeodCqvkRKxOXQ1C9T3j5Jwr-JbVgnXk,10432
|
8
|
-
x_transformers/x_transformers.py,sha256=
|
8
|
+
x_transformers/x_transformers.py,sha256=hs9j-lHukVGYLlpbBhn4CZhSzI7s0x6bYtEhCc33ftE,78680
|
9
9
|
x_transformers/xl_autoregressive_wrapper.py,sha256=DCx4n0_c1tFai4nOqaWVnqx2p9eutsZsDMiMP1ckxNU,4117
|
10
10
|
x_transformers/xval.py,sha256=QE1ltYZTR_eGgIHPP2BrMWVWVLqMW-OpDZh87BSmQEg,8563
|
11
|
-
x_transformers-1.
|
12
|
-
x_transformers-1.
|
13
|
-
x_transformers-1.
|
14
|
-
x_transformers-1.
|
15
|
-
x_transformers-1.
|
11
|
+
x_transformers-1.34.0.dist-info/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
12
|
+
x_transformers-1.34.0.dist-info/METADATA,sha256=aTRBJepYjojT5TFi8W2oK4j7daQGRQaWwj2HHnnwDCQ,661
|
13
|
+
x_transformers-1.34.0.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
14
|
+
x_transformers-1.34.0.dist-info/top_level.txt,sha256=hO6KGpFuGucRNEtRfme4A_rGcM53AKwGP7RVlRIxS5Q,15
|
15
|
+
x_transformers-1.34.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|