x-transformers 2.7.3__py3-none-any.whl → 2.7.4__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 +5 -3
- {x_transformers-2.7.3.dist-info → x_transformers-2.7.4.dist-info}/METADATA +1 -1
- {x_transformers-2.7.3.dist-info → x_transformers-2.7.4.dist-info}/RECORD +5 -5
- {x_transformers-2.7.3.dist-info → x_transformers-2.7.4.dist-info}/WHEEL +0 -0
- {x_transformers-2.7.3.dist-info → x_transformers-2.7.4.dist-info}/licenses/LICENSE +0 -0
x_transformers/x_transformers.py
CHANGED
@@ -1637,10 +1637,12 @@ class Attention(Module):
|
|
1637
1637
|
q_weight = self.to_q.weight
|
1638
1638
|
k_weight = self.to_k.weight
|
1639
1639
|
|
1640
|
-
|
1640
|
+
qk_dim, heads = q_weight.shape[0], qk_weight_scale.numel()
|
1641
1641
|
|
1642
|
-
|
1643
|
-
|
1642
|
+
qk_weight_scale = repeat(qk_weight_scale, 'h -> (h expand)', expand = qk_dim // heads)
|
1643
|
+
|
1644
|
+
q_weight.mul_(qk_weight_scale)
|
1645
|
+
k_weight.mul_(qk_weight_scale)
|
1644
1646
|
|
1645
1647
|
def forward(
|
1646
1648
|
self,
|
@@ -9,10 +9,10 @@ x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg
|
|
9
9
|
x_transformers/neo_mlp.py,sha256=XCNnnop9WLarcxap1kGuYc1x8GHvwkZiDRnXOxSl3Po,3452
|
10
10
|
x_transformers/nonautoregressive_wrapper.py,sha256=hMQqNimGtchNIe13cR5LZule1V7I1qM5LmY8VQfVdnA,11698
|
11
11
|
x_transformers/up_wrapper.py,sha256=YC2LN14_7Xx9Wtiek2rtEJ_qHqdfSmKlh3d7Cgxwd80,7073
|
12
|
-
x_transformers/x_transformers.py,sha256=
|
12
|
+
x_transformers/x_transformers.py,sha256=JeQ0ZnyobuPekWNVRaH0IJTKCezSERzjCDWhyRaQLAY,123938
|
13
13
|
x_transformers/xl_autoregressive_wrapper.py,sha256=CvZMJ6A6PA-Y_bQAhnORwjJBSl6Vjq2IdW5KTdk8NI8,4195
|
14
14
|
x_transformers/xval.py,sha256=AwwYUm8yDAtKQyKJDIhYMsiLTJ_skh3scUFMjp5sda8,8597
|
15
|
-
x_transformers-2.7.
|
16
|
-
x_transformers-2.7.
|
17
|
-
x_transformers-2.7.
|
18
|
-
x_transformers-2.7.
|
15
|
+
x_transformers-2.7.4.dist-info/METADATA,sha256=yCglZIW-B3BhZebrDiJPu1zaHdNM_5lkyt8ePNGiADU,93739
|
16
|
+
x_transformers-2.7.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
x_transformers-2.7.4.dist-info/licenses/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
18
|
+
x_transformers-2.7.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|