x-transformers 1.27.4__py3-none-any.whl → 1.27.6__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 +4 -1
- {x_transformers-1.27.4.dist-info → x_transformers-1.27.6.dist-info}/METADATA +1 -1
- {x_transformers-1.27.4.dist-info → x_transformers-1.27.6.dist-info}/RECORD +6 -6
- {x_transformers-1.27.4.dist-info → x_transformers-1.27.6.dist-info}/LICENSE +0 -0
- {x_transformers-1.27.4.dist-info → x_transformers-1.27.6.dist-info}/WHEEL +0 -0
- {x_transformers-1.27.4.dist-info → x_transformers-1.27.6.dist-info}/top_level.txt +0 -0
x_transformers/x_transformers.py
CHANGED
@@ -435,7 +435,7 @@ class RotaryEmbedding(nn.Module):
|
|
435
435
|
|
436
436
|
@autocast(enabled = False)
|
437
437
|
def forward(self, t):
|
438
|
-
device = self.inv_freq.device
|
438
|
+
device, seq_len = self.inv_freq.device, t.shape[-1]
|
439
439
|
|
440
440
|
t = t.type_as(self.inv_freq)
|
441
441
|
|
@@ -1329,6 +1329,9 @@ class AttentionLayers(nn.Module):
|
|
1329
1329
|
if exists(pre_norm):
|
1330
1330
|
x = pre_norm(x)
|
1331
1331
|
|
1332
|
+
if exists(layer_mem):
|
1333
|
+
layer_mem = pre_norm(layer_mem)
|
1334
|
+
|
1332
1335
|
if layer_type == 'a':
|
1333
1336
|
out, inter = block(x, mask = mask, context_mask = self_attn_kv_mask, attn_mask = attn_mask, rel_pos = self.rel_pos, rotary_pos_emb = rotary_pos_emb, prev_attn = prev_attn, cache = next(iter_attn_cache, None), mem = layer_mem, mem_mask = layer_mem_mask, return_intermediates = True)
|
1334
1337
|
elif layer_type == 'c':
|
@@ -3,11 +3,11 @@ x_transformers/attend.py,sha256=MFl_FbgPsm9mziZPTi_s8QbxASETwbGeciMH8sUIwT8,1018
|
|
3
3
|
x_transformers/autoregressive_wrapper.py,sha256=gYKIN5Rm8dMYSTX5yHpg9sPYyZf9rsRTJCNrYRdJ-Ww,9618
|
4
4
|
x_transformers/continuous.py,sha256=SAZGR-3BgXU7OEQtjg1_9FnrUBpIyVfXfpMrH-oL5rU,6074
|
5
5
|
x_transformers/nonautoregressive_wrapper.py,sha256=AQLE4rA_Kh8VNoe9OzpwyeWson34sRkhks4dn4seNjI,10414
|
6
|
-
x_transformers/x_transformers.py,sha256=
|
6
|
+
x_transformers/x_transformers.py,sha256=8nBe_MQLfQDHf59pM_c2IiTVHA9frFbFyg4n8S00ZVI,63402
|
7
7
|
x_transformers/xl_autoregressive_wrapper.py,sha256=DCx4n0_c1tFai4nOqaWVnqx2p9eutsZsDMiMP1ckxNU,4117
|
8
8
|
x_transformers/xval.py,sha256=ulEPep6i5Hl7H-H9vGfdsmHdprUmK8ajB306jViyV2c,8147
|
9
|
-
x_transformers-1.27.
|
10
|
-
x_transformers-1.27.
|
11
|
-
x_transformers-1.27.
|
12
|
-
x_transformers-1.27.
|
13
|
-
x_transformers-1.27.
|
9
|
+
x_transformers-1.27.6.dist-info/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
10
|
+
x_transformers-1.27.6.dist-info/METADATA,sha256=32gbNOf9pJgUoNTdaplhW1mcB4ECiJo5OTCpIVNFWCA,661
|
11
|
+
x_transformers-1.27.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
12
|
+
x_transformers-1.27.6.dist-info/top_level.txt,sha256=hO6KGpFuGucRNEtRfme4A_rGcM53AKwGP7RVlRIxS5Q,15
|
13
|
+
x_transformers-1.27.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|