1|$3d4cf`8Ja
zOOE<*<(9nM)jcBUzYk;agRrm5Op&-^`CdJ#T<@x?iW*R0=+39}yuXDFd%=g&OXTHmQOyE8jdXmPwf%VH_c1(9@T-+FM<+%899N!Og
z!qa5LQ1CDo{Blt<%+J~&%5pRK2l+2`ZIZnIU-zwQzUqLrFB+<-rN9VMmWMTDtue2O
zn*f$p?gz7dTVHg6pyfTd#DC5fVbo-#ia!l#c1<%hg3JeoD=8!$qlk9864#KXMKDB$_zbHik#vlLp&A76EP_SSF>-h=Akl?nx(J5g5P!lnf5R;uBZub#
z5?x59_$BGDL;$hMp3{L;M=FQLtr}5H|ZH
zCP}&kM~(?0T|VuXu2sZOn+J&Ik)pJ1f}`aG(tM$aUVjlhWhRh}c(=}W!P9O+3H{gM
zY!^IrCzP;!p$SXY-G76hZbvank}knkh}ywSJoT$fuw|rB=9cJjnl8bUn*wR6m-u8C
zTrnz;G7Vm6%Dql~5GF=CpMoiUyI^WsfsBg`mLwd4rzZtc&PTUO-!8biSUBaIIz;-W
z7Km;ZPHh}-DnnkuQ`rK^L+ul@aT-o21sPRBH%!_gcv4*`Wq+V4WVVBY{ujo$h<{1K
zA(&!cAm?&yr6e2zQUU{+o%88r&@K3?VQ>oTIdqct39h;rO1+$0Cn=BMDv+VH%kfc?
z@(8X*8AuzhW_BgF@B`ci9^jVu01xtLDC76QRrU_Sl|n;FmxIM5;J7WKg
z#skYx*5%AHNq@QoPk0Tbz0&P+Zx?J`HjvX0bCaY?Aj)khxpnlE40#1l=M5yEk6)6$
zU2s+4FiJxxK~f&UmWgBYdfIZ5bcv{<9Gh{GpOcnJM8)R#46`zwv`m64K*uL?MC&Bw
z5e%I=gmM0)Mmk2p5V3=J?kJu+2G5|0hcGRIc+xY+*ne7psP#D7DEtM%zxV`^c~|EQ
zS}qrH_^b>#1t6&h^S9K}ne7xz?LC0oI+tD&4#5!U7r%WCmAd7O2aN
zSD6`Hn^~YbGiH4@aD_I38f|!0+TeBCgetXR)@p-SYZI#1hF7t0y#}h4SF3oXhU%1A
zrFe~oDwI>7(;i?pow4y(x>gYva|DQHDM@MD1btRyw1}vH
zB^!T{&Xkr(FeNe}9`Y`&4#Abs
z;l%gfz%%%P`Fq~%y{9~jvRbmUGUyhN$SgYxQk_-?-2zmiMe}e)Y~@A)!Pl)t(|<73
zZYAv#OnFM;9euw09-t5p1Ddn3vd}
zWV*y20bVo-QovWnN(n%>7tP3&`;`HwU<&;5xkGy{xw|bV-C#c7A{s0mqu?k614Pso
zL)IQnZ1*O$ZqHi@AHEnTaKia!H9UZWlVmVXrMQc-;=
zMkfk-`4I0O#;XV0%}ws(=Ir2}wW$H3MLtTpRuLDX<`XTl)zY>JzBn~N=1N*i+9y~l
z)_h)5_F8)87#r}u@Fq2*TkRLgY&M6fmn}WBi0WChnHD*1X_*9~m<^G+O4~Bzjipcm
zw53N?M&U0A{>3MVyeU>4Z+|w8CE_i8yWmN7^9ciAS}?z{&^q9Js>~zFqVPF_pZf%P
zl;MgnTz!VC0Mx8#
z&Zby}%%yD;aiMWG$trR#ZJS`KnPW`Us>$jQ?1OhXtn_KUl5`2+aDQG7cj!!C8E^{z
zDZV(peeJ%FNnYU0MToZGa{jS{^p7CxAA)^s@D5&c;N`gl^LSy9_k*=+=Qsp%bT3G3
zpC~LtUICvTyf=^a=wZ28MDULs22(K)DwecQ@J=TNiRbf-rEeGflZ!c|f%A?f?GwBc
zjzMDU&1>5Qa`rJuYk!}aEJI#lo|;Th7-wX?Gmpk{P9?U3oHL2#`~GkFMgJ|rM+H+j
zfdhrf!-Ll&bP1$oL%u#%*E*AyC~O>7>mF6R9ED1RO-HMG2dgq9k4UtLLXtEsf+@?z
zC$g2iq-zx%p*ud?&(2r8i%D>l?l7J^pXV;dGb`J%iA;GsX@A=UQ}7NZb1rPL3a08E
zO!$^0d>bQNCGOaSwpN~Wts<^(%;#FvkfmV|OcgqS#uBcRu2t|A==hwTZk;3?f~i5r
zr?qA4q-zx%{X&3kRV|a2NyJ5}`7Dd1wKNPdhEdlvsp$=uj3}GYZ~)B5t~!oqhqwEZ
zFaU!27-e{=oqsM_o;Iq4Q**RAwJ9g}^7*@gR!Y{Qi0y;W5kgXGFS_L-#I`a4HqM
z1T(27u$sdOBa>*%g`I7bTqTdYf1+kEm5AwQrc)*9@texdmu^QoMlhL<;pe5Zw_-Nx
z1gefQDfFJuomp7XR4!HlUPg7&^g*3!@O0KtDwoyEOMhh8EwlHRVg^&mn0{V5U6W*Z
zgE~Y}2@DQ^IeEy{@rHXtfdun%$^mIY9Z@GRm`=P?I+gB6;`^G~IgmZNeGV$pe1=(sS{jB3!#y;Zy>|z*_wm8(z545_f1yZkc#W~y
z7ITaIR
zMw#h2i(DHZ)?+_BZK~(J
zm*0?cG})W7Gz8T5r|1Z%%aB*>R!qMoIa_vJhP-0G%=!)4xnk`y=ob4F+Hc6sR1lY>
zOWY#oeoJPaEWF$(Aa;tu-;kiCCogHA*eM`?Lt2&wy`+8OCb{_=k|T8MYj6PEcSFC!mLE4?3}}ulK<6zi@&bf>FcrW68q~R
z!#sb6{6`z){ZQ_=t3FcDxJFlL*SN}8Kg`$Js-!tx?DC^+WVj#wpOUi@PGz|GPIdGg
zMuq6_sxv+BuZpU%I_
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.Dtype.html b/docs/build/html/python/_autosummary/mlx.core.Dtype.html
index 85913057b..0cc848de0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.Dtype.html
+++ b/docs/build/html/python/_autosummary/mlx.core.Dtype.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.Stream.html b/docs/build/html/python/_autosummary/mlx.core.Stream.html
index cf2a91e74..6d8626727 100644
--- a/docs/build/html/python/_autosummary/mlx.core.Stream.html
+++ b/docs/build/html/python/_autosummary/mlx.core.Stream.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.abs.html b/docs/build/html/python/_autosummary/mlx.core.abs.html
index 5121ef588..74c79e642 100644
--- a/docs/build/html/python/_autosummary/mlx.core.abs.html
+++ b/docs/build/html/python/_autosummary/mlx.core.abs.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.add.html b/docs/build/html/python/_autosummary/mlx.core.add.html
index d3fdd72c6..e326596c6 100644
--- a/docs/build/html/python/_autosummary/mlx.core.add.html
+++ b/docs/build/html/python/_autosummary/mlx.core.add.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.all.html b/docs/build/html/python/_autosummary/mlx.core.all.html
index 3e584be21..3e57cc985 100644
--- a/docs/build/html/python/_autosummary/mlx.core.all.html
+++ b/docs/build/html/python/_autosummary/mlx.core.all.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.allclose.html b/docs/build/html/python/_autosummary/mlx.core.allclose.html
index 5e8ab00b4..212c0e16a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.allclose.html
+++ b/docs/build/html/python/_autosummary/mlx.core.allclose.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.any.html b/docs/build/html/python/_autosummary/mlx.core.any.html
index 2bcd32878..f373911f3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.any.html
+++ b/docs/build/html/python/_autosummary/mlx.core.any.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arange.html b/docs/build/html/python/_autosummary/mlx.core.arange.html
index eabc10e9b..5965b43b8 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arange.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arange.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arccos.html b/docs/build/html/python/_autosummary/mlx.core.arccos.html
index 447f2888e..60c98280e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arccos.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arccos.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arccosh.html b/docs/build/html/python/_autosummary/mlx.core.arccosh.html
index a065186d7..f9f8bf403 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arccosh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arccosh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arcsin.html b/docs/build/html/python/_autosummary/mlx.core.arcsin.html
index f3ae323aa..8e680f7e3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arcsin.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arcsin.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arcsinh.html b/docs/build/html/python/_autosummary/mlx.core.arcsinh.html
index 012b8fa98..bbaccef09 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arcsinh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arcsinh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arctan.html b/docs/build/html/python/_autosummary/mlx.core.arctan.html
index 23dc4ad5f..9a676139a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arctan.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arctan.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.arctanh.html b/docs/build/html/python/_autosummary/mlx.core.arctanh.html
index e518bec32..2a6630d22 100644
--- a/docs/build/html/python/_autosummary/mlx.core.arctanh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.arctanh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.argmax.html b/docs/build/html/python/_autosummary/mlx.core.argmax.html
index fd7009150..31de4fb03 100644
--- a/docs/build/html/python/_autosummary/mlx.core.argmax.html
+++ b/docs/build/html/python/_autosummary/mlx.core.argmax.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.argmin.html b/docs/build/html/python/_autosummary/mlx.core.argmin.html
index 125c64741..4b91dcaca 100644
--- a/docs/build/html/python/_autosummary/mlx.core.argmin.html
+++ b/docs/build/html/python/_autosummary/mlx.core.argmin.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.argpartition.html b/docs/build/html/python/_autosummary/mlx.core.argpartition.html
index 82326572e..81ca6c684 100644
--- a/docs/build/html/python/_autosummary/mlx.core.argpartition.html
+++ b/docs/build/html/python/_autosummary/mlx.core.argpartition.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.argsort.html b/docs/build/html/python/_autosummary/mlx.core.argsort.html
index 47b08a278..f4d3516cc 100644
--- a/docs/build/html/python/_autosummary/mlx.core.argsort.html
+++ b/docs/build/html/python/_autosummary/mlx.core.argsort.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.T.html b/docs/build/html/python/_autosummary/mlx.core.array.T.html
index 5a1a13935..972f5e801 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.T.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.T.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.abs.html b/docs/build/html/python/_autosummary/mlx.core.array.abs.html
index 61e2463a3..68aa64f7a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.abs.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.abs.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.all.html b/docs/build/html/python/_autosummary/mlx.core.array.all.html
index 86f8efcb0..723f72e95 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.all.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.all.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.any.html b/docs/build/html/python/_autosummary/mlx.core.array.any.html
index 8376da1cf..e4ecd9fad 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.any.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.any.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.argmax.html b/docs/build/html/python/_autosummary/mlx.core.array.argmax.html
index ea3214466..f6e706a51 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.argmax.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.argmax.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.argmin.html b/docs/build/html/python/_autosummary/mlx.core.array.argmin.html
index 9a1c7b84b..70a286a84 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.argmin.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.argmin.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.astype.html b/docs/build/html/python/_autosummary/mlx.core.array.astype.html
index 9bfdb05aa..eba624700 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.astype.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.astype.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cos.html b/docs/build/html/python/_autosummary/mlx.core.array.cos.html
index 7549c9fda..d7eaf0743 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.cos.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.cos.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.dtype.html b/docs/build/html/python/_autosummary/mlx.core.array.dtype.html
index c4b565b08..7ba793db7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.dtype.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.dtype.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.exp.html b/docs/build/html/python/_autosummary/mlx.core.array.exp.html
index f821a644a..778ebdb23 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.exp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.exp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.html b/docs/build/html/python/_autosummary/mlx.core.array.html
index 8dcdbbd34..da661684e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.item.html b/docs/build/html/python/_autosummary/mlx.core.array.item.html
index 3af325ac1..748d185b1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.item.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.item.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log.html b/docs/build/html/python/_autosummary/mlx.core.array.log.html
index f8aae9b4c..e9df6ecd1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.log.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.log.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log1p.html b/docs/build/html/python/_autosummary/mlx.core.array.log1p.html
index d0bcf9fa6..5d819e450 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.log1p.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.log1p.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html b/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html
index 2a7f26665..549a98f14 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.max.html b/docs/build/html/python/_autosummary/mlx.core.array.max.html
index a8fd3a54c..e7b87ba8a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.max.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.max.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.mean.html b/docs/build/html/python/_autosummary/mlx.core.array.mean.html
index fc69b988f..24c077881 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.mean.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.mean.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.min.html b/docs/build/html/python/_autosummary/mlx.core.array.min.html
index e23cfc460..acc19676a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.min.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.min.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.ndim.html b/docs/build/html/python/_autosummary/mlx.core.array.ndim.html
index 463ecee20..ccebc0d16 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.ndim.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.ndim.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.prod.html b/docs/build/html/python/_autosummary/mlx.core.array.prod.html
index 2b9d1124d..a91e3b2a7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.prod.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.prod.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html b/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html
index 967d6c6be..ba798dc7d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.reshape.html b/docs/build/html/python/_autosummary/mlx.core.array.reshape.html
index c628f30dd..4afb9988f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.reshape.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.reshape.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.round.html b/docs/build/html/python/_autosummary/mlx.core.array.round.html
index cab3ba8d9..94b577ef5 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.round.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.round.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html b/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html
index 347be235a..d5cb9e55e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.shape.html b/docs/build/html/python/_autosummary/mlx.core.array.shape.html
index 8c4f4e163..468be7dff 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.shape.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.shape.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sin.html b/docs/build/html/python/_autosummary/mlx.core.array.sin.html
index a79e57362..85f98bbab 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.sin.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.sin.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.size.html b/docs/build/html/python/_autosummary/mlx.core.array.size.html
index 0e093aff9..6386cb783 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.size.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.size.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.split.html b/docs/build/html/python/_autosummary/mlx.core.array.split.html
index fdfde10b6..ee44323a8 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.split.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.split.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html b/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html
index 331da2932..a9518cca3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.square.html b/docs/build/html/python/_autosummary/mlx.core.array.square.html
index 303ac5a8f..085c21075 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.square.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.square.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sum.html b/docs/build/html/python/_autosummary/mlx.core.array.sum.html
index d49f779b4..e86e705d1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.sum.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.sum.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.tolist.html b/docs/build/html/python/_autosummary/mlx.core.array.tolist.html
index 934912b0a..8c88563c7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.tolist.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.tolist.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html
index 5c61586d1..d11c85ef7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array.var.html b/docs/build/html/python/_autosummary/mlx.core.array.var.html
index 34317f956..418385bcd 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array.var.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array.var.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.array_equal.html b/docs/build/html/python/_autosummary/mlx.core.array_equal.html
index bbaa255d0..355dcaa89 100644
--- a/docs/build/html/python/_autosummary/mlx.core.array_equal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.array_equal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html b/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html
index bb8175e32..d6a26bd29 100644
--- a/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html
+++ b/docs/build/html/python/_autosummary/mlx.core.broadcast_to.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.ceil.html b/docs/build/html/python/_autosummary/mlx.core.ceil.html
index 756eb1e9a..179485705 100644
--- a/docs/build/html/python/_autosummary/mlx.core.ceil.html
+++ b/docs/build/html/python/_autosummary/mlx.core.ceil.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.clip.html b/docs/build/html/python/_autosummary/mlx.core.clip.html
index 9b7a15afe..414fedd7a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.clip.html
+++ b/docs/build/html/python/_autosummary/mlx.core.clip.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.concatenate.html b/docs/build/html/python/_autosummary/mlx.core.concatenate.html
index 345ca5b05..6f8725be1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.concatenate.html
+++ b/docs/build/html/python/_autosummary/mlx.core.concatenate.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.conv1d.html b/docs/build/html/python/_autosummary/mlx.core.conv1d.html
index 96a489068..f71db1f6b 100644
--- a/docs/build/html/python/_autosummary/mlx.core.conv1d.html
+++ b/docs/build/html/python/_autosummary/mlx.core.conv1d.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.conv2d.html b/docs/build/html/python/_autosummary/mlx.core.conv2d.html
index 1bfc78471..d362843ef 100644
--- a/docs/build/html/python/_autosummary/mlx.core.conv2d.html
+++ b/docs/build/html/python/_autosummary/mlx.core.conv2d.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.convolve.html b/docs/build/html/python/_autosummary/mlx.core.convolve.html
index 197790b4f..03828b39d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.convolve.html
+++ b/docs/build/html/python/_autosummary/mlx.core.convolve.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.cos.html b/docs/build/html/python/_autosummary/mlx.core.cos.html
index 8fd09ce63..ce03ed8c5 100644
--- a/docs/build/html/python/_autosummary/mlx.core.cos.html
+++ b/docs/build/html/python/_autosummary/mlx.core.cos.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.cosh.html b/docs/build/html/python/_autosummary/mlx.core.cosh.html
index 9ee1c5727..62e0a6850 100644
--- a/docs/build/html/python/_autosummary/mlx.core.cosh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.cosh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.default_device.html b/docs/build/html/python/_autosummary/mlx.core.default_device.html
index 4cd756c84..1956ee0a2 100644
--- a/docs/build/html/python/_autosummary/mlx.core.default_device.html
+++ b/docs/build/html/python/_autosummary/mlx.core.default_device.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.default_stream.html b/docs/build/html/python/_autosummary/mlx.core.default_stream.html
index 2b98fa0b2..8c2c6ecb6 100644
--- a/docs/build/html/python/_autosummary/mlx.core.default_stream.html
+++ b/docs/build/html/python/_autosummary/mlx.core.default_stream.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.dequantize.html b/docs/build/html/python/_autosummary/mlx.core.dequantize.html
index 79429ba32..b71014aff 100644
--- a/docs/build/html/python/_autosummary/mlx.core.dequantize.html
+++ b/docs/build/html/python/_autosummary/mlx.core.dequantize.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.divide.html b/docs/build/html/python/_autosummary/mlx.core.divide.html
index 2fd3233f7..c25f23bbb 100644
--- a/docs/build/html/python/_autosummary/mlx.core.divide.html
+++ b/docs/build/html/python/_autosummary/mlx.core.divide.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.equal.html b/docs/build/html/python/_autosummary/mlx.core.equal.html
index 25ac55a0f..31d1d0852 100644
--- a/docs/build/html/python/_autosummary/mlx.core.equal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.equal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.erf.html b/docs/build/html/python/_autosummary/mlx.core.erf.html
index 6f76a5e47..535f5b19b 100644
--- a/docs/build/html/python/_autosummary/mlx.core.erf.html
+++ b/docs/build/html/python/_autosummary/mlx.core.erf.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.erfinv.html b/docs/build/html/python/_autosummary/mlx.core.erfinv.html
index cff1de8d9..6e0ccf153 100644
--- a/docs/build/html/python/_autosummary/mlx.core.erfinv.html
+++ b/docs/build/html/python/_autosummary/mlx.core.erfinv.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.eval.html b/docs/build/html/python/_autosummary/mlx.core.eval.html
index 6469ce97a..2b3f9947e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.eval.html
+++ b/docs/build/html/python/_autosummary/mlx.core.eval.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.exp.html b/docs/build/html/python/_autosummary/mlx.core.exp.html
index 9f60abd1f..415595c54 100644
--- a/docs/build/html/python/_autosummary/mlx.core.exp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.exp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.expand_dims.html b/docs/build/html/python/_autosummary/mlx.core.expand_dims.html
index 748e3a782..61058ff5c 100644
--- a/docs/build/html/python/_autosummary/mlx.core.expand_dims.html
+++ b/docs/build/html/python/_autosummary/mlx.core.expand_dims.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.eye.html b/docs/build/html/python/_autosummary/mlx.core.eye.html
index fadd8db74..85106fcbe 100644
--- a/docs/build/html/python/_autosummary/mlx.core.eye.html
+++ b/docs/build/html/python/_autosummary/mlx.core.eye.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.eye
-mlx.core. eye ( n : int , m : Optional [ int ] = None , k : int = 0 , dtype : Optional [ Dtype ] = None , * , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core. eye ( n : int , m : Optional [ int ] = None , k : int = 0 , dtype : Optional [ Dtype ] = float32 , * , stream : Union [ None , Stream , Device ] = None ) → array
Create an identity matrix or a general diagonal matrix.
Parameters:
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.fft.html b/docs/build/html/python/_autosummary/mlx.core.fft.fft.html
index 6ed504808..d13d7df27 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.fft.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.fft.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html
index 1fee46945..20f68b6fa 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.fft2.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.fftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.fftn.html
index b091b12ed..009a66133 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.fftn.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.fftn.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.ifft.html b/docs/build/html/python/_autosummary/mlx.core.fft.ifft.html
index bd4da0d9b..0c6e75091 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.ifft.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.ifft.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html
index 1a57992c0..5c6e51bf8 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.ifft2.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.ifftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.ifftn.html
index d68f08ef4..5e9a8f40a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.ifftn.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.ifftn.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.irfft.html b/docs/build/html/python/_autosummary/mlx.core.fft.irfft.html
index 68c6b6977..123148748 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.irfft.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.irfft.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html
index 14b3eb3e5..181c6e0c3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.irfft2.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html
index 72a1d02b2..3e4f836d7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.irfftn.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html
index 934a1ddcb..5b770ff5f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfft.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html
index 99360564e..5a241c9cc 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfft2.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html b/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html
index 4812f42d8..05c979867 100644
--- a/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html
+++ b/docs/build/html/python/_autosummary/mlx.core.fft.rfftn.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.flatten.html b/docs/build/html/python/_autosummary/mlx.core.flatten.html
index fbcd0f07e..d483e29d9 100644
--- a/docs/build/html/python/_autosummary/mlx.core.flatten.html
+++ b/docs/build/html/python/_autosummary/mlx.core.flatten.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.floor.html b/docs/build/html/python/_autosummary/mlx.core.floor.html
index 80dba5fb3..659545fea 100644
--- a/docs/build/html/python/_autosummary/mlx.core.floor.html
+++ b/docs/build/html/python/_autosummary/mlx.core.floor.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.floor_divide.html b/docs/build/html/python/_autosummary/mlx.core.floor_divide.html
index e13b3597f..391aba135 100644
--- a/docs/build/html/python/_autosummary/mlx.core.floor_divide.html
+++ b/docs/build/html/python/_autosummary/mlx.core.floor_divide.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.full.html b/docs/build/html/python/_autosummary/mlx.core.full.html
index 40df66c4f..65d357c03 100644
--- a/docs/build/html/python/_autosummary/mlx.core.full.html
+++ b/docs/build/html/python/_autosummary/mlx.core.full.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.grad.html b/docs/build/html/python/_autosummary/mlx.core.grad.html
index f806c1194..72bf64b7e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.grad.html
+++ b/docs/build/html/python/_autosummary/mlx.core.grad.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.greater.html b/docs/build/html/python/_autosummary/mlx.core.greater.html
index 5d5f5bd67..f1ed44815 100644
--- a/docs/build/html/python/_autosummary/mlx.core.greater.html
+++ b/docs/build/html/python/_autosummary/mlx.core.greater.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.greater_equal.html b/docs/build/html/python/_autosummary/mlx.core.greater_equal.html
index 8190422f8..6973f22ac 100644
--- a/docs/build/html/python/_autosummary/mlx.core.greater_equal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.greater_equal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.identity.html b/docs/build/html/python/_autosummary/mlx.core.identity.html
index dd8ad2df4..aa7b83195 100644
--- a/docs/build/html/python/_autosummary/mlx.core.identity.html
+++ b/docs/build/html/python/_autosummary/mlx.core.identity.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.identity
-mlx.core. identity ( n : int , dtype : Optional [ Dtype ] = None , * , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core. identity ( n : int , dtype : Optional [ Dtype ] = float32 , * , stream : Union [ None , Stream , Device ] = None ) → array
Create a square identity matrix.
Parameters:
diff --git a/docs/build/html/python/_autosummary/mlx.core.jvp.html b/docs/build/html/python/_autosummary/mlx.core.jvp.html
index bedae92b1..357c87f2f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.jvp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.jvp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.less.html b/docs/build/html/python/_autosummary/mlx.core.less.html
index 7f641b9c0..af746e50d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.less.html
+++ b/docs/build/html/python/_autosummary/mlx.core.less.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.less_equal.html b/docs/build/html/python/_autosummary/mlx.core.less_equal.html
index 97493b89c..881fc8c3d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.less_equal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.less_equal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html b/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html
index 4a8db9ee6..9f2818450 100644
--- a/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html
+++ b/docs/build/html/python/_autosummary/mlx.core.linalg.norm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.linspace.html b/docs/build/html/python/_autosummary/mlx.core.linspace.html
index 285981729..2ac5848d4 100644
--- a/docs/build/html/python/_autosummary/mlx.core.linspace.html
+++ b/docs/build/html/python/_autosummary/mlx.core.linspace.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.load.html b/docs/build/html/python/_autosummary/mlx.core.load.html
index fa4f63d22..5b68eb8a0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.load.html
+++ b/docs/build/html/python/_autosummary/mlx.core.load.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.log.html b/docs/build/html/python/_autosummary/mlx.core.log.html
index 62cb98631..80929e4e0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.log.html
+++ b/docs/build/html/python/_autosummary/mlx.core.log.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.log10.html b/docs/build/html/python/_autosummary/mlx.core.log10.html
index dc0f617f7..b635c0000 100644
--- a/docs/build/html/python/_autosummary/mlx.core.log10.html
+++ b/docs/build/html/python/_autosummary/mlx.core.log10.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.log1p.html b/docs/build/html/python/_autosummary/mlx.core.log1p.html
index b89d89f6e..30f97df2a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.log1p.html
+++ b/docs/build/html/python/_autosummary/mlx.core.log1p.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.log2.html b/docs/build/html/python/_autosummary/mlx.core.log2.html
index 60750255a..86780bafe 100644
--- a/docs/build/html/python/_autosummary/mlx.core.log2.html
+++ b/docs/build/html/python/_autosummary/mlx.core.log2.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.logaddexp.html b/docs/build/html/python/_autosummary/mlx.core.logaddexp.html
index 0f55d8804..de8d97e96 100644
--- a/docs/build/html/python/_autosummary/mlx.core.logaddexp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.logaddexp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.logical_not.html b/docs/build/html/python/_autosummary/mlx.core.logical_not.html
index 98e02776f..3c672272f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.logical_not.html
+++ b/docs/build/html/python/_autosummary/mlx.core.logical_not.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.logsumexp.html b/docs/build/html/python/_autosummary/mlx.core.logsumexp.html
index 76e456b24..2e496b392 100644
--- a/docs/build/html/python/_autosummary/mlx.core.logsumexp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.logsumexp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.matmul.html b/docs/build/html/python/_autosummary/mlx.core.matmul.html
index 74dd538c8..802a6a3af 100644
--- a/docs/build/html/python/_autosummary/mlx.core.matmul.html
+++ b/docs/build/html/python/_autosummary/mlx.core.matmul.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.max.html b/docs/build/html/python/_autosummary/mlx.core.max.html
index be08a0612..9e74f0393 100644
--- a/docs/build/html/python/_autosummary/mlx.core.max.html
+++ b/docs/build/html/python/_autosummary/mlx.core.max.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.maximum.html b/docs/build/html/python/_autosummary/mlx.core.maximum.html
index c37fcf9fa..bccbfefc1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.maximum.html
+++ b/docs/build/html/python/_autosummary/mlx.core.maximum.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.mean.html b/docs/build/html/python/_autosummary/mlx.core.mean.html
index 997b58a43..0fab6fd2a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.mean.html
+++ b/docs/build/html/python/_autosummary/mlx.core.mean.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.min.html b/docs/build/html/python/_autosummary/mlx.core.min.html
index 683a14ee8..063ffd400 100644
--- a/docs/build/html/python/_autosummary/mlx.core.min.html
+++ b/docs/build/html/python/_autosummary/mlx.core.min.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.minimum.html b/docs/build/html/python/_autosummary/mlx.core.minimum.html
index 3252e25d2..f9bbb9dd3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.minimum.html
+++ b/docs/build/html/python/_autosummary/mlx.core.minimum.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.moveaxis.html b/docs/build/html/python/_autosummary/mlx.core.moveaxis.html
index 8926a7e60..361822432 100644
--- a/docs/build/html/python/_autosummary/mlx.core.moveaxis.html
+++ b/docs/build/html/python/_autosummary/mlx.core.moveaxis.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.multiply.html b/docs/build/html/python/_autosummary/mlx.core.multiply.html
index 6ddbcc308..5a2567578 100644
--- a/docs/build/html/python/_autosummary/mlx.core.multiply.html
+++ b/docs/build/html/python/_autosummary/mlx.core.multiply.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.negative.html b/docs/build/html/python/_autosummary/mlx.core.negative.html
index ae4e3d6af..4b8a3b095 100644
--- a/docs/build/html/python/_autosummary/mlx.core.negative.html
+++ b/docs/build/html/python/_autosummary/mlx.core.negative.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.new_stream.html b/docs/build/html/python/_autosummary/mlx.core.new_stream.html
index 72b8ce4d4..429afe6e3 100644
--- a/docs/build/html/python/_autosummary/mlx.core.new_stream.html
+++ b/docs/build/html/python/_autosummary/mlx.core.new_stream.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.ones.html b/docs/build/html/python/_autosummary/mlx.core.ones.html
index 27b6fe3e6..4425119ee 100644
--- a/docs/build/html/python/_autosummary/mlx.core.ones.html
+++ b/docs/build/html/python/_autosummary/mlx.core.ones.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.ones
-mlx.core. ones ( shape : Union [ int , List [ int ] ] , dtype : Optional [ Dtype ] = None , * , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core. ones ( shape : Union [ int , List [ int ] ] , dtype : Optional [ Dtype ] = float32 , * , stream : Union [ None , Stream , Device ] = None ) → array
Construct an array of ones.
Parameters:
diff --git a/docs/build/html/python/_autosummary/mlx.core.ones_like.html b/docs/build/html/python/_autosummary/mlx.core.ones_like.html
index 500640f98..edec0424d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.ones_like.html
+++ b/docs/build/html/python/_autosummary/mlx.core.ones_like.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.pad.html b/docs/build/html/python/_autosummary/mlx.core.pad.html
index 91b6de9f0..4630853ab 100644
--- a/docs/build/html/python/_autosummary/mlx.core.pad.html
+++ b/docs/build/html/python/_autosummary/mlx.core.pad.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.partition.html b/docs/build/html/python/_autosummary/mlx.core.partition.html
index 4c7d66c4f..74efc2cba 100644
--- a/docs/build/html/python/_autosummary/mlx.core.partition.html
+++ b/docs/build/html/python/_autosummary/mlx.core.partition.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.prod.html b/docs/build/html/python/_autosummary/mlx.core.prod.html
index 7af6aa432..62a321e54 100644
--- a/docs/build/html/python/_autosummary/mlx.core.prod.html
+++ b/docs/build/html/python/_autosummary/mlx.core.prod.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.quantize.html b/docs/build/html/python/_autosummary/mlx.core.quantize.html
index 78c8066ad..6dce944c5 100644
--- a/docs/build/html/python/_autosummary/mlx.core.quantize.html
+++ b/docs/build/html/python/_autosummary/mlx.core.quantize.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.quantized_matmul.html b/docs/build/html/python/_autosummary/mlx.core.quantized_matmul.html
index ee14750f4..fbfd28093 100644
--- a/docs/build/html/python/_autosummary/mlx.core.quantized_matmul.html
+++ b/docs/build/html/python/_autosummary/mlx.core.quantized_matmul.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.bernoulli.html b/docs/build/html/python/_autosummary/mlx.core.random.bernoulli.html
index 718955796..65c873d56 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.bernoulli.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.bernoulli.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.categorical.html b/docs/build/html/python/_autosummary/mlx.core.random.categorical.html
index 32d072411..c7b340895 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.categorical.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.categorical.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.gumbel.html b/docs/build/html/python/_autosummary/mlx.core.random.gumbel.html
index ec9b08e97..4937f85e0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.gumbel.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.gumbel.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.random.gumbel
-mlx.core.random. gumbel ( shape : List [ int ] = [] , dtype : Dtype = mlx.core.float32 , stream : Optional [ array ] = None , key : Union [ None , Stream , Device ] = None ) → array
+mlx.core.random. gumbel ( shape : List [ int ] = [] , dtype : Optional [ Dtype ] = mlx.core.float32 , stream : Optional [ array ] = None , key : Union [ None , Stream , Device ] = None ) → array
Sample from the standard Gumbel distribution.
The values are sampled from a standard Gumbel distribution
which CDF exp(-exp(-x))
.
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.key.html b/docs/build/html/python/_autosummary/mlx.core.random.key.html
index 3c7b7b339..1fd6a8fb4 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.key.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.key.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.normal.html b/docs/build/html/python/_autosummary/mlx.core.random.normal.html
index d24b6f6a0..8eaa0eb27 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.normal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.normal.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.random.normal
-mlx.core.random. normal ( shape : List [ int ] = [] , dtype : Dtype = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core.random. normal ( shape : List [ int ] = [] , dtype : Optional [ Dtype ] = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
Generate normally distributed random numbers.
Parameters:
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.randint.html b/docs/build/html/python/_autosummary/mlx.core.random.randint.html
index bbf1638cd..aeebd9783 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.randint.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.randint.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.random.randint
-mlx.core.random. randint ( low : Union [ bool , int , float , complex , object ] , high : Union [ bool , int , float , complex , object ] , shape : List [ int ] = [] , dtype : Dtype = mlx.core.int32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core.random. randint ( low : Union [ bool , int , float , complex , object ] , high : Union [ bool , int , float , complex , object ] , shape : List [ int ] = [] , dtype : Optional [ Dtype ] = mlx.core.int32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
Generate random integers from the given interval.
The values are sampled with equal probability from the integers in
half-open interval [low, high)
. The lower and upper bound can be
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.seed.html b/docs/build/html/python/_autosummary/mlx.core.random.seed.html
index 69c16c3c4..07c3df57c 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.seed.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.seed.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.split.html b/docs/build/html/python/_autosummary/mlx.core.random.split.html
index 9443d9890..6c46b94db 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.split.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.split.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.truncated_normal.html b/docs/build/html/python/_autosummary/mlx.core.random.truncated_normal.html
index fbf2e30c4..39afcc503 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.truncated_normal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.truncated_normal.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.random.truncated_normal
-mlx.core.random. truncated_normal ( lower : Union [ bool , int , float , complex , object ] , upper : Union [ bool , int , float , complex , object ] , shape : Optional [ List [ int ] ] = None , dtype : Dtype = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core.random. truncated_normal ( lower : Union [ bool , int , float , complex , object ] , upper : Union [ bool , int , float , complex , object ] , shape : Optional [ List [ int ] ] = None , dtype : Optional [ Dtype ] = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
Generate values from a truncated normal distribution.
The values are sampled from the truncated normal distribution
on the domain (lower, upper)
. The bounds lower
and upper
diff --git a/docs/build/html/python/_autosummary/mlx.core.random.uniform.html b/docs/build/html/python/_autosummary/mlx.core.random.uniform.html
index b8d3641a4..37172908d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.random.uniform.html
+++ b/docs/build/html/python/_autosummary/mlx.core.random.uniform.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.random.uniform
-mlx.core.random. uniform ( low : Union [ bool , int , float , complex , object ] = 0 , high : Union [ bool , int , float , complex , object ] = 1 , shape : List [ int ] = [] , dtype : Dtype = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core.random. uniform ( low : Union [ bool , int , float , complex , object ] = 0 , high : Union [ bool , int , float , complex , object ] = 1 , shape : List [ int ] = [] , dtype : Optional [ Dtype ] = mlx.core.float32 , key : Optional [ array ] = None , stream : Union [ None , Stream , Device ] = None ) → array
Generate uniformly distributed random numbers.
The values are sampled uniformly in the half-open interval [low, high)
.
The lower and upper bound can be scalars or arrays and must be
diff --git a/docs/build/html/python/_autosummary/mlx.core.reciprocal.html b/docs/build/html/python/_autosummary/mlx.core.reciprocal.html
index e5ecbaca2..fc7af35a0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.reciprocal.html
+++ b/docs/build/html/python/_autosummary/mlx.core.reciprocal.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.repeat.html b/docs/build/html/python/_autosummary/mlx.core.repeat.html
index 1fd87c9f7..6057ad5b8 100644
--- a/docs/build/html/python/_autosummary/mlx.core.repeat.html
+++ b/docs/build/html/python/_autosummary/mlx.core.repeat.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.reshape.html b/docs/build/html/python/_autosummary/mlx.core.reshape.html
index 4e464a18a..1b4eaa192 100644
--- a/docs/build/html/python/_autosummary/mlx.core.reshape.html
+++ b/docs/build/html/python/_autosummary/mlx.core.reshape.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.round.html b/docs/build/html/python/_autosummary/mlx.core.round.html
index 6e8a5d74a..71178920c 100644
--- a/docs/build/html/python/_autosummary/mlx.core.round.html
+++ b/docs/build/html/python/_autosummary/mlx.core.round.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.rsqrt.html b/docs/build/html/python/_autosummary/mlx.core.rsqrt.html
index 7765c7d33..28962ffde 100644
--- a/docs/build/html/python/_autosummary/mlx.core.rsqrt.html
+++ b/docs/build/html/python/_autosummary/mlx.core.rsqrt.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.save.html b/docs/build/html/python/_autosummary/mlx.core.save.html
index c58e39053..5dcaa3df5 100644
--- a/docs/build/html/python/_autosummary/mlx.core.save.html
+++ b/docs/build/html/python/_autosummary/mlx.core.save.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.save_safetensors.html b/docs/build/html/python/_autosummary/mlx.core.save_safetensors.html
index c78139a12..b7961b0ba 100644
--- a/docs/build/html/python/_autosummary/mlx.core.save_safetensors.html
+++ b/docs/build/html/python/_autosummary/mlx.core.save_safetensors.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.savez.html b/docs/build/html/python/_autosummary/mlx.core.savez.html
index 922b613fa..37ba1e196 100644
--- a/docs/build/html/python/_autosummary/mlx.core.savez.html
+++ b/docs/build/html/python/_autosummary/mlx.core.savez.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.savez_compressed.html b/docs/build/html/python/_autosummary/mlx.core.savez_compressed.html
index 2106e4de7..0ff28cf0e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.savez_compressed.html
+++ b/docs/build/html/python/_autosummary/mlx.core.savez_compressed.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.set_default_device.html b/docs/build/html/python/_autosummary/mlx.core.set_default_device.html
index c7f493bbb..95575e785 100644
--- a/docs/build/html/python/_autosummary/mlx.core.set_default_device.html
+++ b/docs/build/html/python/_autosummary/mlx.core.set_default_device.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.set_default_stream.html b/docs/build/html/python/_autosummary/mlx.core.set_default_stream.html
index d335e3b05..712428150 100644
--- a/docs/build/html/python/_autosummary/mlx.core.set_default_stream.html
+++ b/docs/build/html/python/_autosummary/mlx.core.set_default_stream.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sigmoid.html b/docs/build/html/python/_autosummary/mlx.core.sigmoid.html
index 672588e64..df6df73ea 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sigmoid.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sigmoid.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sign.html b/docs/build/html/python/_autosummary/mlx.core.sign.html
index 421ba38f6..06413a649 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sign.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sign.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.simplify.html b/docs/build/html/python/_autosummary/mlx.core.simplify.html
index 9fb4cfc23..db9b6b182 100644
--- a/docs/build/html/python/_autosummary/mlx.core.simplify.html
+++ b/docs/build/html/python/_autosummary/mlx.core.simplify.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sin.html b/docs/build/html/python/_autosummary/mlx.core.sin.html
index 5131135c6..dc5fc5bff 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sin.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sin.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sinh.html b/docs/build/html/python/_autosummary/mlx.core.sinh.html
index b0f10749e..2ae746e9d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sinh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sinh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.softmax.html b/docs/build/html/python/_autosummary/mlx.core.softmax.html
index d8756e73b..23a69e30d 100644
--- a/docs/build/html/python/_autosummary/mlx.core.softmax.html
+++ b/docs/build/html/python/_autosummary/mlx.core.softmax.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sort.html b/docs/build/html/python/_autosummary/mlx.core.sort.html
index 467a41063..9ee91ce25 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sort.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sort.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.split.html b/docs/build/html/python/_autosummary/mlx.core.split.html
index 887351cc3..98d91697e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.split.html
+++ b/docs/build/html/python/_autosummary/mlx.core.split.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sqrt.html b/docs/build/html/python/_autosummary/mlx.core.sqrt.html
index abc4d0c2d..daef07ceb 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sqrt.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sqrt.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.square.html b/docs/build/html/python/_autosummary/mlx.core.square.html
index a5f74fc82..525725ce0 100644
--- a/docs/build/html/python/_autosummary/mlx.core.square.html
+++ b/docs/build/html/python/_autosummary/mlx.core.square.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.squeeze.html b/docs/build/html/python/_autosummary/mlx.core.squeeze.html
index cdc064660..0a39a940b 100644
--- a/docs/build/html/python/_autosummary/mlx.core.squeeze.html
+++ b/docs/build/html/python/_autosummary/mlx.core.squeeze.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.stack.html b/docs/build/html/python/_autosummary/mlx.core.stack.html
index ff3e8ea7d..40c9b4b9f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.stack.html
+++ b/docs/build/html/python/_autosummary/mlx.core.stack.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.stop_gradient.html b/docs/build/html/python/_autosummary/mlx.core.stop_gradient.html
index e6afad990..464363c67 100644
--- a/docs/build/html/python/_autosummary/mlx.core.stop_gradient.html
+++ b/docs/build/html/python/_autosummary/mlx.core.stop_gradient.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.subtract.html b/docs/build/html/python/_autosummary/mlx.core.subtract.html
index c033deb21..f52dc0864 100644
--- a/docs/build/html/python/_autosummary/mlx.core.subtract.html
+++ b/docs/build/html/python/_autosummary/mlx.core.subtract.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.sum.html b/docs/build/html/python/_autosummary/mlx.core.sum.html
index 5b5c3e961..e69924972 100644
--- a/docs/build/html/python/_autosummary/mlx.core.sum.html
+++ b/docs/build/html/python/_autosummary/mlx.core.sum.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.swapaxes.html b/docs/build/html/python/_autosummary/mlx.core.swapaxes.html
index 5fa7cc5a5..1deb5f7ff 100644
--- a/docs/build/html/python/_autosummary/mlx.core.swapaxes.html
+++ b/docs/build/html/python/_autosummary/mlx.core.swapaxes.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.take.html b/docs/build/html/python/_autosummary/mlx.core.take.html
index ac6b3d982..db6e45ce1 100644
--- a/docs/build/html/python/_autosummary/mlx.core.take.html
+++ b/docs/build/html/python/_autosummary/mlx.core.take.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.take_along_axis.html b/docs/build/html/python/_autosummary/mlx.core.take_along_axis.html
index 53ff770da..624edb46e 100644
--- a/docs/build/html/python/_autosummary/mlx.core.take_along_axis.html
+++ b/docs/build/html/python/_autosummary/mlx.core.take_along_axis.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.tan.html b/docs/build/html/python/_autosummary/mlx.core.tan.html
index 04128f9b9..9a80112c2 100644
--- a/docs/build/html/python/_autosummary/mlx.core.tan.html
+++ b/docs/build/html/python/_autosummary/mlx.core.tan.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.tanh.html b/docs/build/html/python/_autosummary/mlx.core.tanh.html
index d3771d69d..a2d9da856 100644
--- a/docs/build/html/python/_autosummary/mlx.core.tanh.html
+++ b/docs/build/html/python/_autosummary/mlx.core.tanh.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.tensordot.html b/docs/build/html/python/_autosummary/mlx.core.tensordot.html
index ccd5de16b..ce3ef1575 100644
--- a/docs/build/html/python/_autosummary/mlx.core.tensordot.html
+++ b/docs/build/html/python/_autosummary/mlx.core.tensordot.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.transpose.html b/docs/build/html/python/_autosummary/mlx.core.transpose.html
index 504f28e9c..2ddf281c7 100644
--- a/docs/build/html/python/_autosummary/mlx.core.transpose.html
+++ b/docs/build/html/python/_autosummary/mlx.core.transpose.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.tri.html b/docs/build/html/python/_autosummary/mlx.core.tri.html
index b07c84d86..fcded2a4a 100644
--- a/docs/build/html/python/_autosummary/mlx.core.tri.html
+++ b/docs/build/html/python/_autosummary/mlx.core.tri.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.tril.html b/docs/build/html/python/_autosummary/mlx.core.tril.html
index b66e6f1b0..f96241310 100644
--- a/docs/build/html/python/_autosummary/mlx.core.tril.html
+++ b/docs/build/html/python/_autosummary/mlx.core.tril.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.triu.html b/docs/build/html/python/_autosummary/mlx.core.triu.html
index b398b280e..3486c35bb 100644
--- a/docs/build/html/python/_autosummary/mlx.core.triu.html
+++ b/docs/build/html/python/_autosummary/mlx.core.triu.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.value_and_grad.html b/docs/build/html/python/_autosummary/mlx.core.value_and_grad.html
index f1e65465e..63005f493 100644
--- a/docs/build/html/python/_autosummary/mlx.core.value_and_grad.html
+++ b/docs/build/html/python/_autosummary/mlx.core.value_and_grad.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.var.html b/docs/build/html/python/_autosummary/mlx.core.var.html
index 6aeceaada..bbd731841 100644
--- a/docs/build/html/python/_autosummary/mlx.core.var.html
+++ b/docs/build/html/python/_autosummary/mlx.core.var.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.vjp.html b/docs/build/html/python/_autosummary/mlx.core.vjp.html
index 8e8759c92..776b155a9 100644
--- a/docs/build/html/python/_autosummary/mlx.core.vjp.html
+++ b/docs/build/html/python/_autosummary/mlx.core.vjp.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.vmap.html b/docs/build/html/python/_autosummary/mlx.core.vmap.html
index 5eb7c186f..155f9cdef 100644
--- a/docs/build/html/python/_autosummary/mlx.core.vmap.html
+++ b/docs/build/html/python/_autosummary/mlx.core.vmap.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.where.html b/docs/build/html/python/_autosummary/mlx.core.where.html
index 81f5bd5b1..b2f17070f 100644
--- a/docs/build/html/python/_autosummary/mlx.core.where.html
+++ b/docs/build/html/python/_autosummary/mlx.core.where.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.core.zeros.html b/docs/build/html/python/_autosummary/mlx.core.zeros.html
index a742f428f..b86e8e850 100644
--- a/docs/build/html/python/_autosummary/mlx.core.zeros.html
+++ b/docs/build/html/python/_autosummary/mlx.core.zeros.html
@@ -147,9 +147,10 @@
Usage
Examples
@@ -634,7 +635,7 @@ document.write(`
mlx.core.zeros
-mlx.core. zeros ( shape : Union [ int , List [ int ] ] , dtype : Optional [ Dtype ] = None , * , stream : Union [ None , Stream , Device ] = None ) → array
+mlx.core. zeros ( shape : Union [ int , List [ int ] ] , dtype : Optional [ Dtype ] = float32 , * , stream : Union [ None , Stream , Device ] = None ) → array
Construct an array of zeros.
Parameters:
diff --git a/docs/build/html/python/_autosummary/mlx.core.zeros_like.html b/docs/build/html/python/_autosummary/mlx.core.zeros_like.html
index 19bc6594b..4bcd3dbc5 100644
--- a/docs/build/html/python/_autosummary/mlx.core.zeros_like.html
+++ b/docs/build/html/python/_autosummary/mlx.core.zeros_like.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.nn.Module.html b/docs/build/html/python/_autosummary/mlx.nn.Module.html
deleted file mode 100644
index e45a1926f..000000000
--- a/docs/build/html/python/_autosummary/mlx.nn.Module.html
+++ /dev/null
@@ -1,844 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- mlx.nn.Module — MLX 0.0.6 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Skip to main content
-
-
-
-
-
-
- Back to top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-mlx.nn.Module
-
-
-class mlx.nn. Module
-Base class for building neural networks with MLX.
-All the layers provided in mlx.nn.layers
subclass this class and
-your models should do the same.
-A Module
can contain other Module
instances or mlx.core.array
-instances in arbitrary nesting of python lists or dicts. The Module
-then allows recursively extracting all the mlx.core.array
instances
-using mlx.nn.Module.parameters()
.
-In addition, the Module
has the concept of trainable and non trainable
-parameters (called “frozen”). When using mlx.nn.value_and_grad()
-the gradients are returned only with respect to the trainable parameters.
-All arrays in a module are trainable unless they are added in the “frozen”
-set by calling freeze()
.
-import mlx.core as mx
-import mlx.nn as nn
-
-class MyMLP ( nn . Module ):
- def __init__ ( self , in_dims : int , out_dims : int , hidden_dims : int = 16 ):
- super () . __init__ ()
-
- self . in_proj = nn . Linear ( in_dims , hidden_dims )
- self . out_proj = nn . Linear ( hidden_dims , out_dims )
-
- def __call__ ( self , x ):
- x = self . in_proj ( x )
- x = mx . maximum ( x , 0 )
- return self . out_proj ( x )
-
-model = MyMLP ( 2 , 1 )
-
-# All the model parameters are created but since MLX is lazy by
-# default, they are not evaluated yet. Calling `mx.eval` actually
-# allocates memory and initializes the parameters.
-mx . eval ( model . parameters ())
-
-# Setting a parameter to a new value is as simply as accessing that
-# parameter and assigning a new array to it.
-model . in_proj . weight = model . in_proj . weight * 2
-mx . eval ( model . parameters ())
-
-
-
-
-__init__ ( )
-Should be called by the subclasses of Module
.
-
-
-Methods
-
-
-__init__
()
-Should be called by the subclasses of Module
.
-
-apply
(map_fn[, filter_fn])
-Map all the parameters using the provided map_fn
and immediately update the module with the mapped parameters.
-
-apply_to_modules
(apply_fn)
-Apply a function to all the modules in this instance (including this instance).
-
-children
()
-Return the direct descendants of this Module instance.
-
-clear
()
-
-
-copy
()
-
-
-eval
()
-
-
-filter_and_map
(filter_fn[, map_fn, is_leaf_fn])
-Recursively filter the contents of the module using filter_fn
, namely only select keys and values where filter_fn
returns true.
-
-freeze
(*[, recurse, keys, strict])
-Freeze the Module's parameters or some of them.
-
-fromkeys
([value])
-Create a new dictionary with keys from iterable and values set to value.
-
-get
(key[, default])
-Return the value for key if key is in the dictionary, else default.
-
-is_module
(value)
-
-
-items
()
-
-
-keys
()
-
-
-leaf_modules
()
-Return the submodules that do not contain other modules.
-
-load_weights
(file)
-Load and update the model's weights from a .npz file.
-
-modules
()
-Return a list with all the modules in this instance.
-
-named_modules
()
-Return a list with all the modules in this instance and their name with dot notation.
-
-parameters
()
-Recursively return all the mlx.core.array
members of this Module as a dict of dicts and lists.
-
-pop
(k[,d])
-If key is not found, default is returned if given, otherwise KeyError is raised
-
-popitem
()
-Remove and return a (key, value) pair as a 2-tuple.
-
-save_weights
(file)
-Save the model's weights to a .npz file.
-
-setdefault
(key[, default])
-Insert key with a value of default if key is not in the dictionary.
-
-train
([mode])
-
-
-trainable_parameter_filter
(module, key, value)
-
-
-trainable_parameters
()
-Recursively return all the non frozen mlx.core.array
members of this Module as a dict of dicts and lists.
-
-unfreeze
(*[, recurse, keys, strict])
-Unfreeze the Module's parameters or some of them.
-
-update
(parameters)
-Replace the parameters of this Module with the provided ones in the dict of dicts and lists.
-
-update_modules
(modules)
-Replace the child modules of this Module
instance with the provided ones in the dict of dicts and lists.
-
-valid_child_filter
(module, key, value)
-
-
-valid_parameter_filter
(module, key, value)
-
-
-values
()
-
-
-
-
-Attributes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/build/html/python/_autosummary/mlx.nn.value_and_grad.html b/docs/build/html/python/_autosummary/mlx.nn.value_and_grad.html
index 306645c25..89aafaa0d 100644
--- a/docs/build/html/python/_autosummary/mlx.nn.value_and_grad.html
+++ b/docs/build/html/python/_autosummary/mlx.nn.value_and_grad.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.AdaDelta.html b/docs/build/html/python/_autosummary/mlx.optimizers.AdaDelta.html
index a11424f72..4cd4e47d5 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.AdaDelta.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.AdaDelta.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.Adagrad.html b/docs/build/html/python/_autosummary/mlx.optimizers.Adagrad.html
index c66eccf5e..da26c9622 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.Adagrad.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.Adagrad.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.Adam.html b/docs/build/html/python/_autosummary/mlx.optimizers.Adam.html
index b048aa57f..bb519bd93 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.Adam.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.Adam.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.AdamW.html b/docs/build/html/python/_autosummary/mlx.optimizers.AdamW.html
index 2eb69a76f..8c4a2c8bf 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.AdamW.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.AdamW.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.Adamax.html b/docs/build/html/python/_autosummary/mlx.optimizers.Adamax.html
index c208d6d3d..62a17603d 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.Adamax.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.Adamax.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.Lion.html b/docs/build/html/python/_autosummary/mlx.optimizers.Lion.html
index d03131156..3ee9a5230 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.Lion.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.Lion.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.Optimizer.html b/docs/build/html/python/_autosummary/mlx.optimizers.Optimizer.html
index 3569329bc..8cf91d669 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.Optimizer.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.Optimizer.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.OptimizerState.html b/docs/build/html/python/_autosummary/mlx.optimizers.OptimizerState.html
index 13cd7b62f..4b69400c6 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.OptimizerState.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.OptimizerState.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.RMSprop.html b/docs/build/html/python/_autosummary/mlx.optimizers.RMSprop.html
index 436e527f3..a9c3b4349 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.RMSprop.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.RMSprop.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.optimizers.SGD.html b/docs/build/html/python/_autosummary/mlx.optimizers.SGD.html
index e5f8772f4..1ee966b4f 100644
--- a/docs/build/html/python/_autosummary/mlx.optimizers.SGD.html
+++ b/docs/build/html/python/_autosummary/mlx.optimizers.SGD.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.utils.tree_flatten.html b/docs/build/html/python/_autosummary/mlx.utils.tree_flatten.html
index 5633f295b..1d3116019 100644
--- a/docs/build/html/python/_autosummary/mlx.utils.tree_flatten.html
+++ b/docs/build/html/python/_autosummary/mlx.utils.tree_flatten.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.utils.tree_map.html b/docs/build/html/python/_autosummary/mlx.utils.tree_map.html
index dc13ae039..18bdb4462 100644
--- a/docs/build/html/python/_autosummary/mlx.utils.tree_map.html
+++ b/docs/build/html/python/_autosummary/mlx.utils.tree_map.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary/mlx.utils.tree_unflatten.html b/docs/build/html/python/_autosummary/mlx.utils.tree_unflatten.html
index 0359041c5..c6282a556 100644
--- a/docs/build/html/python/_autosummary/mlx.utils.tree_unflatten.html
+++ b/docs/build/html/python/_autosummary/mlx.utils.tree_unflatten.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html b/docs/build/html/python/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html
deleted file mode 100644
index 61ec33975..000000000
--- a/docs/build/html/python/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html
+++ /dev/null
@@ -1,690 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- mlx.nn.losses.smooth_l1_loss — MLX 0.0.5 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Skip to main content
-
-
-
-
-
-
- Back to top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
mlx.nn.losses.smooth_l1_loss
-
-
-
-
-
-
-
-
-
-
-mlx.nn.losses.smooth_l1_loss
-
-
-class mlx.nn.losses. smooth_l1_loss ( predictions : array , targets : array , beta : float = 1.0 , reduction : str = 'mean' )
-Computes the smooth L1 loss.
-The smooth L1 loss is a variant of the L1 loss which replaces the absolute
-difference with a squared difference when the absolute difference is less
-than beta
.
-The formula for the smooth L1 Loss is:
-
-\[\begin{split}l =
- \begin{cases}
- 0.5 (x - y)^2, & \text{ if } & (x - y) < \beta \\
- |x - y| - 0.5 \beta, & & \text{otherwise}
- \end{cases}\end{split}\]
-
-Parameters:
-
-predictions (array ) – Predicted values.
-targets (array ) – Ground truth values.
-beta (float , optional ) – The threshold after which the loss changes
-from the squared to the absolute difference. Default: 1.0
.
-reduction (str , optional ) – Specifies the reduction to apply to the output:
-'none'
| 'mean'
| 'sum'
. Default: 'mean'
.
-
-
-Returns:
-The computed smooth L1 loss.
-
-Return type:
-array
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/build/html/python/array.html b/docs/build/html/python/array.html
index 7c8dcb9ec..f4b89fcae 100644
--- a/docs/build/html/python/array.html
+++ b/docs/build/html/python/array.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/data_types.html b/docs/build/html/python/data_types.html
index e6e930541..b632ebb6c 100644
--- a/docs/build/html/python/data_types.html
+++ b/docs/build/html/python/data_types.html
@@ -145,9 +145,10 @@
Usage
Examples
diff --git a/docs/build/html/python/devices_and_streams.html b/docs/build/html/python/devices_and_streams.html
index c5a813614..692434eb5 100644
--- a/docs/build/html/python/devices_and_streams.html
+++ b/docs/build/html/python/devices_and_streams.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/fft.html b/docs/build/html/python/fft.html
index 179a08ae8..051d2ff31 100644
--- a/docs/build/html/python/fft.html
+++ b/docs/build/html/python/fft.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/linalg.html b/docs/build/html/python/linalg.html
index 93cce547c..50822095b 100644
--- a/docs/build/html/python/linalg.html
+++ b/docs/build/html/python/linalg.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn.html b/docs/build/html/python/nn.html
index e162ad754..08025b012 100644
--- a/docs/build/html/python/nn.html
+++ b/docs/build/html/python/nn.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.ALiBi.html b/docs/build/html/python/nn/_autosummary/mlx.nn.ALiBi.html
index 6a93c3779..4c3d8cce4 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.ALiBi.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.ALiBi.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.BatchNorm.html b/docs/build/html/python/nn/_autosummary/mlx.nn.BatchNorm.html
index 209a90467..48804299b 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.BatchNorm.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.BatchNorm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Conv1d.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Conv1d.html
index fc87fd525..e2bce0c6d 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Conv1d.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Conv1d.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Conv2d.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Conv2d.html
index 58bfc5d32..dd563320a 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Conv2d.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Conv2d.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout.html
index ded2099f9..6f6591bf3 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout2d.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout2d.html
index e7f4c7ce9..d52fc4e0d 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout2d.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout2d.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout3d.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout3d.html
index 0e77363bd..194f40e92 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout3d.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Dropout3d.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Embedding.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Embedding.html
index 3f5a62042..ad749797e 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Embedding.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Embedding.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.GELU.html b/docs/build/html/python/nn/_autosummary/mlx.nn.GELU.html
index 21970b967..914928ae2 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.GELU.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.GELU.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.GroupNorm.html b/docs/build/html/python/nn/_autosummary/mlx.nn.GroupNorm.html
index 88b4cb865..c70b3d2b2 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.GroupNorm.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.GroupNorm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.InstanceNorm.html b/docs/build/html/python/nn/_autosummary/mlx.nn.InstanceNorm.html
index 93909e2e9..d93ac4b9d 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.InstanceNorm.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.InstanceNorm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.LayerNorm.html b/docs/build/html/python/nn/_autosummary/mlx.nn.LayerNorm.html
index 8cdf2b052..d79d7a29a 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.LayerNorm.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.LayerNorm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Linear.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Linear.html
index dc3d708fa..bb6cf42c7 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Linear.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Linear.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Mish.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Mish.html
index 945bc6ce2..49cd7d966 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Mish.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Mish.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply.html
index 8317e370a..6929fa924 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.html
index a9141daa2..f0cd9e3b0 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.children.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.children.html
index 5278320b5..931ab71be 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.children.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.children.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.eval.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.eval.html
index 6465178f8..eb2101c8b 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.eval.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.eval.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.filter_and_map.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.filter_and_map.html
index e76afd637..31699e082 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.filter_and_map.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.filter_and_map.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.freeze.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.freeze.html
index 5a910af32..5884318a5 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.freeze.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.freeze.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.leaf_modules.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.leaf_modules.html
index 715559c08..c42141926 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.leaf_modules.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.leaf_modules.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.load_weights.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.load_weights.html
index 8cfb0d546..49f10d826 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.load_weights.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.load_weights.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.modules.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.modules.html
index c125d81f7..98b278450 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.modules.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.modules.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.named_modules.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.named_modules.html
index 69ad73d79..9de211656 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.named_modules.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.named_modules.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.parameters.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.parameters.html
index cce9ab572..3914d0cc5 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.parameters.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.parameters.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.save_weights.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.save_weights.html
index 340c2a896..faf5a1ce9 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.save_weights.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.save_weights.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.train.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.train.html
index 5256098b2..ad3758983 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.train.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.train.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.html
index 5be8d9295..257d57297 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.training.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.training.html
index 6425eb036..b3a50a237 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.training.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.training.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.unfreeze.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.unfreeze.html
index d82cb8aa4..0a6e1c082 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.unfreeze.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.unfreeze.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update.html
index c2e402da3..36698694c 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update_modules.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update_modules.html
index 17fddaa7e..a7bcd7dfd 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update_modules.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Module.update_modules.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.MultiHeadAttention.html b/docs/build/html/python/nn/_autosummary/mlx.nn.MultiHeadAttention.html
index 69149a15d..85de76ad3 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.MultiHeadAttention.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.MultiHeadAttention.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.PReLU.html b/docs/build/html/python/nn/_autosummary/mlx.nn.PReLU.html
index aa6819a11..c868ea9d8 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.PReLU.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.PReLU.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.QuantizedLinear.html b/docs/build/html/python/nn/_autosummary/mlx.nn.QuantizedLinear.html
index 3f45f66a0..6c57115e8 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.QuantizedLinear.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.QuantizedLinear.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.RMSNorm.html b/docs/build/html/python/nn/_autosummary/mlx.nn.RMSNorm.html
index 0af8037b6..5d87adea6 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.RMSNorm.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.RMSNorm.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.ReLU.html b/docs/build/html/python/nn/_autosummary/mlx.nn.ReLU.html
index 0bf25fa74..98531ec61 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.ReLU.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.ReLU.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.RoPE.html b/docs/build/html/python/nn/_autosummary/mlx.nn.RoPE.html
index 5cbf1145a..859fbfe47 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.RoPE.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.RoPE.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.SELU.html b/docs/build/html/python/nn/_autosummary/mlx.nn.SELU.html
index fbaf459cd..fccec27a6 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.SELU.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.SELU.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Sequential.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Sequential.html
index 0ea22f2cc..ec1aa30f7 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Sequential.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Sequential.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.SiLU.html b/docs/build/html/python/nn/_autosummary/mlx.nn.SiLU.html
index 3713eed56..f191d253f 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.SiLU.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.SiLU.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.html b/docs/build/html/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.html
index 8a333e081..abf976ca8 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Step.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Step.html
index 26bc8af73..08e321aca 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Step.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Step.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary/mlx.nn.Transformer.html b/docs/build/html/python/nn/_autosummary/mlx.nn.Transformer.html
index 9a5a9e803..e04bd2132 100644
--- a/docs/build/html/python/nn/_autosummary/mlx.nn.Transformer.html
+++ b/docs/build/html/python/nn/_autosummary/mlx.nn.Transformer.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu.html
index f77018fb0..cc7e6e2dc 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_approx.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_approx.html
index 61de71abf..5c86ca8a6 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_approx.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_approx.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.html
index 89ac73a21..9e96f5e84 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.html
index efe9fbdc2..b743f7546 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html
index abb4684bd..185ddb955 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.html
index 61b1ed988..d79c5058c 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.html
index bf18a56ca..9f04dc176 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html
index 5377560bf..5ee91d81c 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.html
index 4fc7fcd7e..a570ee4d8 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.html
index a76fce097..a65f4ab67 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.html
index 0d06c3df3..60257df7d 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.html
index ce30f90e5..f865a8f07 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html
index 7bec6888e..fd48bbcfb 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.html
index 1e4dcd783..1b882547a 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.mish.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.mish.html
index 8a3eb145b..f34e082f3 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.mish.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.mish.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.prelu.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.prelu.html
index 05fb93308..1e2baf4c4 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.prelu.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.prelu.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.relu.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.relu.html
index 70b541076..8a965c73f 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.relu.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.relu.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.selu.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.selu.html
index f42055bf7..bfb3406a6 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.selu.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.selu.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.silu.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.silu.html
index ce535865e..a20063567 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.silu.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.silu.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.step.html b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.step.html
index 34562c178..e3f0aaf80 100644
--- a/docs/build/html/python/nn/_autosummary_functions/mlx.nn.step.html
+++ b/docs/build/html/python/nn/_autosummary_functions/mlx.nn.step.html
@@ -148,9 +148,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/functions.html b/docs/build/html/python/nn/functions.html
index 8ca46866e..de7b62e08 100644
--- a/docs/build/html/python/nn/functions.html
+++ b/docs/build/html/python/nn/functions.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/layers.html b/docs/build/html/python/nn/layers.html
index 9a7dd9658..247912e1b 100644
--- a/docs/build/html/python/nn/layers.html
+++ b/docs/build/html/python/nn/layers.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/losses.html b/docs/build/html/python/nn/losses.html
index 17f192f1f..eabb29363 100644
--- a/docs/build/html/python/nn/losses.html
+++ b/docs/build/html/python/nn/losses.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/nn/module.html b/docs/build/html/python/nn/module.html
index c7b565b5e..be564dd62 100644
--- a/docs/build/html/python/nn/module.html
+++ b/docs/build/html/python/nn/module.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/ops.html b/docs/build/html/python/ops.html
index d28f69fde..d32b3a47d 100644
--- a/docs/build/html/python/ops.html
+++ b/docs/build/html/python/ops.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/optimizers.html b/docs/build/html/python/optimizers.html
index 91496f3d8..f9d9105c8 100644
--- a/docs/build/html/python/optimizers.html
+++ b/docs/build/html/python/optimizers.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/random.html b/docs/build/html/python/random.html
index 51a36abd2..0652de2f4 100644
--- a/docs/build/html/python/random.html
+++ b/docs/build/html/python/random.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/transforms.html b/docs/build/html/python/transforms.html
index 2cdc2744b..4fa83fd8e 100644
--- a/docs/build/html/python/transforms.html
+++ b/docs/build/html/python/transforms.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/python/tree_utils.html b/docs/build/html/python/tree_utils.html
index 82ef8d8db..0d316e5c6 100644
--- a/docs/build/html/python/tree_utils.html
+++ b/docs/build/html/python/tree_utils.html
@@ -147,9 +147,10 @@
Usage
Examples
diff --git a/docs/build/html/quick_start.html b/docs/build/html/quick_start.html
deleted file mode 100644
index 0f77bdf44..000000000
--- a/docs/build/html/quick_start.html
+++ /dev/null
@@ -1,799 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Quick Start Guide — MLX 0.0.7 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Skip to main content
-
-
-
-
-
-
- Back to top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Quick Start Guide
-
-
-
-
-
-
-
-
-
-
-Quick Start Guide
-
-Basics
-Import mlx.core
and make an array
:
->> import mlx.core as mx
->> a = mx . array ([ 1 , 2 , 3 , 4 ])
->> a . shape
-[ 4 ]
->> a . dtype
-int32
->> b = mx . array ([ 1.0 , 2.0 , 3.0 , 4.0 ])
->> b . dtype
-float32
-
-
-Operations in MLX are lazy. The outputs of MLX operations are not computed
-until they are needed. To force an array to be evaluated use
-eval()
. Arrays will automatically be evaluated in a few cases. For
-example, inspecting a scalar with array.item()
, printing an array,
-or converting an array from array
to numpy.ndarray
all
-automatically evaluate the array.
->> c = a + b # c not yet evaluated
->> mx . eval ( c ) # evaluates c
->> c = a + b
->> print ( c ) # Also evaluates c
-array ([ 2 , 4 , 6 , 8 ], dtype = float32 )
->> c = a + b
->> import numpy as np
->> np . array ( c ) # Also evaluates c
-array ([ 2. , 4. , 6. , 8. ], dtype = float32 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/build/html/search.html b/docs/build/html/search.html
index b75517a7c..1c6fce590 100644
--- a/docs/build/html/search.html
+++ b/docs/build/html/search.html
@@ -146,9 +146,10 @@
Usage
Examples
diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js
index 875b7e491..a5f72d92c 100644
--- a/docs/build/html/searchindex.js
+++ b/docs/build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["cpp/ops", "dev/extensions", "examples/linear_regression", "examples/llama-inference", "examples/mlp", "index", "install", "python/_autosummary/mlx.core.Device", "python/_autosummary/mlx.core.Dtype", "python/_autosummary/mlx.core.Stream", "python/_autosummary/mlx.core.abs", "python/_autosummary/mlx.core.add", "python/_autosummary/mlx.core.all", "python/_autosummary/mlx.core.allclose", "python/_autosummary/mlx.core.any", "python/_autosummary/mlx.core.arange", "python/_autosummary/mlx.core.arccos", "python/_autosummary/mlx.core.arccosh", "python/_autosummary/mlx.core.arcsin", "python/_autosummary/mlx.core.arcsinh", "python/_autosummary/mlx.core.arctan", "python/_autosummary/mlx.core.arctanh", "python/_autosummary/mlx.core.argmax", "python/_autosummary/mlx.core.argmin", "python/_autosummary/mlx.core.argpartition", "python/_autosummary/mlx.core.argsort", "python/_autosummary/mlx.core.array", "python/_autosummary/mlx.core.array.T", "python/_autosummary/mlx.core.array.abs", "python/_autosummary/mlx.core.array.all", "python/_autosummary/mlx.core.array.any", "python/_autosummary/mlx.core.array.argmax", "python/_autosummary/mlx.core.array.argmin", "python/_autosummary/mlx.core.array.astype", "python/_autosummary/mlx.core.array.cos", "python/_autosummary/mlx.core.array.dtype", "python/_autosummary/mlx.core.array.exp", "python/_autosummary/mlx.core.array.item", "python/_autosummary/mlx.core.array.log", "python/_autosummary/mlx.core.array.log1p", "python/_autosummary/mlx.core.array.logsumexp", "python/_autosummary/mlx.core.array.max", "python/_autosummary/mlx.core.array.mean", "python/_autosummary/mlx.core.array.min", "python/_autosummary/mlx.core.array.ndim", "python/_autosummary/mlx.core.array.prod", "python/_autosummary/mlx.core.array.reciprocal", "python/_autosummary/mlx.core.array.reshape", "python/_autosummary/mlx.core.array.round", "python/_autosummary/mlx.core.array.rsqrt", "python/_autosummary/mlx.core.array.shape", "python/_autosummary/mlx.core.array.sin", "python/_autosummary/mlx.core.array.size", "python/_autosummary/mlx.core.array.split", "python/_autosummary/mlx.core.array.sqrt", "python/_autosummary/mlx.core.array.square", "python/_autosummary/mlx.core.array.sum", "python/_autosummary/mlx.core.array.tolist", "python/_autosummary/mlx.core.array.transpose", "python/_autosummary/mlx.core.array.var", "python/_autosummary/mlx.core.array_equal", "python/_autosummary/mlx.core.broadcast_to", "python/_autosummary/mlx.core.ceil", "python/_autosummary/mlx.core.clip", "python/_autosummary/mlx.core.concatenate", "python/_autosummary/mlx.core.conv1d", "python/_autosummary/mlx.core.conv2d", "python/_autosummary/mlx.core.convolve", "python/_autosummary/mlx.core.cos", "python/_autosummary/mlx.core.cosh", "python/_autosummary/mlx.core.default_device", "python/_autosummary/mlx.core.default_stream", "python/_autosummary/mlx.core.dequantize", "python/_autosummary/mlx.core.divide", "python/_autosummary/mlx.core.equal", "python/_autosummary/mlx.core.erf", "python/_autosummary/mlx.core.erfinv", "python/_autosummary/mlx.core.eval", "python/_autosummary/mlx.core.exp", "python/_autosummary/mlx.core.expand_dims", "python/_autosummary/mlx.core.eye", "python/_autosummary/mlx.core.fft.fft", "python/_autosummary/mlx.core.fft.fft2", "python/_autosummary/mlx.core.fft.fftn", "python/_autosummary/mlx.core.fft.ifft", "python/_autosummary/mlx.core.fft.ifft2", "python/_autosummary/mlx.core.fft.ifftn", "python/_autosummary/mlx.core.fft.irfft", "python/_autosummary/mlx.core.fft.irfft2", "python/_autosummary/mlx.core.fft.irfftn", "python/_autosummary/mlx.core.fft.rfft", "python/_autosummary/mlx.core.fft.rfft2", "python/_autosummary/mlx.core.fft.rfftn", "python/_autosummary/mlx.core.flatten", "python/_autosummary/mlx.core.floor", "python/_autosummary/mlx.core.floor_divide", "python/_autosummary/mlx.core.full", "python/_autosummary/mlx.core.grad", "python/_autosummary/mlx.core.greater", "python/_autosummary/mlx.core.greater_equal", "python/_autosummary/mlx.core.identity", "python/_autosummary/mlx.core.jvp", "python/_autosummary/mlx.core.less", "python/_autosummary/mlx.core.less_equal", "python/_autosummary/mlx.core.linalg.norm", "python/_autosummary/mlx.core.linspace", "python/_autosummary/mlx.core.load", "python/_autosummary/mlx.core.log", "python/_autosummary/mlx.core.log10", "python/_autosummary/mlx.core.log1p", "python/_autosummary/mlx.core.log2", "python/_autosummary/mlx.core.logaddexp", "python/_autosummary/mlx.core.logical_not", "python/_autosummary/mlx.core.logsumexp", "python/_autosummary/mlx.core.matmul", "python/_autosummary/mlx.core.max", "python/_autosummary/mlx.core.maximum", "python/_autosummary/mlx.core.mean", "python/_autosummary/mlx.core.min", "python/_autosummary/mlx.core.minimum", "python/_autosummary/mlx.core.moveaxis", "python/_autosummary/mlx.core.multiply", "python/_autosummary/mlx.core.negative", "python/_autosummary/mlx.core.new_stream", "python/_autosummary/mlx.core.ones", "python/_autosummary/mlx.core.ones_like", "python/_autosummary/mlx.core.pad", "python/_autosummary/mlx.core.partition", "python/_autosummary/mlx.core.prod", "python/_autosummary/mlx.core.quantize", "python/_autosummary/mlx.core.quantized_matmul", "python/_autosummary/mlx.core.random.bernoulli", "python/_autosummary/mlx.core.random.categorical", "python/_autosummary/mlx.core.random.gumbel", "python/_autosummary/mlx.core.random.key", "python/_autosummary/mlx.core.random.normal", "python/_autosummary/mlx.core.random.randint", "python/_autosummary/mlx.core.random.seed", "python/_autosummary/mlx.core.random.split", "python/_autosummary/mlx.core.random.truncated_normal", "python/_autosummary/mlx.core.random.uniform", "python/_autosummary/mlx.core.reciprocal", "python/_autosummary/mlx.core.repeat", "python/_autosummary/mlx.core.reshape", "python/_autosummary/mlx.core.round", "python/_autosummary/mlx.core.rsqrt", "python/_autosummary/mlx.core.save", "python/_autosummary/mlx.core.save_safetensors", "python/_autosummary/mlx.core.savez", "python/_autosummary/mlx.core.savez_compressed", "python/_autosummary/mlx.core.set_default_device", "python/_autosummary/mlx.core.set_default_stream", "python/_autosummary/mlx.core.sigmoid", "python/_autosummary/mlx.core.sign", "python/_autosummary/mlx.core.simplify", "python/_autosummary/mlx.core.sin", "python/_autosummary/mlx.core.sinh", "python/_autosummary/mlx.core.softmax", "python/_autosummary/mlx.core.sort", "python/_autosummary/mlx.core.split", "python/_autosummary/mlx.core.sqrt", "python/_autosummary/mlx.core.square", "python/_autosummary/mlx.core.squeeze", "python/_autosummary/mlx.core.stack", "python/_autosummary/mlx.core.stop_gradient", "python/_autosummary/mlx.core.subtract", "python/_autosummary/mlx.core.sum", "python/_autosummary/mlx.core.swapaxes", "python/_autosummary/mlx.core.take", "python/_autosummary/mlx.core.take_along_axis", "python/_autosummary/mlx.core.tan", "python/_autosummary/mlx.core.tanh", "python/_autosummary/mlx.core.tensordot", "python/_autosummary/mlx.core.transpose", "python/_autosummary/mlx.core.tri", "python/_autosummary/mlx.core.tril", "python/_autosummary/mlx.core.triu", "python/_autosummary/mlx.core.value_and_grad", "python/_autosummary/mlx.core.var", "python/_autosummary/mlx.core.vjp", "python/_autosummary/mlx.core.vmap", "python/_autosummary/mlx.core.where", "python/_autosummary/mlx.core.zeros", "python/_autosummary/mlx.core.zeros_like", "python/_autosummary/mlx.nn.value_and_grad", "python/_autosummary/mlx.optimizers.AdaDelta", "python/_autosummary/mlx.optimizers.Adagrad", "python/_autosummary/mlx.optimizers.Adam", "python/_autosummary/mlx.optimizers.AdamW", "python/_autosummary/mlx.optimizers.Adamax", "python/_autosummary/mlx.optimizers.Lion", "python/_autosummary/mlx.optimizers.Optimizer", "python/_autosummary/mlx.optimizers.OptimizerState", "python/_autosummary/mlx.optimizers.RMSprop", "python/_autosummary/mlx.optimizers.SGD", "python/_autosummary/mlx.utils.tree_flatten", "python/_autosummary/mlx.utils.tree_map", "python/_autosummary/mlx.utils.tree_unflatten", "python/array", "python/data_types", "python/devices_and_streams", "python/fft", "python/linalg", "python/nn", "python/nn/_autosummary/mlx.nn.ALiBi", "python/nn/_autosummary/mlx.nn.BatchNorm", "python/nn/_autosummary/mlx.nn.Conv1d", "python/nn/_autosummary/mlx.nn.Conv2d", "python/nn/_autosummary/mlx.nn.Dropout", "python/nn/_autosummary/mlx.nn.Dropout2d", "python/nn/_autosummary/mlx.nn.Dropout3d", "python/nn/_autosummary/mlx.nn.Embedding", "python/nn/_autosummary/mlx.nn.GELU", "python/nn/_autosummary/mlx.nn.GroupNorm", "python/nn/_autosummary/mlx.nn.InstanceNorm", "python/nn/_autosummary/mlx.nn.LayerNorm", "python/nn/_autosummary/mlx.nn.Linear", "python/nn/_autosummary/mlx.nn.Mish", "python/nn/_autosummary/mlx.nn.Module.apply", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules", "python/nn/_autosummary/mlx.nn.Module.children", "python/nn/_autosummary/mlx.nn.Module.eval", "python/nn/_autosummary/mlx.nn.Module.filter_and_map", "python/nn/_autosummary/mlx.nn.Module.freeze", "python/nn/_autosummary/mlx.nn.Module.leaf_modules", "python/nn/_autosummary/mlx.nn.Module.load_weights", "python/nn/_autosummary/mlx.nn.Module.modules", "python/nn/_autosummary/mlx.nn.Module.named_modules", "python/nn/_autosummary/mlx.nn.Module.parameters", "python/nn/_autosummary/mlx.nn.Module.save_weights", "python/nn/_autosummary/mlx.nn.Module.train", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters", "python/nn/_autosummary/mlx.nn.Module.training", "python/nn/_autosummary/mlx.nn.Module.unfreeze", "python/nn/_autosummary/mlx.nn.Module.update", "python/nn/_autosummary/mlx.nn.Module.update_modules", "python/nn/_autosummary/mlx.nn.MultiHeadAttention", "python/nn/_autosummary/mlx.nn.PReLU", "python/nn/_autosummary/mlx.nn.QuantizedLinear", "python/nn/_autosummary/mlx.nn.RMSNorm", "python/nn/_autosummary/mlx.nn.ReLU", "python/nn/_autosummary/mlx.nn.RoPE", "python/nn/_autosummary/mlx.nn.SELU", "python/nn/_autosummary/mlx.nn.Sequential", "python/nn/_autosummary/mlx.nn.SiLU", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding", "python/nn/_autosummary/mlx.nn.Step", "python/nn/_autosummary/mlx.nn.Transformer", "python/nn/_autosummary_functions/mlx.nn.gelu", "python/nn/_autosummary_functions/mlx.nn.gelu_approx", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss", "python/nn/_autosummary_functions/mlx.nn.mish", "python/nn/_autosummary_functions/mlx.nn.prelu", "python/nn/_autosummary_functions/mlx.nn.relu", "python/nn/_autosummary_functions/mlx.nn.selu", "python/nn/_autosummary_functions/mlx.nn.silu", "python/nn/_autosummary_functions/mlx.nn.step", "python/nn/functions", "python/nn/layers", "python/nn/losses", "python/nn/module", "python/ops", "python/optimizers", "python/random", "python/transforms", "python/tree_utils", "quick_start", "unified_memory", "using_streams"], "filenames": ["cpp/ops.rst", "dev/extensions.rst", "examples/linear_regression.rst", "examples/llama-inference.rst", "examples/mlp.rst", "index.rst", "install.rst", "python/_autosummary/mlx.core.Device.rst", "python/_autosummary/mlx.core.Dtype.rst", "python/_autosummary/mlx.core.Stream.rst", "python/_autosummary/mlx.core.abs.rst", "python/_autosummary/mlx.core.add.rst", "python/_autosummary/mlx.core.all.rst", "python/_autosummary/mlx.core.allclose.rst", "python/_autosummary/mlx.core.any.rst", "python/_autosummary/mlx.core.arange.rst", "python/_autosummary/mlx.core.arccos.rst", "python/_autosummary/mlx.core.arccosh.rst", "python/_autosummary/mlx.core.arcsin.rst", "python/_autosummary/mlx.core.arcsinh.rst", "python/_autosummary/mlx.core.arctan.rst", "python/_autosummary/mlx.core.arctanh.rst", "python/_autosummary/mlx.core.argmax.rst", "python/_autosummary/mlx.core.argmin.rst", "python/_autosummary/mlx.core.argpartition.rst", "python/_autosummary/mlx.core.argsort.rst", "python/_autosummary/mlx.core.array.rst", "python/_autosummary/mlx.core.array.T.rst", "python/_autosummary/mlx.core.array.abs.rst", "python/_autosummary/mlx.core.array.all.rst", "python/_autosummary/mlx.core.array.any.rst", "python/_autosummary/mlx.core.array.argmax.rst", "python/_autosummary/mlx.core.array.argmin.rst", "python/_autosummary/mlx.core.array.astype.rst", "python/_autosummary/mlx.core.array.cos.rst", "python/_autosummary/mlx.core.array.dtype.rst", "python/_autosummary/mlx.core.array.exp.rst", "python/_autosummary/mlx.core.array.item.rst", "python/_autosummary/mlx.core.array.log.rst", "python/_autosummary/mlx.core.array.log1p.rst", "python/_autosummary/mlx.core.array.logsumexp.rst", "python/_autosummary/mlx.core.array.max.rst", "python/_autosummary/mlx.core.array.mean.rst", "python/_autosummary/mlx.core.array.min.rst", "python/_autosummary/mlx.core.array.ndim.rst", "python/_autosummary/mlx.core.array.prod.rst", "python/_autosummary/mlx.core.array.reciprocal.rst", "python/_autosummary/mlx.core.array.reshape.rst", "python/_autosummary/mlx.core.array.round.rst", "python/_autosummary/mlx.core.array.rsqrt.rst", "python/_autosummary/mlx.core.array.shape.rst", "python/_autosummary/mlx.core.array.sin.rst", "python/_autosummary/mlx.core.array.size.rst", "python/_autosummary/mlx.core.array.split.rst", "python/_autosummary/mlx.core.array.sqrt.rst", "python/_autosummary/mlx.core.array.square.rst", "python/_autosummary/mlx.core.array.sum.rst", "python/_autosummary/mlx.core.array.tolist.rst", "python/_autosummary/mlx.core.array.transpose.rst", "python/_autosummary/mlx.core.array.var.rst", "python/_autosummary/mlx.core.array_equal.rst", "python/_autosummary/mlx.core.broadcast_to.rst", "python/_autosummary/mlx.core.ceil.rst", "python/_autosummary/mlx.core.clip.rst", "python/_autosummary/mlx.core.concatenate.rst", "python/_autosummary/mlx.core.conv1d.rst", "python/_autosummary/mlx.core.conv2d.rst", "python/_autosummary/mlx.core.convolve.rst", "python/_autosummary/mlx.core.cos.rst", "python/_autosummary/mlx.core.cosh.rst", "python/_autosummary/mlx.core.default_device.rst", "python/_autosummary/mlx.core.default_stream.rst", "python/_autosummary/mlx.core.dequantize.rst", "python/_autosummary/mlx.core.divide.rst", "python/_autosummary/mlx.core.equal.rst", "python/_autosummary/mlx.core.erf.rst", "python/_autosummary/mlx.core.erfinv.rst", "python/_autosummary/mlx.core.eval.rst", "python/_autosummary/mlx.core.exp.rst", "python/_autosummary/mlx.core.expand_dims.rst", "python/_autosummary/mlx.core.eye.rst", "python/_autosummary/mlx.core.fft.fft.rst", "python/_autosummary/mlx.core.fft.fft2.rst", "python/_autosummary/mlx.core.fft.fftn.rst", "python/_autosummary/mlx.core.fft.ifft.rst", "python/_autosummary/mlx.core.fft.ifft2.rst", "python/_autosummary/mlx.core.fft.ifftn.rst", "python/_autosummary/mlx.core.fft.irfft.rst", "python/_autosummary/mlx.core.fft.irfft2.rst", "python/_autosummary/mlx.core.fft.irfftn.rst", "python/_autosummary/mlx.core.fft.rfft.rst", "python/_autosummary/mlx.core.fft.rfft2.rst", "python/_autosummary/mlx.core.fft.rfftn.rst", "python/_autosummary/mlx.core.flatten.rst", "python/_autosummary/mlx.core.floor.rst", "python/_autosummary/mlx.core.floor_divide.rst", "python/_autosummary/mlx.core.full.rst", "python/_autosummary/mlx.core.grad.rst", "python/_autosummary/mlx.core.greater.rst", "python/_autosummary/mlx.core.greater_equal.rst", "python/_autosummary/mlx.core.identity.rst", "python/_autosummary/mlx.core.jvp.rst", "python/_autosummary/mlx.core.less.rst", "python/_autosummary/mlx.core.less_equal.rst", "python/_autosummary/mlx.core.linalg.norm.rst", "python/_autosummary/mlx.core.linspace.rst", "python/_autosummary/mlx.core.load.rst", "python/_autosummary/mlx.core.log.rst", "python/_autosummary/mlx.core.log10.rst", "python/_autosummary/mlx.core.log1p.rst", "python/_autosummary/mlx.core.log2.rst", "python/_autosummary/mlx.core.logaddexp.rst", "python/_autosummary/mlx.core.logical_not.rst", "python/_autosummary/mlx.core.logsumexp.rst", "python/_autosummary/mlx.core.matmul.rst", "python/_autosummary/mlx.core.max.rst", "python/_autosummary/mlx.core.maximum.rst", "python/_autosummary/mlx.core.mean.rst", "python/_autosummary/mlx.core.min.rst", "python/_autosummary/mlx.core.minimum.rst", "python/_autosummary/mlx.core.moveaxis.rst", "python/_autosummary/mlx.core.multiply.rst", "python/_autosummary/mlx.core.negative.rst", "python/_autosummary/mlx.core.new_stream.rst", "python/_autosummary/mlx.core.ones.rst", "python/_autosummary/mlx.core.ones_like.rst", "python/_autosummary/mlx.core.pad.rst", "python/_autosummary/mlx.core.partition.rst", "python/_autosummary/mlx.core.prod.rst", "python/_autosummary/mlx.core.quantize.rst", "python/_autosummary/mlx.core.quantized_matmul.rst", "python/_autosummary/mlx.core.random.bernoulli.rst", "python/_autosummary/mlx.core.random.categorical.rst", "python/_autosummary/mlx.core.random.gumbel.rst", "python/_autosummary/mlx.core.random.key.rst", "python/_autosummary/mlx.core.random.normal.rst", "python/_autosummary/mlx.core.random.randint.rst", "python/_autosummary/mlx.core.random.seed.rst", "python/_autosummary/mlx.core.random.split.rst", "python/_autosummary/mlx.core.random.truncated_normal.rst", "python/_autosummary/mlx.core.random.uniform.rst", "python/_autosummary/mlx.core.reciprocal.rst", "python/_autosummary/mlx.core.repeat.rst", "python/_autosummary/mlx.core.reshape.rst", "python/_autosummary/mlx.core.round.rst", "python/_autosummary/mlx.core.rsqrt.rst", "python/_autosummary/mlx.core.save.rst", "python/_autosummary/mlx.core.save_safetensors.rst", "python/_autosummary/mlx.core.savez.rst", "python/_autosummary/mlx.core.savez_compressed.rst", "python/_autosummary/mlx.core.set_default_device.rst", "python/_autosummary/mlx.core.set_default_stream.rst", "python/_autosummary/mlx.core.sigmoid.rst", "python/_autosummary/mlx.core.sign.rst", "python/_autosummary/mlx.core.simplify.rst", "python/_autosummary/mlx.core.sin.rst", "python/_autosummary/mlx.core.sinh.rst", "python/_autosummary/mlx.core.softmax.rst", "python/_autosummary/mlx.core.sort.rst", "python/_autosummary/mlx.core.split.rst", "python/_autosummary/mlx.core.sqrt.rst", "python/_autosummary/mlx.core.square.rst", "python/_autosummary/mlx.core.squeeze.rst", "python/_autosummary/mlx.core.stack.rst", "python/_autosummary/mlx.core.stop_gradient.rst", "python/_autosummary/mlx.core.subtract.rst", "python/_autosummary/mlx.core.sum.rst", "python/_autosummary/mlx.core.swapaxes.rst", "python/_autosummary/mlx.core.take.rst", "python/_autosummary/mlx.core.take_along_axis.rst", "python/_autosummary/mlx.core.tan.rst", "python/_autosummary/mlx.core.tanh.rst", "python/_autosummary/mlx.core.tensordot.rst", "python/_autosummary/mlx.core.transpose.rst", "python/_autosummary/mlx.core.tri.rst", "python/_autosummary/mlx.core.tril.rst", "python/_autosummary/mlx.core.triu.rst", "python/_autosummary/mlx.core.value_and_grad.rst", "python/_autosummary/mlx.core.var.rst", "python/_autosummary/mlx.core.vjp.rst", "python/_autosummary/mlx.core.vmap.rst", "python/_autosummary/mlx.core.where.rst", "python/_autosummary/mlx.core.zeros.rst", "python/_autosummary/mlx.core.zeros_like.rst", "python/_autosummary/mlx.nn.value_and_grad.rst", "python/_autosummary/mlx.optimizers.AdaDelta.rst", "python/_autosummary/mlx.optimizers.Adagrad.rst", "python/_autosummary/mlx.optimizers.Adam.rst", "python/_autosummary/mlx.optimizers.AdamW.rst", "python/_autosummary/mlx.optimizers.Adamax.rst", "python/_autosummary/mlx.optimizers.Lion.rst", "python/_autosummary/mlx.optimizers.Optimizer.rst", "python/_autosummary/mlx.optimizers.OptimizerState.rst", "python/_autosummary/mlx.optimizers.RMSprop.rst", "python/_autosummary/mlx.optimizers.SGD.rst", "python/_autosummary/mlx.utils.tree_flatten.rst", "python/_autosummary/mlx.utils.tree_map.rst", "python/_autosummary/mlx.utils.tree_unflatten.rst", "python/array.rst", "python/data_types.rst", "python/devices_and_streams.rst", "python/fft.rst", "python/linalg.rst", "python/nn.rst", "python/nn/_autosummary/mlx.nn.ALiBi.rst", "python/nn/_autosummary/mlx.nn.BatchNorm.rst", "python/nn/_autosummary/mlx.nn.Conv1d.rst", "python/nn/_autosummary/mlx.nn.Conv2d.rst", "python/nn/_autosummary/mlx.nn.Dropout.rst", "python/nn/_autosummary/mlx.nn.Dropout2d.rst", "python/nn/_autosummary/mlx.nn.Dropout3d.rst", "python/nn/_autosummary/mlx.nn.Embedding.rst", "python/nn/_autosummary/mlx.nn.GELU.rst", "python/nn/_autosummary/mlx.nn.GroupNorm.rst", "python/nn/_autosummary/mlx.nn.InstanceNorm.rst", "python/nn/_autosummary/mlx.nn.LayerNorm.rst", "python/nn/_autosummary/mlx.nn.Linear.rst", "python/nn/_autosummary/mlx.nn.Mish.rst", "python/nn/_autosummary/mlx.nn.Module.apply.rst", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules.rst", "python/nn/_autosummary/mlx.nn.Module.children.rst", "python/nn/_autosummary/mlx.nn.Module.eval.rst", "python/nn/_autosummary/mlx.nn.Module.filter_and_map.rst", "python/nn/_autosummary/mlx.nn.Module.freeze.rst", "python/nn/_autosummary/mlx.nn.Module.leaf_modules.rst", "python/nn/_autosummary/mlx.nn.Module.load_weights.rst", "python/nn/_autosummary/mlx.nn.Module.modules.rst", "python/nn/_autosummary/mlx.nn.Module.named_modules.rst", "python/nn/_autosummary/mlx.nn.Module.parameters.rst", "python/nn/_autosummary/mlx.nn.Module.save_weights.rst", "python/nn/_autosummary/mlx.nn.Module.train.rst", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters.rst", "python/nn/_autosummary/mlx.nn.Module.training.rst", "python/nn/_autosummary/mlx.nn.Module.unfreeze.rst", "python/nn/_autosummary/mlx.nn.Module.update.rst", "python/nn/_autosummary/mlx.nn.Module.update_modules.rst", "python/nn/_autosummary/mlx.nn.MultiHeadAttention.rst", "python/nn/_autosummary/mlx.nn.PReLU.rst", "python/nn/_autosummary/mlx.nn.QuantizedLinear.rst", "python/nn/_autosummary/mlx.nn.RMSNorm.rst", "python/nn/_autosummary/mlx.nn.ReLU.rst", "python/nn/_autosummary/mlx.nn.RoPE.rst", "python/nn/_autosummary/mlx.nn.SELU.rst", "python/nn/_autosummary/mlx.nn.Sequential.rst", "python/nn/_autosummary/mlx.nn.SiLU.rst", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.rst", "python/nn/_autosummary/mlx.nn.Step.rst", "python/nn/_autosummary/mlx.nn.Transformer.rst", "python/nn/_autosummary_functions/mlx.nn.gelu.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_approx.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.rst", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.rst", "python/nn/_autosummary_functions/mlx.nn.mish.rst", "python/nn/_autosummary_functions/mlx.nn.prelu.rst", "python/nn/_autosummary_functions/mlx.nn.relu.rst", "python/nn/_autosummary_functions/mlx.nn.selu.rst", "python/nn/_autosummary_functions/mlx.nn.silu.rst", "python/nn/_autosummary_functions/mlx.nn.step.rst", "python/nn/functions.rst", "python/nn/layers.rst", "python/nn/losses.rst", "python/nn/module.rst", "python/ops.rst", "python/optimizers.rst", "python/random.rst", "python/transforms.rst", "python/tree_utils.rst", "quick_start.rst", "unified_memory.rst", "using_streams.rst"], "titles": ["Operations", "Developer Documentation", "Linear Regression", "LLM inference", "Multi-Layer Perceptron", "MLX", "Build and Install", "mlx.core.Device", "mlx.core.Dtype", "mlx.core.Stream", "mlx.core.abs", "mlx.core.add", "mlx.core.all", "mlx.core.allclose", "mlx.core.any", "mlx.core.arange", "mlx.core.arccos", "mlx.core.arccosh", "mlx.core.arcsin", "mlx.core.arcsinh", "mlx.core.arctan", "mlx.core.arctanh", "mlx.core.argmax", "mlx.core.argmin", "mlx.core.argpartition", "mlx.core.argsort", "mlx.core.array", "mlx.core.array.T", "mlx.core.array.abs", "mlx.core.array.all", "mlx.core.array.any", "mlx.core.array.argmax", "mlx.core.array.argmin", "mlx.core.array.astype", "mlx.core.array.cos", "mlx.core.array.dtype", "mlx.core.array.exp", "mlx.core.array.item", "mlx.core.array.log", "mlx.core.array.log1p", "mlx.core.array.logsumexp", "mlx.core.array.max", "mlx.core.array.mean", "mlx.core.array.min", "mlx.core.array.ndim", "mlx.core.array.prod", "mlx.core.array.reciprocal", "mlx.core.array.reshape", "mlx.core.array.round", "mlx.core.array.rsqrt", "mlx.core.array.shape", "mlx.core.array.sin", "mlx.core.array.size", "mlx.core.array.split", "mlx.core.array.sqrt", "mlx.core.array.square", "mlx.core.array.sum", "mlx.core.array.tolist", "mlx.core.array.transpose", "mlx.core.array.var", "mlx.core.array_equal", "mlx.core.broadcast_to", "mlx.core.ceil", "mlx.core.clip", "mlx.core.concatenate", "mlx.core.conv1d", "mlx.core.conv2d", "mlx.core.convolve", "mlx.core.cos", "mlx.core.cosh", "mlx.core.default_device", "mlx.core.default_stream", "mlx.core.dequantize", "mlx.core.divide", "mlx.core.equal", "mlx.core.erf", "mlx.core.erfinv", "mlx.core.eval", "mlx.core.exp", "mlx.core.expand_dims", "mlx.core.eye", "mlx.core.fft.fft", "mlx.core.fft.fft2", "mlx.core.fft.fftn", "mlx.core.fft.ifft", "mlx.core.fft.ifft2", "mlx.core.fft.ifftn", "mlx.core.fft.irfft", "mlx.core.fft.irfft2", "mlx.core.fft.irfftn", "mlx.core.fft.rfft", "mlx.core.fft.rfft2", "mlx.core.fft.rfftn", "mlx.core.flatten", "mlx.core.floor", "mlx.core.floor_divide", "mlx.core.full", "mlx.core.grad", "mlx.core.greater", "mlx.core.greater_equal", "mlx.core.identity", "mlx.core.jvp", "mlx.core.less", "mlx.core.less_equal", "mlx.core.linalg.norm", "mlx.core.linspace", "mlx.core.load", "mlx.core.log", "mlx.core.log10", "mlx.core.log1p", "mlx.core.log2", "mlx.core.logaddexp", "mlx.core.logical_not", "mlx.core.logsumexp", "mlx.core.matmul", "mlx.core.max", "mlx.core.maximum", "mlx.core.mean", "mlx.core.min", "mlx.core.minimum", "mlx.core.moveaxis", "mlx.core.multiply", "mlx.core.negative", "mlx.core.new_stream", "mlx.core.ones", "mlx.core.ones_like", "mlx.core.pad", "mlx.core.partition", "mlx.core.prod", "mlx.core.quantize", "mlx.core.quantized_matmul", "mlx.core.random.bernoulli", "mlx.core.random.categorical", "mlx.core.random.gumbel", "mlx.core.random.key", "mlx.core.random.normal", "mlx.core.random.randint", "mlx.core.random.seed", "mlx.core.random.split", "mlx.core.random.truncated_normal", "mlx.core.random.uniform", "mlx.core.reciprocal", "mlx.core.repeat", "mlx.core.reshape", "mlx.core.round", "mlx.core.rsqrt", "mlx.core.save", "mlx.core.save_safetensors", "mlx.core.savez", "mlx.core.savez_compressed", "mlx.core.set_default_device", "mlx.core.set_default_stream", "mlx.core.sigmoid", "mlx.core.sign", "mlx.core.simplify", "mlx.core.sin", "mlx.core.sinh", "mlx.core.softmax", "mlx.core.sort", "mlx.core.split", "mlx.core.sqrt", "mlx.core.square", "mlx.core.squeeze", "mlx.core.stack", "mlx.core.stop_gradient", "mlx.core.subtract", "mlx.core.sum", "mlx.core.swapaxes", "mlx.core.take", "mlx.core.take_along_axis", "mlx.core.tan", "mlx.core.tanh", "mlx.core.tensordot", "mlx.core.transpose", "mlx.core.tri", "mlx.core.tril", "mlx.core.triu", "mlx.core.value_and_grad", "mlx.core.var", "mlx.core.vjp", "mlx.core.vmap", "mlx.core.where", "mlx.core.zeros", "mlx.core.zeros_like", "mlx.nn.value_and_grad", "mlx.optimizers.AdaDelta", "mlx.optimizers.Adagrad", "mlx.optimizers.Adam", "mlx.optimizers.AdamW", "mlx.optimizers.Adamax", "mlx.optimizers.Lion", "mlx.optimizers.Optimizer", "mlx.optimizers.OptimizerState", "mlx.optimizers.RMSprop", "mlx.optimizers.SGD", "mlx.utils.tree_flatten", "mlx.utils.tree_map", "mlx.utils.tree_unflatten", "Array", "Data Types", "Devices and Streams", "FFT", "Linear Algebra", "Neural Networks", "mlx.nn.ALiBi", "mlx.nn.BatchNorm", "mlx.nn.Conv1d", "mlx.nn.Conv2d", "mlx.nn.Dropout", "mlx.nn.Dropout2d", "mlx.nn.Dropout3d", "mlx.nn.Embedding", "mlx.nn.GELU", "mlx.nn.GroupNorm", "mlx.nn.InstanceNorm", "mlx.nn.LayerNorm", "mlx.nn.Linear", "mlx.nn.Mish", "mlx.nn.Module.apply", "mlx.nn.Module.apply_to_modules", "mlx.nn.Module.children", "mlx.nn.Module.eval", "mlx.nn.Module.filter_and_map", "mlx.nn.Module.freeze", "mlx.nn.Module.leaf_modules", "mlx.nn.Module.load_weights", "mlx.nn.Module.modules", "mlx.nn.Module.named_modules", "mlx.nn.Module.parameters", "mlx.nn.Module.save_weights", "mlx.nn.Module.train", "mlx.nn.Module.trainable_parameters", "mlx.nn.Module.training", "mlx.nn.Module.unfreeze", "mlx.nn.Module.update", "mlx.nn.Module.update_modules", "mlx.nn.MultiHeadAttention", "mlx.nn.PReLU", "mlx.nn.QuantizedLinear", "mlx.nn.RMSNorm", "mlx.nn.ReLU", "mlx.nn.RoPE", "mlx.nn.SELU", "mlx.nn.Sequential", "mlx.nn.SiLU", "mlx.nn.SinusoidalPositionalEncoding", "mlx.nn.Step", "mlx.nn.Transformer", "mlx.nn.gelu", "mlx.nn.gelu_approx", "mlx.nn.gelu_fast_approx", "mlx.nn.losses.binary_cross_entropy", "mlx.nn.losses.cross_entropy", "mlx.nn.losses.hinge_loss", "mlx.nn.losses.huber_loss", "mlx.nn.losses.kl_div_loss", "mlx.nn.losses.l1_loss", "mlx.nn.losses.log_cosh_loss", "mlx.nn.losses.mse_loss", "mlx.nn.losses.nll_loss", "mlx.nn.losses.smooth_l1_loss", "mlx.nn.losses.triplet_loss", "mlx.nn.mish", "mlx.nn.prelu", "mlx.nn.relu", "mlx.nn.selu", "mlx.nn.silu", "mlx.nn.step", "Functions", "Layers", "Loss Functions", "Module", "Operations", "Optimizers", "Random", "Transforms", "Tree Utils", "Quick Start Guide", "Unified Memory", "Using Streams"], "terms": {"mlx": [1, 2, 3, 4, 6, 203, 271, 273, 274, 276, 277, 278], "provid": [1, 3, 72, 97, 172, 177, 196, 203, 218, 223, 225, 233, 234, 235, 238, 247, 268, 271, 279], "open": [1, 15, 136, 140], "flexibl": [1, 5, 235], "which": [1, 3, 4, 5, 6, 15, 33, 77, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 97, 101, 104, 106, 129, 132, 133, 142, 143, 146, 147, 148, 149, 162, 163, 168, 177, 179, 180, 209, 210, 212, 218, 222, 241, 252, 254, 260, 274, 278, 279], "user": [1, 3, 203], "mai": [1, 104, 209], "add": [1, 3, 79, 111, 126, 129, 206, 207, 278], "special": 1, "without": [1, 3, 5, 164, 236, 268, 276, 278], "much": [1, 3], "hassl": 1, "while": [1, 3, 6, 143, 241], "librari": [1, 6, 203], "suppli": 1, "effici": [1, 3, 5, 209, 241, 277], "can": [1, 3, 5, 6, 11, 15, 47, 58, 73, 74, 77, 98, 99, 102, 103, 104, 111, 116, 119, 121, 131, 132, 136, 139, 140, 165, 177, 203, 211, 222, 233, 243, 271, 273, 274, 276, 277, 278, 279], "compos": [1, 5, 203, 277], "ani": [1, 3, 5, 15, 154, 195, 196, 197, 203, 212, 218, 219, 222, 238, 247, 276, 277, 278], "number": [1, 15, 52, 66, 72, 80, 97, 100, 101, 105, 126, 129, 130, 132, 135, 138, 140, 142, 144, 154, 172, 174, 177, 179, 180, 203, 205, 206, 207, 209, 210, 213, 214, 236, 237, 247, 274, 279], "applic": [1, 6], "aris": 1, "case": [1, 3, 83, 86, 87, 89, 90, 91, 92, 93, 114, 143, 162, 209, 242, 246, 260, 265, 267, 277, 278, 279], "where": [1, 4, 80, 129, 177, 180, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 216, 222, 237, 239, 242, 244, 246, 248, 249, 250, 263, 265, 266, 267], "new": [1, 4, 61, 120, 143, 163, 173, 196, 236, 271, 273], "function": [1, 2, 3, 4, 5, 13, 75, 76, 77, 97, 101, 104, 114, 146, 147, 152, 154, 177, 179, 180, 184, 196, 203, 212, 217, 219, 223, 233, 237, 243, 246, 247, 248, 249, 250, 262, 267, 273, 274, 276], "highli": [1, 6], "optim": [1, 2, 4, 5, 234], "ar": [1, 2, 3, 4, 5, 6, 13, 15, 60, 61, 63, 67, 80, 82, 83, 85, 86, 88, 89, 91, 92, 97, 101, 104, 114, 126, 127, 129, 130, 131, 132, 133, 136, 139, 140, 148, 149, 162, 163, 168, 177, 179, 180, 190, 195, 196, 205, 206, 207, 208, 209, 210, 213, 214, 215, 216, 225, 236, 238, 268, 271, 276, 277, 278], "need": [1, 3, 4, 5, 60, 129, 203, 234, 235, 245, 247, 274, 277, 278], "For": [1, 3, 6, 104, 129, 147, 197, 203, 205, 209, 218, 223, 230, 233, 238, 241, 245, 274, 277, 278], "you": [1, 3, 4, 5, 6, 203, 245, 247, 274, 278], "design": [1, 2, 5, 274, 278], "your": [1, 3, 6, 271], "own": [1, 6], "link": [1, 6], "top": [1, 216], "core": [1, 2, 3, 4, 203, 205, 214, 225, 228, 231, 251, 271, 273, 277], "we": [1, 2, 3, 4, 72, 129, 130, 188, 190, 203, 211, 243, 274, 276, 278], "inner": 1, "work": [1, 3, 6], "go": [1, 3], "over": [1, 3, 4, 12, 14, 22, 23, 24, 25, 65, 66, 83, 86, 89, 92, 104, 105, 113, 115, 117, 118, 127, 128, 145, 157, 158, 166, 172, 178, 205, 206, 207, 213, 215, 239, 252], "simpl": [1, 3, 4, 203, 211, 268], "learn": [1, 2, 4, 5, 185, 186, 187, 188, 189, 190, 193, 194, 205, 213, 214, 215, 237, 239], "step": [1, 3, 4, 15, 203], "involv": [1, 273], "ad": [1, 2, 6, 185, 186, 187, 188, 189, 193, 214, 271], "let": [1, 2, 3], "s": [1, 2, 3, 4, 35, 44, 72, 82, 83, 85, 86, 88, 89, 91, 92, 97, 104, 106, 117, 129, 132, 144, 147, 177, 178, 180, 184, 191, 203, 222, 223, 225, 229, 233, 273, 274, 277, 278], "sai": [1, 3], "would": [1, 3, 278], "like": [1, 3, 5, 125, 183, 210, 257, 277, 278], "an": [1, 3, 4, 6, 8, 12, 14, 26, 61, 65, 66, 77, 80, 93, 96, 100, 104, 115, 118, 120, 124, 125, 126, 128, 129, 130, 142, 143, 144, 159, 162, 167, 168, 169, 172, 174, 180, 182, 183, 185, 191, 192, 195, 196, 203, 208, 213, 215, 216, 218, 236, 237, 238, 247, 249, 263, 274, 276, 277, 278, 279], "take": [1, 3, 4, 97, 101, 116, 119, 125, 130, 169, 177, 179, 180, 183, 236, 274, 278, 279], "two": [1, 11, 13, 60, 73, 74, 82, 85, 91, 98, 99, 102, 103, 111, 114, 116, 119, 121, 167, 238, 278], "arrai": [1, 3, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 203, 205, 218, 225, 228, 231, 237, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 267, 271, 277, 278], "x": [1, 2, 3, 4, 75, 100, 104, 130, 133, 144, 148, 152, 154, 175, 176, 181, 190, 196, 203, 205, 212, 213, 214, 215, 216, 217, 218, 237, 239, 240, 242, 244, 245, 246, 248, 249, 250, 260, 262, 263, 264, 265, 266, 267, 271, 273, 277, 278], "y": [1, 2, 3, 4, 154, 181, 186, 203, 205, 209, 213, 214, 215, 216, 239, 253, 260, 273], "scale": [1, 3, 72, 129, 130, 209, 210, 236, 241, 242, 245, 265], "them": [1, 3, 203, 223, 233, 278], "both": [1, 11, 73, 74, 98, 99, 102, 103, 104, 111, 116, 119, 121, 132, 165, 214, 273, 277, 278], "some": [1, 2, 3, 4, 223, 233], "coeffic": [], "alpha": [1, 129, 188, 193, 242, 261, 263, 265], "beta": [1, 72, 129, 187, 188, 189, 190, 205, 213, 214, 215, 260], "respect": [1, 2, 4, 97, 129, 177, 196, 203, 205, 212, 213, 214, 215, 271, 277], "togeth": [1, 4, 129, 196], "get": [1, 2, 4, 66, 134, 192, 203, 278], "z": [1, 154], "well": [1, 3, 203, 223, 233, 236], "veri": [1, 3, 236, 278], "easili": 1, "do": [1, 3, 6, 188, 203, 224, 233, 271], "just": [1, 4], "write": [1, 3, 203], "out": [1, 6, 209, 210, 230], "follow": [1, 3, 4, 5, 6, 15, 67, 72, 104, 129, 185, 186, 187, 188, 189, 190, 194, 203, 249, 250, 255, 274, 278], "import": [1, 2, 3, 4, 6, 104, 148, 154, 177, 195, 196, 197, 203, 205, 214, 225, 251, 271, 277], "mx": [1, 2, 3, 4, 104, 148, 154, 177, 203, 205, 214, 218, 225, 240, 251, 255, 264, 271, 273, 274, 277, 278, 279], "def": [1, 2, 3, 4, 154, 177, 203, 271, 278], "simple_axpbi": 1, "float": [1, 13, 15, 57, 95, 96, 104, 130, 131, 136, 139, 140, 185, 186, 187, 188, 189, 190, 193, 194, 199, 205, 208, 209, 210, 213, 214, 215, 218, 239, 241, 245, 246, 247, 252, 254, 260, 261, 267], "return": [1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 37, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 195, 196, 197, 203, 220, 222, 224, 226, 227, 228, 231, 238, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 271, 276, 278], "thi": [1, 3, 4, 6, 12, 13, 14, 15, 22, 23, 24, 25, 77, 101, 104, 111, 113, 114, 115, 117, 118, 127, 128, 132, 154, 157, 158, 159, 166, 168, 178, 203, 208, 209, 210, 219, 220, 222, 223, 226, 227, 228, 231, 233, 234, 235, 236, 238, 246, 249, 250, 257, 267, 271, 276], "perform": [1, 3, 5, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 114, 130, 144, 157, 168, 203, 213, 247, 278], "leav": [1, 196], "differenti": [1, 5], "howev": [1, 203, 212, 213, 274], "vector": [1, 2, 5, 101, 104, 168, 179, 180, 211, 277], "math": [1, 3, 261], "often": [1, 210], "realiz": 1, "axpbi": 1, "routin": 1, "defin": [1, 2, 3, 4, 6, 104, 130, 192, 195], "same": [1, 3, 6, 60, 61, 66, 67, 87, 90, 91, 92, 97, 101, 126, 132, 144, 179, 181, 203, 205, 208, 213, 214, 238, 261, 271, 274, 278], "realli": 1, "part": 1, "doe": [1, 3, 6, 203], "fast": [1, 154, 212, 250, 278], "so": [1, 3, 6, 97, 154, 177, 208, 273, 278], "decid": [1, 196, 222], "want": [1, 3, 278], "reli": 1, "acceler": [1, 205], "framework": [1, 5], "continu": 1, "impos": 1, "our": [1, 3, 4, 185, 186, 187, 189, 190, 243], "assumpt": 1, "also": [1, 3, 4, 5, 11, 73, 74, 83, 86, 89, 92, 98, 99, 102, 103, 111, 116, 119, 121, 129, 165, 184, 192, 203, 222, 234, 236, 238, 242, 244, 248, 265, 266, 268, 273, 277, 279], "assum": [1, 3, 196, 203, 213], "how": [1, 3, 4, 203, 206, 207, 211, 278], "gradient": [1, 2, 4, 97, 164, 177, 184, 185, 187, 188, 189, 190, 194, 203, 223, 234, 238, 257, 271, 273, 277], "ins": 1, "what": [1, 3, 196], "coincid": 1, "right": [1, 129, 212, 249, 250, 254, 261], "place": [1, 3, 144], "cours": 1, "The": [1, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 35, 44, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 147, 152, 153, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 199, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216, 219, 225, 234, 235, 236, 238, 239, 241, 243, 245, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 271, 273, 277, 278, 279], "structur": [1, 77], "from": [1, 3, 4, 5, 72, 88, 89, 91, 92, 96, 104, 106, 114, 125, 129, 131, 132, 133, 134, 136, 139, 148, 162, 164, 165, 168, 169, 181, 183, 195, 196, 197, 203, 216, 223, 225, 236, 260, 276, 277, 278], "frontend": 1, "api": 1, "redirect": 1, "when": [1, 3, 5, 6, 104, 206, 207, 255, 260, 271, 274, 278], "appropri": 1, "fallback": 1, "metal": 1, "vjp": [1, 277], "jvp": [1, 277], "In": [1, 3, 4, 114, 129, 185, 186, 187, 189, 190, 196, 203, 209, 213, 271, 276, 278], "one": [1, 3, 6, 57, 63, 66, 79, 80, 104, 109, 114, 130, 132, 162, 165, 233, 278], "sentenc": 1, "comput": [1, 2, 3, 4, 5, 6, 72, 97, 101, 104, 111, 117, 129, 154, 157, 164, 172, 177, 178, 179, 184, 185, 187, 188, 189, 190, 203, 205, 213, 214, 215, 223, 234, 238, 239, 241, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 273, 277, 278], "graph": [1, 3, 4, 5, 77, 146, 147, 154], "rule": 1, "evalu": [1, 3, 4, 77, 101, 146, 147, 179, 203, 221, 230, 271, 273, 277], "said": [1, 3], "start": [1, 2, 3, 5, 6, 15, 105, 159, 278], "discuss": 1, "more": [1, 4, 8, 57, 114, 147, 203, 205, 209, 241, 245, 274, 278], "detail": [1, 8, 185, 186, 187, 189, 190, 203, 209, 241, 245], "thei": [1, 2, 3, 67, 190, 243, 253, 271, 276, 277, 278], "c": [1, 3, 104, 199, 205, 206, 207, 209, 210, 214, 277, 278], "scalar": [1, 11, 13, 26, 37, 57, 60, 61, 63, 73, 74, 95, 96, 97, 98, 99, 102, 103, 104, 105, 111, 112, 114, 116, 119, 121, 126, 136, 139, 140, 165, 177, 181, 184, 261, 277], "sum": [1, 2, 11, 104, 113, 157, 172, 203, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "elementwis": [], "numpi": [1, 3, 4, 5, 11, 13, 15, 61, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165, 277], "style": [1, 11, 13, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165], "broadcast": [1, 11, 13, 61, 63, 73, 74, 96, 98, 99, 102, 103, 111, 114, 116, 119, 121, 131, 132, 139, 140, 165, 169, 181, 236], "between": [1, 5, 63, 247, 253, 254, 257, 278], "input": [1, 2, 3, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 104, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 125, 126, 127, 128, 129, 130, 138, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 175, 176, 177, 178, 180, 181, 183, 205, 206, 207, 209, 210, 211, 213, 214, 215, 216, 236, 238, 239, 241, 246, 247, 251, 253, 254, 255, 257, 259, 261, 267, 277], "upcast": 1, "const": 1, "factor": [1, 252], "streamordevic": 1, "stream": [1, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 151, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 181, 182, 183, 278], "schedul": [1, 278], "itself": 1, "call": [1, 3, 4, 27, 95, 203, 211, 223, 233, 243, 271, 273], "other": [1, 3, 104, 190, 203, 224, 271, 277], "within": [1, 24], "simplest": [1, 203], "wai": [1, 3, 6, 203], "about": [1, 3, 4, 278], "term": [1, 185, 186, 187, 188, 189, 193], "exist": [1, 3, 223, 233], "auto": [1, 6], "ax": [1, 12, 14, 22, 23, 58, 79, 82, 83, 85, 86, 88, 89, 91, 92, 104, 113, 115, 117, 118, 126, 128, 157, 162, 166, 167, 172, 173, 178], "multipli": [1, 129, 130, 208, 245], "earlier": 1, "goal": 1, "themselv": 1, "contain": [1, 3, 50, 77, 87, 88, 89, 104, 112, 129, 159, 181, 203, 222, 224, 225, 247, 271], "act": [1, 257], "data": [1, 4, 5, 8, 15, 80, 90, 91, 96, 100, 105, 124, 139, 174, 182, 210], "nor": [1, 97, 177], "rather": [1, 278], "easi": [1, 203], "interfac": 1, "block": [1, 3, 247], "A": [1, 3, 5, 6, 50, 60, 97, 101, 104, 106, 113, 114, 129, 131, 132, 133, 135, 136, 139, 140, 159, 163, 177, 179, 180, 184, 187, 189, 195, 196, 197, 203, 205, 209, 213, 214, 215, 217, 222, 226, 227, 234, 235, 239, 243, 245, 247, 250, 261, 262, 271, 273], "It": [1, 3, 6, 97, 177, 189, 191, 203, 235, 238], "creat": [1, 3, 6, 80, 100, 203, 271, 273], "output": [1, 3, 6, 12, 13, 14, 15, 22, 23, 24, 61, 80, 87, 90, 91, 92, 96, 97, 100, 104, 105, 113, 115, 117, 118, 124, 125, 127, 128, 131, 132, 133, 135, 136, 139, 140, 148, 149, 157, 162, 166, 169, 174, 177, 178, 179, 180, 181, 182, 183, 205, 206, 207, 214, 216, 236, 238, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 277, 278], "given": [1, 12, 14, 24, 61, 63, 64, 72, 77, 79, 81, 82, 83, 84, 85, 86, 90, 91, 92, 96, 104, 113, 115, 117, 118, 128, 136, 144, 157, 159, 166, 174, 175, 176, 178, 208, 222, 236], "set": [1, 3, 4, 6, 192, 212, 216, 221, 223, 230, 233, 234, 238, 241, 246, 261, 267, 271, 274], "further": [1, 6], "class": [1, 3, 4, 7, 8, 9, 26, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 271], "under": [1, 104], "These": [1, 169, 278], "word": 1, "bit": [1, 72, 129, 130, 199, 218, 238], "abstract": 1, "back": [1, 3], "give": [1, 3, 4, 24], "ourselv": 1, "concret": [1, 216, 278], "imag": [1, 207, 209, 210], "public": [1, 203], "explicit": [1, 274], "alpha_": 1, "beta_": 1, "must": [1, 6, 63, 77, 96, 104, 131, 132, 136, 139, 140, 181], "know": [1, 3], "popul": 1, "To": [1, 2, 3, 4, 6, 203, 277], "avoid": 1, "unnecessari": [1, 3], "alloc": [1, 271], "respons": 1, "space": [1, 105, 259], "void": 1, "eval_cpu": 1, "std": 1, "overrid": 1, "eval_gpu": 1, "jacobian": [1, 101, 179, 277], "product": [1, 101, 114, 128, 172, 179, 236, 277], "primal": [1, 101, 179], "tangent": [1, 20, 21, 101, 170, 171], "int": [1, 3, 4, 7, 9, 12, 14, 15, 22, 23, 24, 25, 29, 30, 31, 32, 40, 41, 42, 43, 45, 48, 50, 53, 56, 57, 59, 61, 64, 65, 66, 72, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 100, 104, 105, 113, 115, 117, 118, 120, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 157, 158, 159, 162, 163, 166, 167, 168, 169, 172, 173, 174, 175, 176, 177, 178, 180, 182, 203, 205, 206, 207, 211, 213, 214, 215, 216, 236, 238, 239, 241, 245, 247, 252, 255, 259, 261, 271], "argnum": [1, 97, 177], "cotan": 1, "across": [1, 213], "pair": [1, 126, 225, 241], "repres": [1, 3, 261], "axi": [1, 3, 4, 12, 14, 22, 23, 24, 25, 29, 30, 31, 32, 40, 41, 42, 43, 45, 53, 56, 59, 64, 79, 81, 84, 87, 88, 89, 90, 91, 92, 104, 113, 115, 117, 118, 120, 126, 127, 128, 132, 142, 157, 158, 159, 162, 163, 166, 167, 168, 169, 173, 178, 180, 252, 255, 259, 261], "correspond": [1, 12, 14, 57, 63, 72, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 113, 115, 118, 128, 166, 172, 180, 196], "dimens": [1, 3, 12, 14, 22, 23, 44, 50, 57, 66, 79, 88, 89, 91, 92, 93, 104, 113, 114, 115, 117, 118, 128, 129, 132, 138, 166, 169, 172, 173, 178, 205, 206, 207, 209, 210, 213, 214, 215, 236, 239, 241, 247], "vmap": [1, 277], "print": [1, 2, 3, 4, 6, 195, 196, 197, 203, 274, 277], "ostream": 1, "os": [1, 6], "equival": [1, 27, 47, 58, 95, 168, 212, 235, 237, 238], "check": [1, 6, 60, 225], "bool": [1, 12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 57, 59, 60, 77, 104, 113, 115, 117, 118, 128, 130, 131, 136, 139, 140, 146, 147, 166, 178, 194, 205, 206, 207, 213, 214, 215, 216, 218, 222, 223, 225, 230, 233, 236, 238, 241, 245, 247], "is_equival": 1, "privat": 1, "fall": 1, "eval": [1, 2, 3, 4, 154, 203, 271, 273, 277], "deriv": 1, "base": [1, 77, 104, 108, 110, 189, 191, 241, 247, 271, 273, 274], "abov": [1, 3, 6, 129, 175, 188, 203, 278], "demonstr": 1, "treat": [1, 60, 88, 89, 91, 92, 168], "paramet": [1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 193, 194, 195, 196, 197, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 222, 223, 225, 230, 233, 234, 235, 236, 237, 238, 239, 241, 243, 245, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 268, 271, 273], "produc": [1, 236], "through": [1, 164, 190, 247], "construct": [1, 4, 96, 124, 182], "its": [1, 6, 114, 127, 138, 154, 174, 184, 187, 188, 189, 197, 203, 238, 278], "type": [1, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 191, 195, 203, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "shape": [1, 3, 4, 47, 60, 61, 65, 66, 81, 84, 87, 90, 91, 92, 96, 101, 114, 124, 125, 131, 132, 133, 135, 136, 139, 140, 143, 169, 179, 181, 182, 183, 203, 205, 206, 207, 209, 210, 214, 216, 225, 261, 273, 277, 278], "pass": [1, 3, 4, 47, 58, 126, 177, 184, 195, 196, 203, 223, 233, 234, 235, 238, 243], "re": [1, 4], "now": [1, 3, 238], "promot": 1, "dtype": [1, 3, 15, 26, 33, 57, 80, 96, 100, 104, 105, 124, 133, 135, 136, 139, 140, 174, 182, 199, 251, 277], "promoted_dtyp": 1, "promote_typ": 1, "float32": [1, 15, 80, 100, 104, 105, 124, 133, 135, 139, 140, 174, 182, 199, 251, 277], "non": [1, 6, 217, 231, 262, 271], "point": [1, 2, 3, 6, 95, 130, 199], "out_dtyp": 1, "is_floating_point": 1, "cast": [1, 33, 90, 91, 92, 218], "up": [1, 3, 238], "determin": 1, "x_cast": 1, "astyp": [1, 3, 218], "y_cast": 1, "broadcasted_input": 1, "broadcast_arrai": 1, "out_shap": 1, "0": [1, 2, 3, 4, 6, 7, 15, 48, 53, 59, 64, 65, 66, 80, 93, 97, 104, 126, 131, 140, 142, 144, 159, 163, 174, 175, 176, 177, 178, 180, 185, 187, 188, 189, 190, 193, 194, 195, 203, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 237, 240, 241, 242, 245, 246, 247, 249, 250, 251, 252, 253, 254, 260, 261, 263, 264, 265, 267, 271, 274, 277], "unique_ptr": 1, "make_uniqu": 1, "to_stream": 1, "handl": [1, 203], "resolv": 1, "No": [1, 3], "happen": [1, 3, 247, 273], "alon": 1, "effect": [1, 209], "onli": [1, 3, 5, 6, 60, 65, 66, 104, 129, 146, 147, 199, 203, 222, 223, 225, 230, 233, 234, 235, 271, 278], "execut": [1, 6, 278], "depend": [1, 2, 57, 104, 278], "devic": [1, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 150, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 181, 182, 183, 278, 279], "specifi": [1, 15, 33, 66, 88, 89, 96, 97, 104, 105, 120, 124, 132, 142, 167, 168, 169, 172, 173, 177, 180, 182, 205, 246, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 278], "memori": [1, 5, 154, 271], "ha": [1, 3, 4, 5, 57, 87, 88, 90, 91, 92, 97, 132, 205, 216, 271, 273, 277, 278], "been": [1, 3], "try": [1, 6], "naiv": 1, "gener": [1, 2, 15, 80, 88, 89, 105, 131, 135, 136, 139, 140, 247, 274, 279], "version": [1, 6, 72, 111, 113, 129, 157, 180, 274], "declar": 1, "member": [1, 203, 228, 231], "method": [1, 3, 7, 8, 9, 26, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 203, 271], "each": [1, 50, 72, 77, 114, 126, 129, 130, 132, 142, 148, 149, 159, 173, 180, 181, 209, 210, 211, 213, 241, 247, 252, 274], "element": [1, 10, 11, 16, 17, 18, 19, 20, 21, 24, 52, 62, 68, 69, 72, 73, 74, 75, 76, 78, 80, 94, 95, 98, 99, 102, 103, 107, 108, 109, 110, 111, 112, 116, 119, 121, 122, 127, 129, 130, 141, 142, 145, 152, 153, 155, 156, 160, 161, 165, 168, 170, 171, 177, 181, 208, 209, 210, 217, 237, 241, 244, 262, 263, 266], "find": [1, 2, 6], "pointwis": 1, "captur": [1, 203], "templat": 1, "axpby_impl": 1, "typenam": 1, "t": [1, 3, 75, 130, 177, 185, 186, 187, 188, 189, 190, 193, 194, 203, 278], "readi": 1, "fill": [1, 96, 125, 174, 183], "malloc_or_wait": 1, "synchron": 1, "avail": [1, 2, 3, 4, 6, 8, 199, 278], "There": [1, 203], "wait": [1, 3], "here": [1, 3, 278], "request": 1, "pressur": 1, "condit": [1, 181, 278], "set_data": 1, "nbyte": 1, "collect": [1, 192, 196, 276], "pointer": 1, "x_ptr": 1, "y_ptr": 1, "out_ptr": 1, "relev": 1, "static_cast": 1, "size_t": 1, "out_idx": 1, "size": [1, 3, 4, 50, 66, 72, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 96, 100, 104, 129, 130, 132, 143, 159, 162, 203, 206, 207, 211, 214, 238], "map": [1, 4, 106, 196, 211, 218], "linear": [1, 3, 4, 5, 196, 203, 212, 225, 238, 240, 242, 244, 248, 249, 250, 264, 265, 266, 271], "indic": [1, 13, 22, 23, 24, 25, 77, 97, 159, 168, 169, 177, 230, 232, 252], "offset": [1, 3], "x_offset": 1, "elem_to_loc": 1, "stride": [1, 65, 66, 206, 207, 241], "y_offset": 1, "contigu": 1, "regularli": 1, "default": [1, 6, 12, 14, 15, 22, 23, 24, 25, 60, 64, 65, 66, 72, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 97, 100, 104, 105, 106, 113, 115, 117, 118, 124, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 142, 143, 144, 146, 147, 158, 159, 162, 163, 166, 172, 173, 174, 175, 176, 177, 178, 180, 182, 185, 186, 187, 188, 189, 190, 192, 193, 194, 199, 205, 206, 207, 214, 216, 218, 223, 225, 230, 233, 236, 237, 238, 241, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 271, 274, 276, 279], "row": [1, 80, 100, 129, 174], "major": 1, "henc": [1, 129], "doesn": [1, 203], "additon": [], "abl": [1, 129], "all": [1, 4, 6, 13, 24, 66, 77, 80, 83, 86, 89, 92, 114, 126, 127, 162, 191, 203, 218, 219, 223, 226, 227, 228, 231, 233, 236, 238, 245, 247, 271, 274, 277, 279], "incom": 1, "accordingli": 1, "dispatch": 1, "float16": [1, 199, 218], "bfloat16": 1, "complex64": 1, "throw": 1, "error": [1, 6, 75, 76, 159, 212, 238, 248, 249, 250, 257, 258], "encount": 1, "unexpect": [1, 15], "regist": [1, 4], "op": [1, 223], "contruct": [], "assert": 1, "2": [1, 2, 3, 4, 66, 75, 82, 85, 87, 88, 89, 90, 91, 92, 104, 110, 114, 129, 138, 172, 174, 175, 176, 185, 186, 187, 188, 193, 199, 203, 207, 212, 239, 245, 249, 254, 260, 261, 271, 277, 278], "1": [1, 3, 4, 15, 24, 25, 65, 66, 81, 82, 84, 85, 87, 88, 89, 90, 91, 92, 93, 104, 114, 127, 129, 132, 140, 152, 158, 168, 177, 185, 186, 187, 188, 189, 190, 193, 194, 199, 203, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 216, 237, 239, 241, 242, 245, 246, 249, 250, 251, 252, 253, 254, 255, 257, 259, 260, 261, 265, 267, 271, 273, 277, 278], "correct": [1, 187, 188, 189], "els": [1, 3, 203, 223], "float16_t": 1, "bfloat16_t": 1, "complex64_t": 1, "runtime_error": 1, "support": [1, 3, 5, 6, 13, 65, 66, 106, 114, 129], "have": [1, 3, 6, 60, 88, 89, 91, 92, 114, 132, 190, 195, 236, 243, 276, 278], "rememb": 1, "3": [1, 3, 6, 104, 190, 274, 277], "complic": 1, "keep": [1, 12, 14, 22, 23, 113, 115, 117, 118, 128, 166, 178, 203, 222], "mind": [1, 3], "half": [1, 15, 136, 140, 241], "precis": [1, 3, 203, 212], "direct": [1, 3, 190, 220, 278], "fix": [1, 3, 6], "possibl": [1, 3, 114, 159, 211, 278], "due": 1, "transpos": [1, 3, 27, 130], "aren": 1, "guarante": 1, "fit": [1, 129, 278], "requir": [1, 3, 203], "column": [1, 80, 100, 129], "inplac": 1, "expect": [1, 3, 206, 207, 208, 209, 210, 245, 247], "answer": 1, "copi": [1, 3, 5, 127, 158], "simpli": [1, 3, 6, 240, 264, 271], "catlas_saxpbi": 1, "axpby_impl_acceler": 1, "first": [1, 2, 3, 4, 6, 93, 97, 114, 127, 138, 167, 172, 177, 187, 188, 189, 195, 203, 213, 278], "mode": [1, 67, 221, 230, 232], "i": [1, 3, 101, 104, 188, 203, 206, 207, 209, 210, 223, 257], "e": [1, 4, 6, 75, 101, 152, 186, 205, 206, 207, 209, 210, 213, 214, 215, 223, 239, 268, 273, 279], "match": [1, 6, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 225], "transposit": 1, "data_s": 1, "items": 1, "flag": 1, "copy_inplac": 1, "copytyp": 1, "n": [1, 3, 26, 65, 66, 80, 81, 83, 84, 86, 87, 90, 92, 100, 174, 178, 205, 206, 207, 209, 210, 257, 261], "incx": 1, "inci": 1, "great": 1, "But": [1, 278], "criteria": 1, "luckili": 1, "alwai": [1, 195], "With": 1, "final": [1, 2, 3, 4], "singl": [1, 4, 77, 101, 106, 126, 179], "row_contigu": 1, "col_contigu": 1, "common": 1, "hit": 1, "mileston": 1, "enough": 1, "run": [1, 3, 4, 5, 6, 154, 185, 187, 188, 189, 205, 218, 278, 279], "If": [1, 3, 6, 12, 14, 15, 22, 23, 24, 25, 57, 60, 63, 64, 67, 77, 90, 91, 92, 95, 96, 97, 104, 106, 113, 114, 115, 117, 118, 124, 126, 127, 128, 132, 142, 146, 147, 157, 158, 159, 166, 168, 169, 172, 177, 178, 180, 182, 196, 205, 206, 207, 213, 215, 216, 223, 225, 233, 238, 241, 243, 245, 261, 278, 279], "plan": 1, "stop": [1, 3, 15, 105, 164], "enjoi": 1, "speed": 1, "appl": [1, 3, 5, 6, 278], "silicon": [1, 3, 5, 6, 278], "address": 1, "shade": 1, "languag": [1, 199], "kernel": [1, 65, 66], "written": 1, "help": [1, 3, 278], "resourc": 1, "walkthrough": 1, "pipelin": 1, "specif": [1, 6], "cpp": 1, "algorithm": [1, 190], "launch": 1, "exactli": [1, 3, 225], "mani": [1, 159, 206, 207, 211], "thread": 1, "pick": 1, "updat": [1, 2, 3, 4, 188, 190, 194, 196, 205, 218, 225, 235, 273], "assign": [1, 271], "axpby_gener": 1, "buffer": 1, "constant": [1, 3, 6, 126, 193, 205, 213, 215, 239, 261], "4": [1, 3, 72, 104, 129, 130, 148, 199, 205, 214, 238, 247, 277, 278], "5": [1, 2, 3, 6, 104, 131, 193, 205, 208, 209, 210, 214, 260], "x_stride": 1, "6": [1, 3, 104, 148, 193, 247, 249, 250, 261, 277], "y_stride": 1, "7": [1, 3, 104, 129], "ndim": [1, 104], "8": [1, 3, 6, 104, 129, 185, 186, 187, 188, 189, 193, 199, 214, 247, 277, 278], "uint": 1, "index": [1, 7, 9, 24, 79, 80, 97, 127, 147, 168, 169, 177], "thread_position_in_grid": 1, "convert": [1, 57, 238, 277], "instanti": [1, 4], "uniqu": [1, 274], "host": 1, "name": [1, 106, 129, 130, 147, 148, 149, 192, 203, 213, 222, 225, 227], "identifi": [1, 195, 276], "instantiate_axpbi": 1, "type_nam": 1, "host_nam": 1, "axpby_general_": 1, "bflot16": [], "compil": [1, 6], "mlx_ext": 1, "metallib": [1, 6], "see": [1, 3, 4, 6, 8, 28, 29, 30, 31, 32, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 104, 147, 203, 205, 209, 212, 221, 237, 238, 241, 242, 245, 248, 249, 250, 265, 278], "later": [1, 6], "co": [1, 147, 245], "locat": [1, 234, 235, 278], "share": [1, 5, 72, 129, 130], "register_librari": 1, "potenti": 1, "path": [1, 6, 148, 149, 225], "tri": 1, "load": [1, 4, 225], "hasn": 1, "alreadi": [1, 3], "static": [1, 6], "object": [1, 8, 26, 37, 57, 131, 136, 139, 140, 180, 195, 196, 209, 276], "why": [1, 3], "packag": [1, 2, 4], "process": [1, 3, 67, 196, 210, 211, 247, 276], "logic": [1, 112], "grid": 1, "shown": 1, "below": [1, 104, 174, 176, 199], "prepar": [1, 3], "carri": 1, "should": [1, 2, 3, 4, 6, 77, 101, 129, 154, 169, 177, 179, 195, 203, 206, 207, 209, 210, 230, 236, 243, 253, 271, 276, 279], "d": [1, 3, 104, 114, 168, 174, 175, 176, 185, 187, 189, 197, 210, 278], "ostringstream": 1, "kname": 1, "axpby_": 1, "general_": 1, "type_to_nam": 1, "make": [1, 3, 4, 6, 114, 203, 277, 278], "sure": [1, 3, 6, 203], "look": [1, 3], "folder": 1, "get_colocated_mtllib_path": 1, "get_kernel": 1, "str": [1, 67, 97, 104, 106, 146, 147, 148, 149, 177, 195, 197, 218, 219, 222, 223, 225, 227, 229, 233, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "encod": [1, 241, 245, 247], "compute_encod": 1, "get_command_encod": 1, "setcomputepipelinest": 1, "those": [1, 3, 203], "decelar": [], "nelem": 1, "set_array_buff": 1, "setbyt": 1, "sizeof": 1, "threadgroup": 1, "higher": 1, "than": [1, 3, 57, 67, 98, 99, 102, 103, 114, 190, 196, 241, 246, 260, 267, 278], "max": [1, 104, 116, 189, 237, 253, 261, 263, 278], "allow": [1, 191, 203, 235, 271, 277], "tgp_size": 1, "min": [1, 104, 119, 237, 263], "maxtotalthreadsperthreadgroup": 1, "3d": [1, 205, 210], "mtl": 1, "group_dim": 1, "grid_dim": 1, "divd": [], "among": 1, "dispatchthread": 1, "few": [1, 3, 4, 5, 154, 277], "thing": [1, 3], "note": [1, 3, 6, 13, 65, 66, 88, 89, 104, 129, 132, 203], "befor": [1, 3, 6, 24, 127, 222, 247], "move": [1, 120, 278], "track": [1, 203, 205], "activ": [1, 6, 209, 217, 246, 247, 262, 267, 268], "command": [1, 6], "instead": [1, 203, 235, 245], "end_encod": 1, "end": [1, 129, 242, 246, 254, 260, 265, 267], "until": [1, 277], "limit": [1, 63], "flush": 1, "enqueu": 1, "commit": 1, "associ": [1, 148, 149], "suggest": 1, "deeper": 1, "dive": 1, "studi": 1, "come": [1, 3], "far": [1, 273], "built": [1, 6], "includ": [1, 219, 238, 277, 279], "forward": [1, 177], "diff": 1, "push": 1, "along": [1, 22, 23, 64, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 104, 142, 157, 159, 163, 168, 169, 172, 203], "primtiv": [], "similarli": [1, 6, 114], "scale_arr": 1, "contribut": 1, "tangent_x": 1, "tangent_i": 1, "revers": [1, 173, 245], "arg": [1, 3, 8, 47, 58, 77, 148, 149, 154], "push_back": 1, "fulli": [1, 5, 278], "primitv": [], "overal": 1, "directori": [1, 3, 6], "extens": [1, 106, 199], "h": [1, 65, 66, 104, 205, 207, 209, 210], "mlx_sample_extens": 1, "__init__": [1, 3, 4, 7, 8, 9, 26, 203, 271], "py": [1, 3, 6], "cmakelist": 1, "txt": 1, "setup": [1, 2, 4, 6], "strucutr": [], "hold": [1, 3, 8, 104, 191], "instal": 1, "pybind11": [1, 6], "sinc": [1, 3, 4, 190, 271, 278], "compon": [1, 3], "etc": [1, 129, 203], "becom": 1, "pybind11_modul": 1, "m": [1, 6, 80, 104, 174, 185], "doc": [1, 4, 147], "sampl": [1, 2, 3, 105, 131, 132, 133, 136, 139, 140, 261, 274], "_a": 1, "pos_onli": 1, "kw_onli": 1, "none": [1, 3, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 195, 196, 212, 218, 222, 223, 233, 236, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "r": [1, 3, 177, 209], "pbdoc": 1, "most": [1, 132, 203], "complex": [1, 88, 89, 90, 91, 92, 131, 136, 139, 140, 195, 203, 235], "addit": [1, 3, 11, 205, 213, 215, 236, 239, 271], "bell": 1, "whistl": 1, "liter": 1, "string": 1, "modul": [1, 3, 4, 184, 238, 243, 247, 276], "ensur": [1, 257], "caster": 1, "find_packag": 1, "config": 1, "add_librari": 1, "sourc": [1, 120, 173], "target_sourc": 1, "cmake_current_list_dir": 1, "header": 1, "target_include_directori": 1, "target_link_librari": 1, "attach": 1, "conveni": [1, 4], "mlx_build_metallib": 1, "target": [1, 177, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "destin": [1, 120], "automat": [1, 5, 277, 278], "practic": 1, "mlx_build_met": [1, 6], "mlx_ext_metallib": 1, "titl": 1, "include_dir": 1, "project_source_dir": 1, "mlx_include_dir": 1, "output_directori": 1, "cmake_library_output_directori": 1, "add_depend": 1, "endif": 1, "pybind11_add_modul": 1, "build_shared_lib": 1, "target_link_opt": 1, "wl": 1, "rpath": 1, "loader_path": 1, "onc": [1, 154], "describ": 1, "util": [1, 3, 5, 6, 148, 203], "__name__": [1, 3], "__main__": [1, 3], "descript": [1, 3, 199], "ext_modul": 1, "cmakeextens": 1, "cmdclass": 1, "build_ext": 1, "cmakebuild": 1, "package_dir": 1, "package_data": 1, "dylib": 1, "zip_saf": 1, "fals": [1, 3, 12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 59, 60, 77, 104, 113, 115, 117, 118, 128, 166, 178, 181, 194, 195, 196, 199, 213, 214, 216, 223, 225, 233, 236, 238, 241, 245, 247], "python_requir": 1, "even": [1, 3], "though": [1, 3], "j8": 1, "libmlx_ext": 1, "cpython": 1, "3x": 1, "darwin": 1, "pip": [1, 6], "after": [1, 3, 4, 24, 95, 127, 129, 205, 213, 215, 236, 247, 260, 278], "plai": [1, 3], "ones": [1, 3, 125, 148, 154, 174, 234, 235, 238], "b": [1, 3, 11, 13, 60, 73, 74, 95, 98, 99, 102, 103, 104, 111, 114, 116, 119, 121, 129, 165, 172, 177, 216, 277, 278], "f": [1, 2, 4, 104, 188, 203], "item": [1, 2, 3, 4, 196, 277], "true": [1, 2, 3, 60, 104, 130, 157, 181, 195, 196, 199, 203, 205, 206, 207, 213, 214, 215, 216, 222, 223, 225, 230, 233, 238, 241, 245, 247, 257], "quick": [1, 5], "benchmark": 1, "compar": [1, 60], "time": [1, 3, 6, 154, 203, 278], "set_default_devic": 1, "256": [1, 4], "512": [1, 3, 247, 278], "random": [1, 2, 3, 4, 5, 205, 214, 225, 230, 278, 279], "normal": [1, 2, 3, 139, 192, 205, 213, 214, 215, 239, 247, 278], "bench": 1, "warm": 1, "rang": [1, 2, 3, 4, 6, 15, 105, 249, 250, 273, 274, 278], "100": [1, 2, 3, 278], "5000": 1, "simple_tim": 1, "custom_tim": 1, "3f": [1, 4], "custom": [1, 247], "114": 1, "109": 1, "modest": 1, "improv": [1, 3, 185, 186, 187, 188, 189, 193], "awai": [1, 3], "good": [1, 6, 278], "nn": [1, 3, 4, 148, 196, 203, 271, 273], "grad": [1, 2, 4, 177, 273, 277], "simplifi": 1, "full": [1, 4, 47, 58, 67, 157, 234, 235], "implement": [2, 4, 104, 185, 186, 187, 188, 189, 190, 191, 192, 193, 211, 222, 236, 241, 243, 245, 246, 247, 267], "basic": [2, 144], "model": [2, 4, 5, 148, 184, 196, 203, 218, 221, 223, 225, 229, 230, 232, 233, 234, 236, 247, 271, 273], "problem": [2, 4, 203], "metadata": 2, "num_featur": [2, 205], "num_exampl": 2, "1_000": 2, "num_it": 2, "10_000": 2, "iter": [2, 4, 196, 274], "sgd": [2, 4, 190, 273], "lr": [2, 190], "01": [2, 188], "rate": [2, 185, 186, 187, 188, 189, 190, 193, 194], "ll": [2, 4, 254], "synthet": 2, "dataset": 2, "matrix": [2, 72, 80, 100, 104, 114, 129, 130, 238], "ground": [2, 3, 260], "truth": [2, 260], "w_star": 2, "valu": [2, 3, 10, 15, 22, 23, 37, 57, 60, 63, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 96, 104, 105, 126, 131, 132, 133, 135, 136, 139, 140, 168, 169, 177, 180, 184, 188, 192, 195, 196, 199, 208, 209, 210, 214, 216, 222, 236, 237, 246, 247, 251, 252, 253, 254, 256, 257, 258, 259, 260, 267, 271], "gaussian": [2, 212, 248, 249, 250], "nois": 2, "exampl": [2, 3, 4, 15, 104, 168, 203, 205, 214, 223, 225, 230, 233, 251, 273, 274, 277], "noisi": 2, "label": [2, 252], "ep": [2, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "1e": [2, 4, 13, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "us": [2, 3, 4, 5, 6, 15, 72, 93, 104, 114, 129, 130, 142, 143, 185, 187, 188, 189, 190, 191, 195, 203, 209, 211, 212, 216, 218, 222, 234, 235, 236, 238, 241, 245, 247, 249, 250, 271, 273, 274, 276, 277, 278], "weight": [2, 65, 66, 188, 190, 194, 196, 203, 225, 229, 238, 252, 271], "squar": [2, 3, 100, 145, 160, 177, 185, 187, 188, 189, 196, 203, 239, 258, 260], "loss": [2, 4, 177, 203, 273], "loss_fn": [2, 4, 273], "w": [2, 66, 72, 129, 130, 177, 194, 205, 207, 209, 210, 216], "mean": [2, 3, 4, 177, 203, 205, 213, 223, 239, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "grad_fn": 2, "initi": [2, 3, 203, 205, 213, 214, 215, 216, 237, 239, 271], "randomli": [2, 3, 208, 209, 210], "Then": [2, 6], "repeatedli": 2, "_": [2, 3, 203, 274, 278], "verifi": 2, "close": [2, 5, 13], "error_norm": 2, "5f": 2, "someth": [2, 3], "00005": 2, "00364": 2, "complet": [2, 3, 6, 234, 235, 278], "logist": [2, 152, 244, 249, 250, 266], "github": [2, 4, 6], "repo": [2, 4, 6], "enabl": [3, 6, 77, 194], "larg": [3, 203, 236, 257], "ish": 3, "transform": [3, 5, 77, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 146, 147, 184, 203, 205, 213, 215, 216, 222, 223, 233, 238, 241], "compromis": 3, "eas": 3, "llama": 3, "famili": 3, "less": [3, 24, 103, 127, 241, 260], "200": 3, "line": 3, "python": [3, 37, 50, 57, 77, 195, 196, 197, 271, 276], "neural": [3, 5, 193, 211, 217, 262, 271], "network": [3, 5, 193, 205, 209, 211, 271], "build": [3, 5, 271], "concis": 3, "architectur": [3, 203, 235, 278], "notabl": [3, 5], "rope": [3, 203], "posit": [3, 24, 97, 120, 127, 177, 196, 203, 206, 207, 236, 241, 245, 261], "option": [3, 12, 14, 15, 22, 23, 24, 25, 26, 31, 32, 64, 65, 66, 67, 72, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 100, 104, 105, 106, 113, 115, 117, 118, 124, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 142, 143, 146, 147, 157, 158, 159, 162, 163, 166, 168, 169, 172, 173, 174, 175, 176, 177, 178, 180, 182, 185, 186, 187, 188, 189, 190, 193, 194, 195, 196, 205, 206, 207, 216, 218, 222, 223, 225, 233, 236, 238, 241, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 274, 279], "kei": [3, 131, 132, 133, 135, 136, 138, 139, 140, 192, 195, 196, 222, 223, 233, 236, 274, 276], "cach": 3, "concaten": 3, "project": [3, 236], "llamaattent": 3, "self": [3, 4, 7, 9, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 58, 59, 203, 217, 262, 271], "dim": [3, 172, 211, 213, 214, 215, 236, 239, 241, 245, 247], "num_head": [3, 236, 247], "super": [3, 4, 203, 271], "tradit": [3, 209, 210, 241], "query_proj": 3, "bia": [3, 72, 129, 130, 187, 188, 189, 196, 203, 206, 207, 216, 223, 225, 233, 236, 238], "key_proj": 3, "value_proj": 3, "out_proj": [3, 271], "__call__": [3, 4, 203, 271], "queri": [3, 236], "mask": [3, 230, 236], "extract": [3, 203, 222, 271], "l": [3, 4, 203, 205, 206, 260], "reshap": [3, 104], "combin": 3, "key_cach": 3, "value_cach": 3, "sqrt": [3, 75, 185, 186, 187, 188, 193, 205, 213, 214, 215, 216, 239, 245], "score": 3, "softmax": [3, 252], "values_hat": 3, "rm": 3, "swiglu": 3, "rmsnorm": [3, 203], "llamaencoderlay": 3, "mlp_dim": [3, 247], "norm1": 3, "norm2": 3, "linear1": 3, "linear2": 3, "linear3": 3, "sigmoid": [3, 244, 249, 250, 251, 266], "instanc": [3, 129, 197, 203, 214, 218, 219, 220, 223, 226, 227, 233, 235, 243, 271], "embed": [3, 203, 241, 245], "emb": [3, 211, 245], "token": [3, 211], "num_lay": [3, 4, 273], "vocab_s": 3, "norm": [3, 189, 190, 213, 261], "multiheadattent": [3, 203], "create_additive_causal_mask": 3, "list": [3, 8, 12, 14, 26, 29, 30, 40, 41, 42, 43, 45, 50, 53, 56, 57, 59, 61, 64, 77, 79, 82, 83, 85, 86, 88, 89, 91, 92, 96, 97, 101, 104, 113, 115, 117, 118, 124, 126, 128, 131, 132, 133, 135, 136, 139, 140, 143, 157, 159, 162, 163, 166, 172, 173, 177, 178, 179, 182, 187, 188, 189, 190, 195, 197, 203, 223, 225, 226, 227, 228, 231, 233, 234, 235, 271, 276], "still": [3, 6, 104], "consid": [3, 13, 60, 195, 196, 213, 276], "train": [3, 4, 203, 205, 208, 209, 210, 221, 223, 233], "ignor": [3, 63], "whatsoev": 3, "rest": [3, 196, 241], "subsect": 3, "prompt": 3, "autoregress": 3, "yield": [3, 4, 274], "temp": 3, "causal": 3, "save": [3, 106, 129, 147, 148, 149, 229], "append": [3, 114], "store": 3, "per": [3, 4, 72, 129, 130, 191, 205, 213, 214, 215, 239], "care": 3, "last": [3, 25, 57, 83, 86, 88, 89, 91, 92, 93, 114, 132, 158, 172, 206, 207, 209, 210, 213], "logit": [3, 132, 251, 252], "next": [3, 4], "categor": 3, "lazili": [3, 203], "noth": [3, 203], "yet": [3, 104, 203, 271, 277], "forc": [3, 4, 203, 277], "choos": [3, 241], "pars": 3, "feed": 3, "loop": [3, 4], "unsqueez": 3, "sequenc": [3, 205, 206, 247, 274, 278], "length": [3, 162, 205, 206], "len": [3, 83, 86, 89, 92], "overwrit": 3, "discard": [3, 195], "old": 3, "moment": [3, 187, 188, 189], "anymor": 3, "everyth": 3, "small": [3, 154, 205, 213, 215, 239, 257, 261, 278], "10": [3, 4, 108, 144, 148, 154, 196, 203, 225], "12": 3, "8192": 3, "1024": 3, "actual": [3, 15, 225, 271], "materi": [3, 5], "could": [3, 203], "20_000": 3, "machin": [3, 5, 6, 193], "8gb": 3, "ram": 3, "32": [3, 4, 129, 130, 199], "44": 3, "doubl": 3, "bracket": 3, "becaus": [3, 203], "batch": [3, 114, 205, 206, 207, 209, 210, 236], "zip": [3, 4], "haven": 3, "anyth": [3, 177], "result": [3, 15, 57, 72, 104, 106, 114, 130, 142, 144, 163, 172, 181, 196, 245], "similar": [3, 196, 234, 235, 236], "runtim": 3, "section": [3, 159, 261], "access": [3, 37, 203, 271, 278], "origin": [3, 185, 186, 187, 189, 190, 205], "sentencepiec": 3, "pytorch": [3, 5, 213], "compat": [3, 132], "npz": [3, 106, 148, 149, 225, 229], "file": [3, 6, 106, 146, 147, 148, 149, 225, 229], "directli": 3, "argpars": 3, "itertool": [3, 196], "starmap": [3, 196], "np": [3, 4, 277], "torch": 3, "map_torch_to_mlx": 3, "tok_embed": 3, "elif": 3, "replac": [3, 234, 235, 247, 260], "attention_norm": 3, "ffn_norm": 3, "wq": 3, "wk": 3, "wv": 3, "wo": 3, "w1": 3, "w2": 3, "w3": 3, "ffn": 3, "separ": [3, 47, 58, 213], "submodul": [3, 4, 203, 223, 224, 233, 235], "feed_forward": 3, "parser": 3, "argumentpars": 3, "add_argu": 3, "torch_weight": 3, "output_fil": 3, "parse_arg": 3, "state": [3, 4, 191, 192, 203, 273, 274], "savez": 3, "k": [3, 80, 174, 175, 176, 216, 223], "v": [3, 67, 203, 223], "left": [3, 104, 129, 146, 147, 212, 241, 249, 250, 254, 261], "disk": 3, "text": [3, 190, 217, 242, 246, 253, 254, 257, 260, 261, 262, 263, 265, 267], "format": [3, 106, 146, 147, 148, 149], "oper": [3, 5, 33, 154, 157, 164, 169, 190, 203, 247, 277, 278, 279], "dictionari": [3, 147, 191, 192, 195, 203, 222, 234, 235, 276], "represent": [3, 129, 195, 197], "tree_unflatten": 3, "helper": 3, "weight_fil": 3, "incur": 3, "sever": [3, 65, 66, 148, 149], "futur": [3, 238], "pth": 3, "current": [3, 5, 6, 65, 66, 129, 203], "around": 3, "m1": [3, 278], "ultra": 3, "7b": 3, "me": 3, "ishmael": 3, "year": 3, "ago": 3, "never": 3, "long": 3, "info": 3, "247": 3, "press": [3, 104], "enter": 3, "littl": 3, "monei": 3, "my": [3, 6], "purs": 3, "greater": [3, 24, 99, 127, 246, 267], "consequ": 3, "walk": 3, "down": 3, "gower": 3, "street": 3, "afternoon": 3, "heavi": 3, "rain": 3, "saw": 3, "off": [3, 6], "man": 3, "rag": 3, "who": 3, "sat": 3, "upon": [3, 196], "hi": 3, "bundl": 3, "hard": 3, "wet": 3, "he": 3, "were": [3, 278], "cry": 3, "watch": 3, "him": 3, "observ": 3, "numer": [3, 104, 111, 113, 157, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "crowd": 3, "wa": [3, 192], "hurri": 3, "437": 3, "330": 3, "second": [3, 114, 167, 177, 187, 188, 189, 278], "spent": 3, "amount": 3, "39": 3, "ms": 3, "By": 3, "bigger": 3, "remain": [3, 177, 208, 209, 210], "almost": 3, "nobodi": 3, "took": 3, "least": [3, 63, 129], "notic": 3, "distanc": [3, 261], "had": 3, "doubt": 3, "minut": 3, "straight": 3, "slowli": 3, "rais": [3, 104, 159, 225], "ey": 3, "speak": [3, 104], "resum": 3, "postur": 3, "stood": 3, "feel": 3, "pain": 3, "heart": 3, "smile": 3, "face": 3, "am": 3, "someon": 3, "three": 3, "quarter": 3, "hour": 3, "made": 3, "immedi": [3, 218], "repli": 3, "again": [3, 203], "hand": 3, "did": 3, "accustom": 3, "thu": [3, 203], "question": 3, "reason": 3, "tell": 3, "understand": 3, "579": 3, "690": 3, "num": [3, 105, 138], "500": [3, 278], "628": 3, "went": 3, "nervou": 3, "trembl": 3, "told": 3, "And": 3, "perhap": 3, "surpris": 3, "matter": [3, 203], "shall": 3, "anyhow": 3, "friend": 3, "ye": 3, "slight": 3, "kind": 3, "longer": [3, 67], "soon": 3, "unless": [3, 104, 271], "unlik": [3, 13, 209, 210], "strang": 3, "amus": 3, "That": 3, "secret": 3, "disappoint": 3, "mine": 3, "cannot": [3, 63], "happi": 3, "ask": 3, "Is": [3, 245, 247], "shop": 3, "bui": 3, "food": 3, "633": 3, "21": 3, "475": 3, "su": 3, "j": [3, 6, 104, 186, 187, 189, 209], "lu": 3, "pan": 3, "murtadha": 3, "wen": 3, "liu": 3, "2021": 3, "roform": [3, 241], "enhanc": [3, 241], "rotari": [3, 241], "arxiv": [3, 185, 190, 213, 214, 215, 217, 239, 262], "preprint": [3, 185, 190], "2104": 3, "09864": 3, "zhang": 3, "sennrich": 3, "2019": [3, 188], "root": [3, 145, 160, 239], "advanc": 3, "inform": [3, 4, 147, 203, 205, 212, 236, 278], "system": 3, "shazeer": 3, "2020": 3, "glu": 3, "variant": [3, 189, 260], "2002": 3, "05202": 3, "classifi": 4, "mnist": 4, "As": [4, 168, 203], "mlp": [4, 203, 247, 273], "inherit": [4, 276], "standard": [4, 37, 57, 114, 133, 247, 277], "idiom": 4, "input_dim": [4, 203, 216, 238], "hidden_dim": [4, 271, 273], "output_dim": [4, 203, 216, 238], "layer_s": 4, "idim": 4, "odim": 4, "maximum": [4, 22, 63, 203, 240, 245, 249, 250, 264, 271], "cross": [4, 251, 252], "entropi": [4, 251, 252], "sub": [4, 138], "commonli": [4, 234], "cross_entropi": [4, 203], "accuraci": 4, "valid": [4, 67, 180, 195, 223, 233, 276], "eval_fn": 4, "argmax": 4, "loader": 4, "num_class": [4, 273], "batch_siz": [4, 273], "num_epoch": [4, 273], "learning_r": [4, 185, 186, 187, 188, 189, 190, 193, 194, 273], "train_imag": [4, 273], "train_label": [4, 273], "test_imag": 4, "test_label": 4, "shuffl": 4, "minibatch": 4, "batch_iter": [4, 273], "perm": 4, "permut": 4, "id": [4, 6], "put": 4, "trainabl": [4, 184, 203, 271], "loss_and_grad_fn": [4, 273], "value_and_grad": [4, 203, 234, 271, 273, 277], "epoch": 4, "test": [4, 6], "confus": 4, "decent": 4, "95": 4, "brought": 5, "research": 5, "except": [5, 80, 87, 88, 90, 91, 92, 213, 225], "featur": [5, 65, 66, 205, 213, 214, 215, 216, 238, 239, 241, 247], "main": [5, 80, 196, 203], "differ": [5, 165, 260], "lazi": [5, 271, 277], "multi": [5, 206, 207], "cpu": [5, 278], "gpu": [5, 278], "inspir": 5, "jax": [5, 274], "arrayfir": 5, "noteabl": [], "unifi": 5, "live": [5, 278], "guid": 5, "regress": [5, 257], "layer": [5, 203, 209, 210, 213, 215, 216, 230, 235, 238, 243, 247, 268, 271], "perceptron": 5, "llm": 5, "infer": [5, 96, 106], "fft": 5, "tree": [5, 77, 97, 154, 177, 180, 191, 195, 196, 197], "develop": [5, 6], "document": [5, 47, 58], "meet": 6, "seri": 6, "chip": 6, "nativ": 6, "maco": 6, "13": 6, "recommend": [6, 190], "14": 6, "sonoma": 6, "distribut": [6, 131, 132, 133, 135, 139, 140, 216, 255, 259, 261], "probabl": [6, 136, 208, 209, 210, 238, 255, 278], "platform": 6, "processor": 6, "arm": [6, 199], "i386": 6, "switch": 6, "conda": 6, "17": 6, "g": [6, 104, 129, 193, 194, 268, 279], "clang": 6, "cmake": 6, "24": 6, "xcode": 6, "15": [6, 104], "clone": 6, "git": 6, "com": 6, "ml": 6, "explor": 6, "cd": 6, "brew": 6, "global": [6, 137, 274], "env": 6, "cmake_build_parallel_level": 6, "edit": [6, 235], "unittest": 6, "discov": 6, "stub": 6, "dev": 6, "generate_stub": 6, "mkdir": 6, "p": [6, 131, 187, 189, 203, 208, 209, 210, 261], "either": [6, 11, 47, 57, 58, 63, 73, 74, 95, 98, 99, 102, 103, 104, 111, 114, 116, 119, 121, 165, 177, 243], "libmlx": 6, "preprocessor": 6, "metal_path": 6, "mlx_build_test": 6, "ON": 6, "mlx_build_exampl": 6, "mlx_build_benchmark": 6, "mlx_build_python_bind": 6, "multipl": [6, 114, 121, 129, 130, 236, 245], "wish": 6, "environ": 6, "variabl": [6, 97, 101, 177, 179, 180], "export": 6, "developer_dir": 6, "app": 6, "content": [6, 222], "sdk": 6, "xcrun": 6, "macosx": 6, "show": [6, 199], "unabl": 6, "tool": 6, "select": [6, 181, 218, 222], "sudo": 6, "devicetyp": 7, "attribut": [7, 8, 9, 26, 271], "kwarg": [8, 148, 149, 279], "union": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 181, 182, 183, 207, 223, 225, 233], "wise": [1, 10, 11, 16, 17, 18, 19, 20, 21, 62, 68, 69, 73, 74, 75, 76, 78, 94, 95, 98, 99, 102, 103, 107, 108, 109, 110, 111, 112, 116, 119, 121, 122, 141, 145, 152, 153, 155, 156, 160, 161, 165, 170, 171, 209, 210, 217, 237, 244, 262, 263, 266], "absolut": [10, 13, 249, 250, 260], "semant": [11, 61, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165, 278], "keepdim": [12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 59, 104, 113, 115, 117, 118, 128, 157, 166, 178], "reduct": [12, 14, 113, 115, 118, 128, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "reduc": [12, 14, 22, 23, 113, 115, 117, 118, 128, 154, 166, 178, 205, 257], "unspecifi": [12, 14, 15, 22, 23, 24, 25, 64, 96, 113, 115, 117, 118, 124, 127, 128, 142, 146, 147, 157, 158, 166, 168, 178, 182, 279], "entir": [12, 14, 22, 23, 113, 115, 117, 118, 128, 166, 178, 209, 210], "singleton": [12, 14, 22, 23, 113, 114, 115, 117, 118, 128, 166, 178], "rtol": 13, "05": [13, 205, 213, 214, 215, 239], "atol": 13, "08": [13, 186, 187, 188, 189, 193], "approxim": [13, 154, 212, 248, 249, 250], "comparison": [13, 74, 98, 99, 102, 103], "equal": [13, 24, 60, 80, 99, 103, 127, 136, 159, 214, 216], "ab": [13, 104, 177, 213, 214, 215, 217, 239, 262], "array_equ": 13, "rel": 13, "toler": 13, "boolean": [13, 60, 112, 199, 232], "interv": [15, 105, 136, 140], "increment": 15, "otherwis": [15, 195, 196, 223, 225, 233, 246, 247, 254, 260, 267], "int32": [15, 104, 136, 199, 277], "convent": [15, 67, 188], "lead": 15, "fraction": 15, "integr": [15, 168], "invers": [16, 17, 18, 19, 20, 21, 76, 84, 85, 86, 87, 88, 89], "cosin": [16, 17, 68, 69], "hyperbol": [17, 19, 21, 69, 156, 171], "sine": [18, 19, 155, 156], "minimum": [23, 63, 245], "kth": [24, 127], "partit": 24, "order": [24, 104, 127, 129, 203, 213, 234, 243], "undefin": [24, 127], "sort": [24, 25, 127], "partiton": [], "flatten": [24, 25, 104, 127, 142, 158, 168, 169, 195], "dimension": [26, 81, 82, 83, 84, 85, 86, 90, 91, 92, 205, 206, 207, 211, 216, 238, 245], "val": [26, 96], "tupl": [26, 47, 58, 64, 66, 77, 79, 101, 104, 126, 129, 143, 162, 177, 179, 187, 188, 189, 190, 195, 196, 197, 207, 225, 227, 243, 276], "ndarrai": [26, 277], "properti": [27, 35, 44, 50, 52, 232], "argument": [27, 47, 58, 77, 97, 177, 196, 203, 274, 278, 279], "elment": [], "indices_or_sect": [53, 159], "nest": [57, 203, 271, 276], "correpsond": [], "ddof": [59, 178], "equal_nan": 60, "nan": 60, "pad": [65, 66, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 206, 207], "dilat": [65, 66], "group": [65, 66, 72, 129, 130, 213, 238], "1d": [65, 67, 169], "convolut": [65, 66, 67, 206, 207, 209, 210], "channel": [65, 66, 205, 206, 207, 209, 210], "c_in": [65, 66], "c_out": [65, 66], "convolv": [65, 66], "2d": [66, 129, 205, 209], "spatial": [66, 213], "symmetr": 66, "discret": [67, 81, 82, 83, 84, 85, 86, 90, 91, 92, 211], "swap": [67, 167, 235, 238], "conv": 67, "filter": [67, 206, 207, 218, 222], "flip": 67, "signal": 67, "divis": [73, 95, 129], "quotient": [73, 95], "mathrm": [75, 152, 214], "frac": [75, 129, 152, 185, 186, 187, 188, 189, 193, 205, 208, 209, 210, 213, 214, 215, 216, 239, 254, 257], "pi": [75, 245], "int_0": 75, "dx": 75, "erf": 76, "retain_graph": [77, 146, 147], "node": [77, 154, 180], "dict": [77, 106, 147, 148, 228, 231, 234, 235, 271, 276], "leaf": [77, 195, 196, 222], "preserv": [77, 143], "intend": 77, "control": [77, 274], "flow": [77, 164], "exponenti": [78, 242, 265], "insert": [79, 278], "ident": [80, 164, 230], "diagon": [80, 174, 175, 176], "zero": [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 174, 175, 176, 183, 203, 208, 209, 210, 225], "th": 80, "whose": [80, 184], "One": [81, 84, 90, 145], "fourier": [81, 82, 83, 84, 85, 86, 90, 91, 92], "truncat": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 139], "dft": [81, 82, 83, 84, 85, 86, 90, 91, 92], "rfft": 87, "real": [87, 88, 89, 90, 91, 92], "rfft2": 88, "rfftn": 89, "silent": [90, 91, 92], "start_axi": 93, "end_axi": 93, "fun": [97, 101, 177, 179, 180, 278], "argnam": [97, 177], "cpp_function": [97, 177, 180], "neither": [97, 177], "keyword": [97, 148, 149, 177, 196, 203, 274, 279], "strict": [98, 102, 223, 225, 233], "binari": [106, 146, 147, 148, 149, 246, 251, 267], "npy": [106, 146], "natur": [107, 109], "logarithm": [107, 108, 109, 110], "log": [109, 111, 113, 255, 257, 259], "plu": 109, "exp": [111, 113, 133, 157, 242, 255, 265, 278], "stabl": [111, 113, 157, 257], "prepend": 114, "remov": [114, 132, 162], "anoth": [63, 114, 165, 181, 203, 218, 278], "negat": 122, "pad_with": 126, "constant_valu": 126, "pad_width": 126, "edg": [63, 126], "before_1": 126, "after_1": 126, "before_2": 126, "after_2": 126, "before_n": 126, "after_n": 126, "integ": [95, 104, 126, 129, 130, 131, 136, 159, 172, 180, 199, 211], "before_i": 126, "after_i": 126, "extend": 126, "side": 126, "smaller": [127, 190], "prng": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 274], "num_sampl": 132, "unnorm": [132, 251, 252], "draw": 132, "uint32": [132, 199], "cdf": [133, 212, 248], "accord": [133, 181, 236], "seed": 134, "low": [136, 140], "high": [136, 140, 203, 211], "lower": [129, 136, 139, 140, 174], "upper": [129, 136, 139, 140], "bound": [136, 139, 140, 212, 278], "roadcast": 136, "domain": 139, "optino": [], "uniformli": 140, "reciproc": 145, "arr": 146, "retain": [146, 147], "dure": [146, 147, 208, 209, 210], "uncompress": 148, "my_path": 148, "tree_flatten": [148, 196, 197, 203], "transformerencod": 148, "128": [148, 203], "flat_param": 148, "compress": 149, "simplif": 154, "reus": 154, "consumpt": 154, "meant": 154, "everi": [129, 154, 196], "overhead": [154, 278], "1m": 154, "thousand": 154, "foo": 154, "matmul": [154, 278], "twice": [154, 278], "subarrai": 159, "being": [164, 203], "prevent": [164, 261], "unchang": [164, 241], "axis1": 167, "axis2": 167, "taken": 168, "prior": [168, 169], "equial": [], "exclud": 169, "elsewher": 174, "col": 174, "triangl": 174, "mse": 177, "param": [177, 203], "lvalu": 177, "dlvalu": 177, "dparam": 177, "lasso": 177, "l1": [177, 254, 256, 257, 260], "varianc": [178, 205, 213], "divisor": 178, "cotang": 179, "in_ax": 180, "out_ax": 180, "prefix": [180, 195], "subclass": 271, "arbitrari": [195, 271], "recurs": [192, 203, 222, 223, 228, 231, 233, 271], "concept": 271, "frozen": [203, 223, 231, 233, 238, 271], "freez": [203, 233, 271], "mymlp": 271, "in_dim": [203, 271], "out_dim": [203, 271], "16": [199, 214, 218, 271], "in_proj": 271, "fn": [184, 196, 277], "callabl": [184, 195, 196, 218, 219, 222, 243, 247], "wrt": 184, "rho": 185, "9": [104, 185, 187, 188, 189, 190], "06": [185, 261], "paper": [185, 186, 187, 189, 190, 205, 245], "zeiler": 185, "2012": [185, 193], "adapt": [185, 186], "1212": 185, "5701": 185, "v_": [185, 186, 187, 188, 189, 193, 194], "v_t": [185, 186, 187, 188, 189, 193, 194], "g_t": [185, 186, 187, 188, 189, 190, 193, 194], "delta": [185, 254], "w_": [185, 186, 187, 188, 189, 190, 193, 194], "u_t": 185, "epsilon": [185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239], "u_": 185, "w_t": [185, 186, 187, 188, 189, 190, 193, 194], "lambda": [185, 186, 187, 188, 189, 190, 193, 194, 196, 203, 218, 223, 242, 265], "coeffici": [1, 185, 187, 188, 189, 190], "averag": [185, 187, 188, 189], "denomin": [185, 186, 187, 188, 189, 193, 214], "stabil": [185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239], "ddefault": [], "duchi": 186, "hazan": 186, "singer": 186, "2011": 186, "subgradi": 186, "onlin": 186, "stochast": [186, 187, 189, 194], "jmlr": 186, "999": [187, 188, 189], "omit": [187, 189], "estim": [187, 189], "kingma": [187, 189], "ba": [187, 189], "2015": [187, 189, 209], "iclr": [187, 188, 189], "m_": [187, 188, 189, 190], "beta_1": [187, 188, 189, 190], "m_t": [187, 188, 189, 190], "beta_2": [187, 188, 189, 190], "weight_decai": [188, 190, 194], "contrast": [188, 192], "loshchilov": 188, "hutter": 188, "decoupl": 188, "decai": [188, 190, 194], "regular": [188, 209, 217, 262], "adam": [189, 190], "infin": 189, "basi": 191, "appli": [191, 196, 203, 205, 206, 207, 209, 210, 212, 213, 214, 215, 216, 217, 219, 230, 237, 238, 239, 240, 242, 244, 246, 248, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "optimizerst": 191, "defaultdict": 192, "miss": [192, 225], "present": 192, "99": [190, 193], "tieleman": 193, "hinton": 193, "lectur": 193, "coursera": 193, "smooth": [193, 252, 260], "momentum": [190, 194, 205], "dampen": 194, "nesterov": 194, "descent": 194, "mu": 194, "tau": 194, "strength": [190, 194], "l2": [194, 254, 257], "penalti": 194, "is_leaf": [195, 196], "dot": [172, 195, 227, 236], "notat": [72, 195, 227], "depth": [195, 210], "hello": [195, 197], "charact": 195, "flat": [195, 197], "superset": 196, "extra": 196, "closer": 196, "dict_kei": 196, "recreat": 197, "world": 197, "42": 197, "tabl": [104, 199, 211], "byte": 199, "bool_": 199, "uint8": 199, "unsign": [129, 130, 199], "uint16": 199, "int8": 199, "sign": [190, 199], "int16": 199, "int64": 199, "64": [72, 129, 130, 199, 238], "arbitrarili": [203, 276, 277], "done": [146, 147, 203, 208], "manual": 203, "explicitli": [203, 274], "solv": 203, "intuit": 203, "finetun": 203, "enumer": 203, "caus": 203, "local": [203, 209], "scope": 203, "l2_loss": 203, "y_hat": 203, "trainable_paramet": [203, 222], "loss_and_grad": 203, "workhors": 203, "Its": 203, "individu": [203, 209, 210], "subset": [203, 222], "action": 203, "displai": 203, "tree_map": 203, "count": 203, "num_param": 203, "preclud": 203, "pure": [203, 273], "pattern": 203, "achiev": 203, "other_input": 203, "necessari": 203, "wrap": 203, "relu": [203, 237, 247, 263], "prelu": 203, "gelu": [203, 249, 250], "silu": 203, "selu": 203, "mish": 203, "conv1d": 203, "conv2d": 203, "layernorm": 203, "groupnorm": 203, "sequenti": 203, "gelu_approx": [203, 212, 248], "gelu_fast_approx": [203, 212, 248], "binary_cross_entropi": 203, "l1_loss": 203, "mse_loss": 203, "nll_loss": 203, "kl_div_loss": 203, "in_channel": [206, 207], "out_channel": [206, 207], "kernel_s": [206, 207], "nlc": [205, 206], "learnabl": [206, 207, 243], "nhwc": [205, 207], "height": [205, 207, 209, 210], "width": [205, 207, 209, 210, 238], "num_embed": 211, "lookup": 211, "typic": [211, 273], "usual": [211, 276], "vocabulari": 211, "approx": 212, "unit": [212, 240, 242, 244, 248, 249, 250, 264, 265, 266], "textrm": [129, 212, 248], "phi": [212, 248], "geluapprox": 212, "sigma": [212, 244, 249, 250, 266], "60033": [212, 249], "0433603": [212, 249], "gelufast": 212, "773": [212, 250], "regard": 212, "num_group": 213, "affin": [205, 213, 214, 215, 216, 238], "pytorch_compat": 213, "var": [205, 213, 214, 215], "gamma": [205, 213, 214, 215, 239], "particular": [129, 213], "split": 213, "preced": 213, "http": [147, 213, 214, 215, 217, 239, 262], "org": [213, 214, 215, 217, 239, 262], "1803": 213, "08494": 213, "1607": [214, 215], "06450": 215, "monoton": [217, 262], "refer": [104, 214, 217, 262], "1908": [217, 262], "08681": [217, 262], "tanh": [217, 262], "softplu": [217, 262], "query_input_dim": 236, "key_input_dim": 236, "value_input_dim": 236, "value_dim": 236, "value_output_dim": 236, "attent": [223, 236, 245, 247], "head": [236, 247], "aggreg": 236, "linearli": 236, "bias": [72, 129, 130, 223, 233, 236], "inf": [104, 236], "neg": [236, 259, 261], "attend": 236, "num_paramet": 237, "init": 237, "25": 237, "1910": 239, "07467": 239, "rectifi": [240, 264], "10000": 241, "rotat": 241, "consecut": [129, 241], "larger": [190, 241], "slightli": [241, 278], "angular": 241, "frequenc": [241, 245], "begin": [129, 242, 246, 254, 260, 265, 267], "leq": [242, 254, 265], "0507": [242, 265], "67326": [242, 265], "elu": [242, 265], "plain": 243, "known": [244, 266], "swish": [244, 266], "cdot": [244, 249, 250, 253, 266], "threshold": [246, 254, 260, 267], "geq": [246, 267], "faster": 248, "exact": [249, 250], "0003": 249, "015": 250, "predict": [251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "post": [], "612192": 251, "kullback": 255, "leibler": 255, "diverg": 255, "likelihood": 259, "nll": 259, "subsequ": 273, "implicit": 274, "fine": 274, "grain": 274, "manag": [274, 278], "uniform": [216, 225, 274, 278], "pseudo": 274, "altern": 274, "splittabl": 274, "threefri": 274, "counter": 274, "cycl": 276, "inspect": 277, "composit": 277, "sin": [245, 277], "pool": 278, "advantag": 278, "don": 278, "parallel": 278, "race": 278, "interest": 278, "albeit": 278, "contriv": 278, "suppos": 278, "d1": 278, "d2": 278, "4096": 278, "dens": 278, "better": 278, "millisecond": 278, "measur": 278, "default_stream": 279, "default_devic": 279, "my_devic": 279, "decim": [48, 144], "a_min": 63, "a_max": 63, "At": 63, "group_siz": [72, 129, 130, 238], "configur": 72, "formal": [72, 129], "quantiz": [72, 130, 238], "w_i": [72, 129], "hat": [72, 129], "occupi": [72, 129, 130], "floor": 95, "divid": [1, 95, 129], "50": 105, "evenli": 105, "w_1": 129, "w_g": 129, "align": 129, "max_i": 129, "min_i": 129, "round": 129, "pack": [129, 130], "1st": 129, "signific": 129, "2nd": 129, "dequant": 129, "w_q": 129, "bascial": [], "tend": 190, "10x": 190, "adamw": 190, "maintain": [190, 209, 210], "wd": 190, "chen": 190, "symbol": 190, "discoveri": 190, "2302": 190, "06675": 190, "c_": 190, "eta": 190, "c_t": 190, "constitut": 196, "quantizedlinear": 203, "smooth_l1_loss": 203, "triplet_loss": 203, "chang": [234, 238, 254, 260], "classmethod": 238, "from_linear": 238, "quantize_modul": 238, "pre": 251, "105361": 251, "223144": 251, "20397": 251, "916291": 251, "label_smooth": 252, "formula": 260, "anchor": 261, "margin": 261, "triplet": 261, "l_": [254, 261], "_p": 261, "degre": 261, "pairwis": 261, "instabl": 261, "tensor": [172, 261], "algebra": 5, "ord": 104, "frobeniu": 104, "matric": 104, "strictli": 104, "mathemat": 104, "variou": 104, "purpos": 104, "calcul": 104, "fro": 104, "largest": 104, "sing": 104, "smallest": 104, "singular": 104, "nuclear": 104, "_f": 104, "sum_": [104, 257], "a_": 104, "valueerror": [104, 225], "golub": 104, "van": 104, "loan": 104, "baltimor": 104, "md": 104, "john": 104, "hopkin": 104, "univers": 104, "1985": 104, "pg": 104, "la": 104, "arang": 104, "74597": 104, "20": 104, "84804": 104, "41421": 104, "23607": 104, "74166": 104, "24264": 104, "11": 104, "225": 104, "safetensor": [106, 147], "whether": [130, 146, 147, 222, 236], "repetit": 142, "huggingfac": 147, "apply_to_modul": [203, 223], "children": 203, "filter_and_map": 203, "leaf_modul": 203, "load_weight": 203, "named_modul": 203, "save_weight": 203, "unfreez": [203, 223], "update_modul": 203, "batchnorm": 203, "instancenorm": 203, "dropout": [203, 209, 210, 230, 247], "dropout2d": 203, "dropout3d": 203, "alibi": 203, "sinusoidalpositionalencod": 203, "hinge_loss": 203, "huber_loss": 203, "log_cosh_loss": 203, "track_running_stat": 205, "nc": 205, "four": 205, "deep": 205, "intern": 205, "covari": 205, "shift": 205, "bn": 205, "portion": 208, "independ": [209, 210], "nwhc": 209, "whc": 209, "entri": [209, 210], "benefici": [209, 210], "earli": 209, "adjac": 209, "pixel": 209, "correl": 209, "thompson": 209, "goroshin": 209, "jain": 209, "lecun": 209, "bregler": 209, "cvpr": 209, "ndhwc": 210, "dhwc": 210, "medic": 210, "video": 210, "inorm": 214, "08022": 214, "mathcal": 216, "u": 216, "d_i": 216, "map_fn": [218, 222], "filter_fn": [218, 222], "valid_parameter_filt": 218, "apply_fn": 219, "descend": 220, "is_leaf_fn": 222, "found": 222, "drop": 222, "idempot": [223, 233], "endswith": 223, "file_or_weight": 225, "ok": 225, "certain": 230, "ie": 233, "noop": 233, "unfrozen": 233, "tracer": 234, "partial": [234, 235], "child": 235, "programmat": 235, "parametr": [237, 263], "min_freq": 245, "0001": 245, "max_freq": 245, "cos_first": 245, "full_turn": 245, "sinusoid": 245, "num_encoder_lay": 247, "num_decoder_lay": 247, "custom_encod": 247, "custom_decod": 247, "norm_first": 247, "decod": 247, "interact": 247, "mechan": 247, "hidden": 247, "hing": 253, "y_": [253, 257], "pred": [253, 257], "huber": 254, "cosh": 257, "logcosh": 257, "sensit": 257, "outlier": 257, "dual": 257, "behavior": 257, "offer": 257, "balanc": 257, "robust": 257, "approach": 257, "task": 257}, "objects": {"mlx.core": [[7, 0, 1, "", "Device"], [8, 0, 1, "", "Dtype"], [9, 0, 1, "", "Stream"], [10, 2, 1, "", "abs"], [11, 2, 1, "", "add"], [12, 2, 1, "", "all"], [13, 2, 1, "", "allclose"], [14, 2, 1, "", "any"], [15, 2, 1, "", "arange"], [16, 2, 1, "", "arccos"], [17, 2, 1, "", "arccosh"], [18, 2, 1, "", "arcsin"], [19, 2, 1, "", "arcsinh"], [20, 2, 1, "", "arctan"], [21, 2, 1, "", "arctanh"], [22, 2, 1, "", "argmax"], [23, 2, 1, "", "argmin"], [24, 2, 1, "", "argpartition"], [25, 2, 1, "", "argsort"], [26, 0, 1, "", "array"], [60, 2, 1, "", "array_equal"], [61, 2, 1, "", "broadcast_to"], [62, 2, 1, "", "ceil"], [63, 2, 1, "", "clip"], [64, 2, 1, "", "concatenate"], [65, 2, 1, "", "conv1d"], [66, 2, 1, "", "conv2d"], [67, 2, 1, "", "convolve"], [68, 2, 1, "", "cos"], [69, 2, 1, "", "cosh"], [70, 2, 1, "", "default_device"], [71, 2, 1, "", "default_stream"], [72, 2, 1, "", "dequantize"], [73, 2, 1, "", "divide"], [74, 2, 1, "", "equal"], [75, 2, 1, "", "erf"], [76, 2, 1, "", "erfinv"], [77, 2, 1, "", "eval"], [78, 2, 1, "", "exp"], [79, 2, 1, "", "expand_dims"], [80, 2, 1, "", "eye"], [93, 2, 1, "", "flatten"], [94, 2, 1, "", "floor"], [95, 2, 1, "", "floor_divide"], [96, 2, 1, "", "full"], [97, 2, 1, "", "grad"], [98, 2, 1, "", "greater"], [99, 2, 1, "", "greater_equal"], [100, 2, 1, "", "identity"], [101, 2, 1, "", "jvp"], [102, 2, 1, "", "less"], [103, 2, 1, "", "less_equal"], [105, 2, 1, "", "linspace"], [106, 2, 1, "", "load"], [107, 2, 1, "", "log"], [108, 2, 1, "", "log10"], [109, 2, 1, "", "log1p"], [110, 2, 1, "", "log2"], [111, 2, 1, "", "logaddexp"], [112, 2, 1, "", "logical_not"], [113, 2, 1, "", "logsumexp"], [114, 2, 1, "", "matmul"], [115, 2, 1, "", "max"], [116, 2, 1, "", "maximum"], [117, 2, 1, "", "mean"], [118, 2, 1, "", "min"], [119, 2, 1, "", "minimum"], [120, 2, 1, "", "moveaxis"], [121, 2, 1, "", "multiply"], [122, 2, 1, "", "negative"], [123, 2, 1, "", "new_stream"], [124, 2, 1, "", "ones"], [125, 2, 1, "", "ones_like"], [126, 2, 1, "", "pad"], [127, 2, 1, "", "partition"], [128, 2, 1, "", "prod"], [129, 2, 1, "", "quantize"], [130, 2, 1, "", "quantized_matmul"], [141, 2, 1, "", "reciprocal"], [142, 2, 1, "", "repeat"], [143, 2, 1, "", "reshape"], [144, 2, 1, "", "round"], [145, 2, 1, "", "rsqrt"], [146, 2, 1, "", "save"], [147, 2, 1, "", "save_safetensors"], [148, 2, 1, "", "savez"], [149, 2, 1, "", "savez_compressed"], [150, 2, 1, "", "set_default_device"], [151, 2, 1, "", "set_default_stream"], [152, 2, 1, "", "sigmoid"], [153, 2, 1, "", "sign"], [154, 2, 1, "", "simplify"], [155, 2, 1, "", "sin"], [156, 2, 1, "", "sinh"], [157, 2, 1, "", "softmax"], [158, 2, 1, "", "sort"], [159, 2, 1, "", "split"], [160, 2, 1, "", "sqrt"], [161, 2, 1, "", "square"], [162, 2, 1, "", "squeeze"], [163, 2, 1, "", "stack"], [164, 2, 1, "", "stop_gradient"], [165, 2, 1, "", "subtract"], [166, 2, 1, "", "sum"], [167, 2, 1, "", "swapaxes"], [168, 2, 1, "", "take"], [169, 2, 1, "", "take_along_axis"], [170, 2, 1, "", "tan"], [171, 2, 1, "", "tanh"], [172, 2, 1, "", "tensordot"], [173, 2, 1, "", "transpose"], [174, 2, 1, "", "tri"], [175, 2, 1, "", "tril"], [176, 2, 1, "", "triu"], [177, 2, 1, "", "value_and_grad"], [178, 2, 1, "", "var"], [179, 2, 1, "", "vjp"], [180, 2, 1, "", "vmap"], [181, 2, 1, "", "where"], [182, 2, 1, "", "zeros"], [183, 2, 1, "", "zeros_like"]], "mlx.core.Device": [[7, 1, 1, "", "__init__"]], "mlx.core.Dtype": [[8, 1, 1, "", "__init__"]], "mlx.core.Stream": [[9, 1, 1, "", "__init__"]], "mlx.core.array": [[27, 3, 1, "", "T"], [26, 1, 1, "", "__init__"], [28, 1, 1, "", "abs"], [29, 1, 1, "", "all"], [30, 1, 1, "", "any"], [31, 1, 1, "", "argmax"], [32, 1, 1, "", "argmin"], [33, 1, 1, "", "astype"], [34, 1, 1, "", "cos"], [35, 3, 1, "", "dtype"], [36, 1, 1, "", "exp"], [37, 1, 1, "", "item"], [38, 1, 1, "", "log"], [39, 1, 1, "", "log1p"], [40, 1, 1, "", "logsumexp"], [41, 1, 1, "", "max"], [42, 1, 1, "", "mean"], [43, 1, 1, "", "min"], [44, 3, 1, "", "ndim"], [45, 1, 1, "", "prod"], [46, 1, 1, "", "reciprocal"], [47, 1, 1, "", "reshape"], [48, 1, 1, "", "round"], [49, 1, 1, "", "rsqrt"], [50, 3, 1, "", "shape"], [51, 1, 1, "", "sin"], [52, 3, 1, "", "size"], [53, 1, 1, "", "split"], [54, 1, 1, "", "sqrt"], [55, 1, 1, "", "square"], [56, 1, 1, "", "sum"], [57, 1, 1, "", "tolist"], [58, 1, 1, "", "transpose"], [59, 1, 1, "", "var"]], "mlx.core.fft": [[81, 2, 1, "", "fft"], [82, 2, 1, "", "fft2"], [83, 2, 1, "", "fftn"], [84, 2, 1, "", "ifft"], [85, 2, 1, "", "ifft2"], [86, 2, 1, "", "ifftn"], [87, 2, 1, "", "irfft"], [88, 2, 1, "", "irfft2"], [89, 2, 1, "", "irfftn"], [90, 2, 1, "", "rfft"], [91, 2, 1, "", "rfft2"], [92, 2, 1, "", "rfftn"]], "mlx.core.linalg": [[104, 2, 1, "", "norm"]], "mlx.core.random": [[131, 2, 1, "", "bernoulli"], [132, 2, 1, "", "categorical"], [133, 2, 1, "", "gumbel"], [134, 2, 1, "", "key"], [135, 2, 1, "", "normal"], [136, 2, 1, "", "randint"], [137, 2, 1, "", "seed"], [138, 2, 1, "", "split"], [139, 2, 1, "", "truncated_normal"], [140, 2, 1, "", "uniform"]], "mlx.nn": [[204, 0, 1, "", "ALiBi"], [205, 0, 1, "", "BatchNorm"], [206, 0, 1, "", "Conv1d"], [207, 0, 1, "", "Conv2d"], [208, 0, 1, "", "Dropout"], [209, 0, 1, "", "Dropout2d"], [210, 0, 1, "", "Dropout3d"], [211, 0, 1, "", "Embedding"], [212, 0, 1, "", "GELU"], [213, 0, 1, "", "GroupNorm"], [214, 0, 1, "", "InstanceNorm"], [215, 0, 1, "", "LayerNorm"], [216, 0, 1, "", "Linear"], [217, 0, 1, "", "Mish"], [271, 0, 1, "", "Module"], [236, 0, 1, "", "MultiHeadAttention"], [237, 0, 1, "", "PReLU"], [238, 0, 1, "", "QuantizedLinear"], [239, 0, 1, "", "RMSNorm"], [240, 0, 1, "", "ReLU"], [241, 0, 1, "", "RoPE"], [242, 0, 1, "", "SELU"], [243, 0, 1, "", "Sequential"], [244, 0, 1, "", "SiLU"], [245, 0, 1, "", "SinusoidalPositionalEncoding"], [246, 0, 1, "", "Step"], [247, 0, 1, "", "Transformer"], [248, 0, 1, "", "gelu"], [249, 0, 1, "", "gelu_approx"], [250, 0, 1, "", "gelu_fast_approx"], [262, 0, 1, "", "mish"], [263, 0, 1, "", "prelu"], [264, 0, 1, "", "relu"], [265, 0, 1, "", "selu"], [266, 0, 1, "", "silu"], [267, 0, 1, "", "step"], [184, 2, 1, "", "value_and_grad"]], "mlx.nn.Module": [[218, 1, 1, "", "apply"], [219, 1, 1, "", "apply_to_modules"], [220, 1, 1, "", "children"], [221, 1, 1, "", "eval"], [222, 1, 1, "", "filter_and_map"], [223, 1, 1, "", "freeze"], [224, 1, 1, "", "leaf_modules"], [225, 1, 1, "", "load_weights"], [226, 1, 1, "", "modules"], [227, 1, 1, "", "named_modules"], [228, 1, 1, "", "parameters"], [229, 1, 1, "", "save_weights"], [230, 1, 1, "", "train"], [231, 1, 1, "", "trainable_parameters"], [232, 3, 1, "", "training"], [233, 1, 1, "", "unfreeze"], [234, 1, 1, "", "update"], [235, 1, 1, "", "update_modules"]], "mlx.nn.losses": [[251, 0, 1, "", "binary_cross_entropy"], [252, 0, 1, "", "cross_entropy"], [253, 0, 1, "", "hinge_loss"], [254, 0, 1, "", "huber_loss"], [255, 0, 1, "", "kl_div_loss"], [256, 0, 1, "", "l1_loss"], [257, 0, 1, "", "log_cosh_loss"], [258, 0, 1, "", "mse_loss"], [259, 0, 1, "", "nll_loss"], [260, 0, 1, "", "smooth_l1_loss"], [261, 0, 1, "", "triplet_loss"]], "mlx.optimizers": [[185, 0, 1, "", "AdaDelta"], [186, 0, 1, "", "Adagrad"], [187, 0, 1, "", "Adam"], [188, 0, 1, "", "AdamW"], [189, 0, 1, "", "Adamax"], [190, 0, 1, "", "Lion"], [191, 0, 1, "", "Optimizer"], [192, 0, 1, "", "OptimizerState"], [193, 0, 1, "", "RMSprop"], [194, 0, 1, "", "SGD"]], "mlx.optimizers.Optimizer": [[191, 4, 1, "", "state"]], "mlx.utils": [[195, 2, 1, "", "tree_flatten"], [196, 2, 1, "", "tree_map"], [197, 2, 1, "", "tree_unflatten"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:function", "3": "py:property", "4": "py:attribute"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "function", "Python function"], "3": ["py", "property", "Python property"], "4": ["py", "attribute", "Python attribute"]}, "titleterms": {"oper": [0, 1, 272], "develop": 1, "document": 1, "introduc": 1, "exampl": [1, 5, 278], "primit": 1, "us": [1, 279], "implement": [1, 3], "cpu": 1, "backend": 1, "gpu": 1, "transform": [1, 247, 275, 277], "build": [1, 6], "bind": 1, "python": [1, 5, 6], "cmake": 1, "setuptool": 1, "usag": [1, 5], "result": 1, "script": [1, 3], "download": [1, 3], "code": [1, 3], "linear": [2, 202, 216], "regress": 2, "llm": 3, "infer": 3, "model": 3, "attent": 3, "layer": [3, 4, 269], "encod": 3, "full": [3, 96], "gener": 3, "put": 3, "all": [3, 12, 29], "togeth": 3, "convert": 3, "weight": 3, "load": [3, 106], "benchmark": 3, "multi": 4, "perceptron": 4, "mlx": [5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "instal": [5, 6], "api": [5, 6], "refer": 5, "c": [5, 6], "further": 5, "read": 5, "from": 6, "pypi": 6, "troubleshoot": 6, "sourc": 6, "requir": 6, "option": 6, "metal": 6, "found": 6, "core": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183], "devic": [7, 200], "dtype": [8, 35], "stream": [9, 200, 279], "ab": [10, 28], "add": 11, "allclos": 13, "ani": [14, 30], "arang": 15, "arcco": 16, "arccosh": 17, "arcsin": 18, "arcsinh": 19, "arctan": 20, "arctanh": 21, "argmax": [22, 31], "argmin": [23, 32], "argpartit": 24, "argsort": 25, "arrai": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 198], "t": 27, "astyp": 33, "co": [34, 68], "exp": [36, 78], "item": 37, "log": [38, 107], "log1p": [39, 109], "logsumexp": [40, 113], "max": [41, 115], "mean": [42, 117], "min": [43, 118], "ndim": 44, "prod": [45, 128], "reciproc": [46, 141], "reshap": [47, 143], "rsqrt": [49, 145], "shape": 50, "sin": [51, 155], "size": 52, "split": [53, 138, 159], "sqrt": [54, 160], "squar": [55, 161], "sum": [56, 166], "tolist": 57, "transpos": [58, 173], "var": [59, 178], "array_equ": 60, "broadcast_to": 61, "ceil": 62, "concaten": 64, "conv1d": [65, 206], "conv2d": [66, 207], "convolv": 67, "cosh": 69, "default_devic": 70, "default_stream": 71, "divid": 73, "equal": 74, "erf": 75, "erfinv": 76, "eval": [77, 221], "expand_dim": 79, "ey": 80, "fft": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 201], "fft2": 82, "fftn": 83, "ifft": 84, "ifft2": 85, "ifftn": 86, "irfft": 87, "irfft2": 88, "irfftn": 89, "rfft": 90, "rfft2": 91, "rfftn": 92, "flatten": 93, "floor": 94, "grad": [97, 203], "greater": 98, "greater_equ": 99, "ident": 100, "jvp": 101, "less": 102, "less_equ": 103, "log10": 108, "log2": 110, "logaddexp": 111, "logical_not": 112, "matmul": 114, "maximum": 116, "minimum": 119, "moveaxi": 120, "multipli": 121, "neg": 122, "new_stream": 123, "ones": 124, "ones_lik": 125, "pad": 126, "partit": 127, "random": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 274], "bernoulli": 131, "categor": 132, "gumbel": 133, "kei": 134, "normal": 135, "randint": 136, "seed": 137, "truncated_norm": 139, "uniform": 140, "save": 146, "savez": 148, "savez_compress": 149, "set_default_devic": 150, "set_default_stream": 151, "sigmoid": 152, "sign": 153, "simplifi": 154, "sinh": 156, "softmax": 157, "sort": 158, "squeez": 162, "stack": 163, "stop_gradi": 164, "subtract": 165, "swapax": 167, "take": 168, "take_along_axi": 169, "tan": 170, "tanh": 171, "tri": 174, "tril": 175, "triu": 176, "value_and_grad": [177, 184], "vjp": 179, "vmap": 180, "where": 181, "zero": 182, "zeros_lik": 183, "nn": [184, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "modul": [203, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 271], "optim": [185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 273], "adadelta": 185, "adagrad": 186, "adam": 187, "adamw": 188, "adamax": 189, "optimizerst": 192, "rmsprop": 193, "sgd": 194, "util": [195, 196, 197, 276], "tree_flatten": 195, "tree_map": 196, "tree_unflatten": 197, "data": 199, "type": 199, "support": 199, "neural": 203, "network": 203, "quick": [203, 277], "start": [203, 277], "The": 203, "class": 203, "paramet": [203, 228], "updat": [203, 234], "inspect": 203, "valu": 203, "embed": 211, "gelu": [212, 248], "groupnorm": 213, "layernorm": 215, "mish": [217, 262], "multiheadattent": 236, "prelu": [237, 263], "rmsnorm": 239, "relu": [240, 264], "rope": 241, "selu": [242, 265], "sequenti": 243, "silu": [244, 266], "step": [246, 267], "gelu_approx": 249, "gelu_fast_approx": 250, "loss": [251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 270], "binary_cross_entropi": 251, "cross_entropi": 252, "kl_div_loss": 255, "l1_loss": 256, "mse_loss": 258, "nll_loss": 259, "function": [268, 270, 277], "tree": 276, "guid": 277, "basic": 277, "graph": 277, "unifi": 278, "memori": 278, "A": 278, "simpl": 278, "specifi": 279, "round": [48, 144], "clip": 63, "dequant": 72, "floor_divid": 95, "linspac": 105, "quantiz": 129, "quantized_matmul": 130, "lion": 190, "quantizedlinear": 238, "smooth_l1_loss": 260, "triplet_loss": 261, "linalg": 104, "norm": 104, "repeat": 142, "save_safetensor": 147, "tensordot": 172, "algebra": 202, "alibi": 204, "batchnorm": 205, "dropout": 208, "dropout2d": 209, "dropout3d": 210, "instancenorm": 214, "appli": 218, "apply_to_modul": 219, "children": 220, "filter_and_map": 222, "freez": 223, "leaf_modul": 224, "load_weight": 225, "named_modul": 227, "save_weight": 229, "train": [230, 232], "trainable_paramet": 231, "unfreez": 233, "update_modul": 235, "sinusoidalpositionalencod": 245, "hinge_loss": 253, "huber_loss": 254, "log_cosh_loss": 257}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["cpp/ops", "dev/extensions", "examples/linear_regression", "examples/llama-inference", "examples/mlp", "index", "install", "python/_autosummary/mlx.core.Device", "python/_autosummary/mlx.core.Dtype", "python/_autosummary/mlx.core.Stream", "python/_autosummary/mlx.core.abs", "python/_autosummary/mlx.core.add", "python/_autosummary/mlx.core.all", "python/_autosummary/mlx.core.allclose", "python/_autosummary/mlx.core.any", "python/_autosummary/mlx.core.arange", "python/_autosummary/mlx.core.arccos", "python/_autosummary/mlx.core.arccosh", "python/_autosummary/mlx.core.arcsin", "python/_autosummary/mlx.core.arcsinh", "python/_autosummary/mlx.core.arctan", "python/_autosummary/mlx.core.arctanh", "python/_autosummary/mlx.core.argmax", "python/_autosummary/mlx.core.argmin", "python/_autosummary/mlx.core.argpartition", "python/_autosummary/mlx.core.argsort", "python/_autosummary/mlx.core.array", "python/_autosummary/mlx.core.array.T", "python/_autosummary/mlx.core.array.abs", "python/_autosummary/mlx.core.array.all", "python/_autosummary/mlx.core.array.any", "python/_autosummary/mlx.core.array.argmax", "python/_autosummary/mlx.core.array.argmin", "python/_autosummary/mlx.core.array.astype", "python/_autosummary/mlx.core.array.cos", "python/_autosummary/mlx.core.array.dtype", "python/_autosummary/mlx.core.array.exp", "python/_autosummary/mlx.core.array.item", "python/_autosummary/mlx.core.array.log", "python/_autosummary/mlx.core.array.log1p", "python/_autosummary/mlx.core.array.logsumexp", "python/_autosummary/mlx.core.array.max", "python/_autosummary/mlx.core.array.mean", "python/_autosummary/mlx.core.array.min", "python/_autosummary/mlx.core.array.ndim", "python/_autosummary/mlx.core.array.prod", "python/_autosummary/mlx.core.array.reciprocal", "python/_autosummary/mlx.core.array.reshape", "python/_autosummary/mlx.core.array.round", "python/_autosummary/mlx.core.array.rsqrt", "python/_autosummary/mlx.core.array.shape", "python/_autosummary/mlx.core.array.sin", "python/_autosummary/mlx.core.array.size", "python/_autosummary/mlx.core.array.split", "python/_autosummary/mlx.core.array.sqrt", "python/_autosummary/mlx.core.array.square", "python/_autosummary/mlx.core.array.sum", "python/_autosummary/mlx.core.array.tolist", "python/_autosummary/mlx.core.array.transpose", "python/_autosummary/mlx.core.array.var", "python/_autosummary/mlx.core.array_equal", "python/_autosummary/mlx.core.broadcast_to", "python/_autosummary/mlx.core.ceil", "python/_autosummary/mlx.core.clip", "python/_autosummary/mlx.core.concatenate", "python/_autosummary/mlx.core.conv1d", "python/_autosummary/mlx.core.conv2d", "python/_autosummary/mlx.core.convolve", "python/_autosummary/mlx.core.cos", "python/_autosummary/mlx.core.cosh", "python/_autosummary/mlx.core.default_device", "python/_autosummary/mlx.core.default_stream", "python/_autosummary/mlx.core.dequantize", "python/_autosummary/mlx.core.divide", "python/_autosummary/mlx.core.equal", "python/_autosummary/mlx.core.erf", "python/_autosummary/mlx.core.erfinv", "python/_autosummary/mlx.core.eval", "python/_autosummary/mlx.core.exp", "python/_autosummary/mlx.core.expand_dims", "python/_autosummary/mlx.core.eye", "python/_autosummary/mlx.core.fft.fft", "python/_autosummary/mlx.core.fft.fft2", "python/_autosummary/mlx.core.fft.fftn", "python/_autosummary/mlx.core.fft.ifft", "python/_autosummary/mlx.core.fft.ifft2", "python/_autosummary/mlx.core.fft.ifftn", "python/_autosummary/mlx.core.fft.irfft", "python/_autosummary/mlx.core.fft.irfft2", "python/_autosummary/mlx.core.fft.irfftn", "python/_autosummary/mlx.core.fft.rfft", "python/_autosummary/mlx.core.fft.rfft2", "python/_autosummary/mlx.core.fft.rfftn", "python/_autosummary/mlx.core.flatten", "python/_autosummary/mlx.core.floor", "python/_autosummary/mlx.core.floor_divide", "python/_autosummary/mlx.core.full", "python/_autosummary/mlx.core.grad", "python/_autosummary/mlx.core.greater", "python/_autosummary/mlx.core.greater_equal", "python/_autosummary/mlx.core.identity", "python/_autosummary/mlx.core.jvp", "python/_autosummary/mlx.core.less", "python/_autosummary/mlx.core.less_equal", "python/_autosummary/mlx.core.linalg.norm", "python/_autosummary/mlx.core.linspace", "python/_autosummary/mlx.core.load", "python/_autosummary/mlx.core.log", "python/_autosummary/mlx.core.log10", "python/_autosummary/mlx.core.log1p", "python/_autosummary/mlx.core.log2", "python/_autosummary/mlx.core.logaddexp", "python/_autosummary/mlx.core.logical_not", "python/_autosummary/mlx.core.logsumexp", "python/_autosummary/mlx.core.matmul", "python/_autosummary/mlx.core.max", "python/_autosummary/mlx.core.maximum", "python/_autosummary/mlx.core.mean", "python/_autosummary/mlx.core.min", "python/_autosummary/mlx.core.minimum", "python/_autosummary/mlx.core.moveaxis", "python/_autosummary/mlx.core.multiply", "python/_autosummary/mlx.core.negative", "python/_autosummary/mlx.core.new_stream", "python/_autosummary/mlx.core.ones", "python/_autosummary/mlx.core.ones_like", "python/_autosummary/mlx.core.pad", "python/_autosummary/mlx.core.partition", "python/_autosummary/mlx.core.prod", "python/_autosummary/mlx.core.quantize", "python/_autosummary/mlx.core.quantized_matmul", "python/_autosummary/mlx.core.random.bernoulli", "python/_autosummary/mlx.core.random.categorical", "python/_autosummary/mlx.core.random.gumbel", "python/_autosummary/mlx.core.random.key", "python/_autosummary/mlx.core.random.normal", "python/_autosummary/mlx.core.random.randint", "python/_autosummary/mlx.core.random.seed", "python/_autosummary/mlx.core.random.split", "python/_autosummary/mlx.core.random.truncated_normal", "python/_autosummary/mlx.core.random.uniform", "python/_autosummary/mlx.core.reciprocal", "python/_autosummary/mlx.core.repeat", "python/_autosummary/mlx.core.reshape", "python/_autosummary/mlx.core.round", "python/_autosummary/mlx.core.rsqrt", "python/_autosummary/mlx.core.save", "python/_autosummary/mlx.core.save_safetensors", "python/_autosummary/mlx.core.savez", "python/_autosummary/mlx.core.savez_compressed", "python/_autosummary/mlx.core.set_default_device", "python/_autosummary/mlx.core.set_default_stream", "python/_autosummary/mlx.core.sigmoid", "python/_autosummary/mlx.core.sign", "python/_autosummary/mlx.core.simplify", "python/_autosummary/mlx.core.sin", "python/_autosummary/mlx.core.sinh", "python/_autosummary/mlx.core.softmax", "python/_autosummary/mlx.core.sort", "python/_autosummary/mlx.core.split", "python/_autosummary/mlx.core.sqrt", "python/_autosummary/mlx.core.square", "python/_autosummary/mlx.core.squeeze", "python/_autosummary/mlx.core.stack", "python/_autosummary/mlx.core.stop_gradient", "python/_autosummary/mlx.core.subtract", "python/_autosummary/mlx.core.sum", "python/_autosummary/mlx.core.swapaxes", "python/_autosummary/mlx.core.take", "python/_autosummary/mlx.core.take_along_axis", "python/_autosummary/mlx.core.tan", "python/_autosummary/mlx.core.tanh", "python/_autosummary/mlx.core.tensordot", "python/_autosummary/mlx.core.transpose", "python/_autosummary/mlx.core.tri", "python/_autosummary/mlx.core.tril", "python/_autosummary/mlx.core.triu", "python/_autosummary/mlx.core.value_and_grad", "python/_autosummary/mlx.core.var", "python/_autosummary/mlx.core.vjp", "python/_autosummary/mlx.core.vmap", "python/_autosummary/mlx.core.where", "python/_autosummary/mlx.core.zeros", "python/_autosummary/mlx.core.zeros_like", "python/_autosummary/mlx.nn.value_and_grad", "python/_autosummary/mlx.optimizers.AdaDelta", "python/_autosummary/mlx.optimizers.Adagrad", "python/_autosummary/mlx.optimizers.Adam", "python/_autosummary/mlx.optimizers.AdamW", "python/_autosummary/mlx.optimizers.Adamax", "python/_autosummary/mlx.optimizers.Lion", "python/_autosummary/mlx.optimizers.Optimizer", "python/_autosummary/mlx.optimizers.OptimizerState", "python/_autosummary/mlx.optimizers.RMSprop", "python/_autosummary/mlx.optimizers.SGD", "python/_autosummary/mlx.utils.tree_flatten", "python/_autosummary/mlx.utils.tree_map", "python/_autosummary/mlx.utils.tree_unflatten", "python/array", "python/data_types", "python/devices_and_streams", "python/fft", "python/linalg", "python/nn", "python/nn/_autosummary/mlx.nn.ALiBi", "python/nn/_autosummary/mlx.nn.BatchNorm", "python/nn/_autosummary/mlx.nn.Conv1d", "python/nn/_autosummary/mlx.nn.Conv2d", "python/nn/_autosummary/mlx.nn.Dropout", "python/nn/_autosummary/mlx.nn.Dropout2d", "python/nn/_autosummary/mlx.nn.Dropout3d", "python/nn/_autosummary/mlx.nn.Embedding", "python/nn/_autosummary/mlx.nn.GELU", "python/nn/_autosummary/mlx.nn.GroupNorm", "python/nn/_autosummary/mlx.nn.InstanceNorm", "python/nn/_autosummary/mlx.nn.LayerNorm", "python/nn/_autosummary/mlx.nn.Linear", "python/nn/_autosummary/mlx.nn.Mish", "python/nn/_autosummary/mlx.nn.Module.apply", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules", "python/nn/_autosummary/mlx.nn.Module.children", "python/nn/_autosummary/mlx.nn.Module.eval", "python/nn/_autosummary/mlx.nn.Module.filter_and_map", "python/nn/_autosummary/mlx.nn.Module.freeze", "python/nn/_autosummary/mlx.nn.Module.leaf_modules", "python/nn/_autosummary/mlx.nn.Module.load_weights", "python/nn/_autosummary/mlx.nn.Module.modules", "python/nn/_autosummary/mlx.nn.Module.named_modules", "python/nn/_autosummary/mlx.nn.Module.parameters", "python/nn/_autosummary/mlx.nn.Module.save_weights", "python/nn/_autosummary/mlx.nn.Module.train", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters", "python/nn/_autosummary/mlx.nn.Module.training", "python/nn/_autosummary/mlx.nn.Module.unfreeze", "python/nn/_autosummary/mlx.nn.Module.update", "python/nn/_autosummary/mlx.nn.Module.update_modules", "python/nn/_autosummary/mlx.nn.MultiHeadAttention", "python/nn/_autosummary/mlx.nn.PReLU", "python/nn/_autosummary/mlx.nn.QuantizedLinear", "python/nn/_autosummary/mlx.nn.RMSNorm", "python/nn/_autosummary/mlx.nn.ReLU", "python/nn/_autosummary/mlx.nn.RoPE", "python/nn/_autosummary/mlx.nn.SELU", "python/nn/_autosummary/mlx.nn.Sequential", "python/nn/_autosummary/mlx.nn.SiLU", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding", "python/nn/_autosummary/mlx.nn.Step", "python/nn/_autosummary/mlx.nn.Transformer", "python/nn/_autosummary_functions/mlx.nn.gelu", "python/nn/_autosummary_functions/mlx.nn.gelu_approx", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss", "python/nn/_autosummary_functions/mlx.nn.mish", "python/nn/_autosummary_functions/mlx.nn.prelu", "python/nn/_autosummary_functions/mlx.nn.relu", "python/nn/_autosummary_functions/mlx.nn.selu", "python/nn/_autosummary_functions/mlx.nn.silu", "python/nn/_autosummary_functions/mlx.nn.step", "python/nn/functions", "python/nn/layers", "python/nn/losses", "python/nn/module", "python/ops", "python/optimizers", "python/random", "python/transforms", "python/tree_utils", "usage/numpy", "usage/quick_start", "usage/unified_memory", "usage/using_streams"], "filenames": ["cpp/ops.rst", "dev/extensions.rst", "examples/linear_regression.rst", "examples/llama-inference.rst", "examples/mlp.rst", "index.rst", "install.rst", "python/_autosummary/mlx.core.Device.rst", "python/_autosummary/mlx.core.Dtype.rst", "python/_autosummary/mlx.core.Stream.rst", "python/_autosummary/mlx.core.abs.rst", "python/_autosummary/mlx.core.add.rst", "python/_autosummary/mlx.core.all.rst", "python/_autosummary/mlx.core.allclose.rst", "python/_autosummary/mlx.core.any.rst", "python/_autosummary/mlx.core.arange.rst", "python/_autosummary/mlx.core.arccos.rst", "python/_autosummary/mlx.core.arccosh.rst", "python/_autosummary/mlx.core.arcsin.rst", "python/_autosummary/mlx.core.arcsinh.rst", "python/_autosummary/mlx.core.arctan.rst", "python/_autosummary/mlx.core.arctanh.rst", "python/_autosummary/mlx.core.argmax.rst", "python/_autosummary/mlx.core.argmin.rst", "python/_autosummary/mlx.core.argpartition.rst", "python/_autosummary/mlx.core.argsort.rst", "python/_autosummary/mlx.core.array.rst", "python/_autosummary/mlx.core.array.T.rst", "python/_autosummary/mlx.core.array.abs.rst", "python/_autosummary/mlx.core.array.all.rst", "python/_autosummary/mlx.core.array.any.rst", "python/_autosummary/mlx.core.array.argmax.rst", "python/_autosummary/mlx.core.array.argmin.rst", "python/_autosummary/mlx.core.array.astype.rst", "python/_autosummary/mlx.core.array.cos.rst", "python/_autosummary/mlx.core.array.dtype.rst", "python/_autosummary/mlx.core.array.exp.rst", "python/_autosummary/mlx.core.array.item.rst", "python/_autosummary/mlx.core.array.log.rst", "python/_autosummary/mlx.core.array.log1p.rst", "python/_autosummary/mlx.core.array.logsumexp.rst", "python/_autosummary/mlx.core.array.max.rst", "python/_autosummary/mlx.core.array.mean.rst", "python/_autosummary/mlx.core.array.min.rst", "python/_autosummary/mlx.core.array.ndim.rst", "python/_autosummary/mlx.core.array.prod.rst", "python/_autosummary/mlx.core.array.reciprocal.rst", "python/_autosummary/mlx.core.array.reshape.rst", "python/_autosummary/mlx.core.array.round.rst", "python/_autosummary/mlx.core.array.rsqrt.rst", "python/_autosummary/mlx.core.array.shape.rst", "python/_autosummary/mlx.core.array.sin.rst", "python/_autosummary/mlx.core.array.size.rst", "python/_autosummary/mlx.core.array.split.rst", "python/_autosummary/mlx.core.array.sqrt.rst", "python/_autosummary/mlx.core.array.square.rst", "python/_autosummary/mlx.core.array.sum.rst", "python/_autosummary/mlx.core.array.tolist.rst", "python/_autosummary/mlx.core.array.transpose.rst", "python/_autosummary/mlx.core.array.var.rst", "python/_autosummary/mlx.core.array_equal.rst", "python/_autosummary/mlx.core.broadcast_to.rst", "python/_autosummary/mlx.core.ceil.rst", "python/_autosummary/mlx.core.clip.rst", "python/_autosummary/mlx.core.concatenate.rst", "python/_autosummary/mlx.core.conv1d.rst", "python/_autosummary/mlx.core.conv2d.rst", "python/_autosummary/mlx.core.convolve.rst", "python/_autosummary/mlx.core.cos.rst", "python/_autosummary/mlx.core.cosh.rst", "python/_autosummary/mlx.core.default_device.rst", "python/_autosummary/mlx.core.default_stream.rst", "python/_autosummary/mlx.core.dequantize.rst", "python/_autosummary/mlx.core.divide.rst", "python/_autosummary/mlx.core.equal.rst", "python/_autosummary/mlx.core.erf.rst", "python/_autosummary/mlx.core.erfinv.rst", "python/_autosummary/mlx.core.eval.rst", "python/_autosummary/mlx.core.exp.rst", "python/_autosummary/mlx.core.expand_dims.rst", "python/_autosummary/mlx.core.eye.rst", "python/_autosummary/mlx.core.fft.fft.rst", "python/_autosummary/mlx.core.fft.fft2.rst", "python/_autosummary/mlx.core.fft.fftn.rst", "python/_autosummary/mlx.core.fft.ifft.rst", "python/_autosummary/mlx.core.fft.ifft2.rst", "python/_autosummary/mlx.core.fft.ifftn.rst", "python/_autosummary/mlx.core.fft.irfft.rst", "python/_autosummary/mlx.core.fft.irfft2.rst", "python/_autosummary/mlx.core.fft.irfftn.rst", "python/_autosummary/mlx.core.fft.rfft.rst", "python/_autosummary/mlx.core.fft.rfft2.rst", "python/_autosummary/mlx.core.fft.rfftn.rst", "python/_autosummary/mlx.core.flatten.rst", "python/_autosummary/mlx.core.floor.rst", "python/_autosummary/mlx.core.floor_divide.rst", "python/_autosummary/mlx.core.full.rst", "python/_autosummary/mlx.core.grad.rst", "python/_autosummary/mlx.core.greater.rst", "python/_autosummary/mlx.core.greater_equal.rst", "python/_autosummary/mlx.core.identity.rst", "python/_autosummary/mlx.core.jvp.rst", "python/_autosummary/mlx.core.less.rst", "python/_autosummary/mlx.core.less_equal.rst", "python/_autosummary/mlx.core.linalg.norm.rst", "python/_autosummary/mlx.core.linspace.rst", "python/_autosummary/mlx.core.load.rst", "python/_autosummary/mlx.core.log.rst", "python/_autosummary/mlx.core.log10.rst", "python/_autosummary/mlx.core.log1p.rst", "python/_autosummary/mlx.core.log2.rst", "python/_autosummary/mlx.core.logaddexp.rst", "python/_autosummary/mlx.core.logical_not.rst", "python/_autosummary/mlx.core.logsumexp.rst", "python/_autosummary/mlx.core.matmul.rst", "python/_autosummary/mlx.core.max.rst", "python/_autosummary/mlx.core.maximum.rst", "python/_autosummary/mlx.core.mean.rst", "python/_autosummary/mlx.core.min.rst", "python/_autosummary/mlx.core.minimum.rst", "python/_autosummary/mlx.core.moveaxis.rst", "python/_autosummary/mlx.core.multiply.rst", "python/_autosummary/mlx.core.negative.rst", "python/_autosummary/mlx.core.new_stream.rst", "python/_autosummary/mlx.core.ones.rst", "python/_autosummary/mlx.core.ones_like.rst", "python/_autosummary/mlx.core.pad.rst", "python/_autosummary/mlx.core.partition.rst", "python/_autosummary/mlx.core.prod.rst", "python/_autosummary/mlx.core.quantize.rst", "python/_autosummary/mlx.core.quantized_matmul.rst", "python/_autosummary/mlx.core.random.bernoulli.rst", "python/_autosummary/mlx.core.random.categorical.rst", "python/_autosummary/mlx.core.random.gumbel.rst", "python/_autosummary/mlx.core.random.key.rst", "python/_autosummary/mlx.core.random.normal.rst", "python/_autosummary/mlx.core.random.randint.rst", "python/_autosummary/mlx.core.random.seed.rst", "python/_autosummary/mlx.core.random.split.rst", "python/_autosummary/mlx.core.random.truncated_normal.rst", "python/_autosummary/mlx.core.random.uniform.rst", "python/_autosummary/mlx.core.reciprocal.rst", "python/_autosummary/mlx.core.repeat.rst", "python/_autosummary/mlx.core.reshape.rst", "python/_autosummary/mlx.core.round.rst", "python/_autosummary/mlx.core.rsqrt.rst", "python/_autosummary/mlx.core.save.rst", "python/_autosummary/mlx.core.save_safetensors.rst", "python/_autosummary/mlx.core.savez.rst", "python/_autosummary/mlx.core.savez_compressed.rst", "python/_autosummary/mlx.core.set_default_device.rst", "python/_autosummary/mlx.core.set_default_stream.rst", "python/_autosummary/mlx.core.sigmoid.rst", "python/_autosummary/mlx.core.sign.rst", "python/_autosummary/mlx.core.simplify.rst", "python/_autosummary/mlx.core.sin.rst", "python/_autosummary/mlx.core.sinh.rst", "python/_autosummary/mlx.core.softmax.rst", "python/_autosummary/mlx.core.sort.rst", "python/_autosummary/mlx.core.split.rst", "python/_autosummary/mlx.core.sqrt.rst", "python/_autosummary/mlx.core.square.rst", "python/_autosummary/mlx.core.squeeze.rst", "python/_autosummary/mlx.core.stack.rst", "python/_autosummary/mlx.core.stop_gradient.rst", "python/_autosummary/mlx.core.subtract.rst", "python/_autosummary/mlx.core.sum.rst", "python/_autosummary/mlx.core.swapaxes.rst", "python/_autosummary/mlx.core.take.rst", "python/_autosummary/mlx.core.take_along_axis.rst", "python/_autosummary/mlx.core.tan.rst", "python/_autosummary/mlx.core.tanh.rst", "python/_autosummary/mlx.core.tensordot.rst", "python/_autosummary/mlx.core.transpose.rst", "python/_autosummary/mlx.core.tri.rst", "python/_autosummary/mlx.core.tril.rst", "python/_autosummary/mlx.core.triu.rst", "python/_autosummary/mlx.core.value_and_grad.rst", "python/_autosummary/mlx.core.var.rst", "python/_autosummary/mlx.core.vjp.rst", "python/_autosummary/mlx.core.vmap.rst", "python/_autosummary/mlx.core.where.rst", "python/_autosummary/mlx.core.zeros.rst", "python/_autosummary/mlx.core.zeros_like.rst", "python/_autosummary/mlx.nn.value_and_grad.rst", "python/_autosummary/mlx.optimizers.AdaDelta.rst", "python/_autosummary/mlx.optimizers.Adagrad.rst", "python/_autosummary/mlx.optimizers.Adam.rst", "python/_autosummary/mlx.optimizers.AdamW.rst", "python/_autosummary/mlx.optimizers.Adamax.rst", "python/_autosummary/mlx.optimizers.Lion.rst", "python/_autosummary/mlx.optimizers.Optimizer.rst", "python/_autosummary/mlx.optimizers.OptimizerState.rst", "python/_autosummary/mlx.optimizers.RMSprop.rst", "python/_autosummary/mlx.optimizers.SGD.rst", "python/_autosummary/mlx.utils.tree_flatten.rst", "python/_autosummary/mlx.utils.tree_map.rst", "python/_autosummary/mlx.utils.tree_unflatten.rst", "python/array.rst", "python/data_types.rst", "python/devices_and_streams.rst", "python/fft.rst", "python/linalg.rst", "python/nn.rst", "python/nn/_autosummary/mlx.nn.ALiBi.rst", "python/nn/_autosummary/mlx.nn.BatchNorm.rst", "python/nn/_autosummary/mlx.nn.Conv1d.rst", "python/nn/_autosummary/mlx.nn.Conv2d.rst", "python/nn/_autosummary/mlx.nn.Dropout.rst", "python/nn/_autosummary/mlx.nn.Dropout2d.rst", "python/nn/_autosummary/mlx.nn.Dropout3d.rst", "python/nn/_autosummary/mlx.nn.Embedding.rst", "python/nn/_autosummary/mlx.nn.GELU.rst", "python/nn/_autosummary/mlx.nn.GroupNorm.rst", "python/nn/_autosummary/mlx.nn.InstanceNorm.rst", "python/nn/_autosummary/mlx.nn.LayerNorm.rst", "python/nn/_autosummary/mlx.nn.Linear.rst", "python/nn/_autosummary/mlx.nn.Mish.rst", "python/nn/_autosummary/mlx.nn.Module.apply.rst", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules.rst", "python/nn/_autosummary/mlx.nn.Module.children.rst", "python/nn/_autosummary/mlx.nn.Module.eval.rst", "python/nn/_autosummary/mlx.nn.Module.filter_and_map.rst", "python/nn/_autosummary/mlx.nn.Module.freeze.rst", "python/nn/_autosummary/mlx.nn.Module.leaf_modules.rst", "python/nn/_autosummary/mlx.nn.Module.load_weights.rst", "python/nn/_autosummary/mlx.nn.Module.modules.rst", "python/nn/_autosummary/mlx.nn.Module.named_modules.rst", "python/nn/_autosummary/mlx.nn.Module.parameters.rst", "python/nn/_autosummary/mlx.nn.Module.save_weights.rst", "python/nn/_autosummary/mlx.nn.Module.train.rst", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters.rst", "python/nn/_autosummary/mlx.nn.Module.training.rst", "python/nn/_autosummary/mlx.nn.Module.unfreeze.rst", "python/nn/_autosummary/mlx.nn.Module.update.rst", "python/nn/_autosummary/mlx.nn.Module.update_modules.rst", "python/nn/_autosummary/mlx.nn.MultiHeadAttention.rst", "python/nn/_autosummary/mlx.nn.PReLU.rst", "python/nn/_autosummary/mlx.nn.QuantizedLinear.rst", "python/nn/_autosummary/mlx.nn.RMSNorm.rst", "python/nn/_autosummary/mlx.nn.ReLU.rst", "python/nn/_autosummary/mlx.nn.RoPE.rst", "python/nn/_autosummary/mlx.nn.SELU.rst", "python/nn/_autosummary/mlx.nn.Sequential.rst", "python/nn/_autosummary/mlx.nn.SiLU.rst", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.rst", "python/nn/_autosummary/mlx.nn.Step.rst", "python/nn/_autosummary/mlx.nn.Transformer.rst", "python/nn/_autosummary_functions/mlx.nn.gelu.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_approx.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.rst", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.rst", "python/nn/_autosummary_functions/mlx.nn.mish.rst", "python/nn/_autosummary_functions/mlx.nn.prelu.rst", "python/nn/_autosummary_functions/mlx.nn.relu.rst", "python/nn/_autosummary_functions/mlx.nn.selu.rst", "python/nn/_autosummary_functions/mlx.nn.silu.rst", "python/nn/_autosummary_functions/mlx.nn.step.rst", "python/nn/functions.rst", "python/nn/layers.rst", "python/nn/losses.rst", "python/nn/module.rst", "python/ops.rst", "python/optimizers.rst", "python/random.rst", "python/transforms.rst", "python/tree_utils.rst", "usage/numpy.rst", "usage/quick_start.rst", "usage/unified_memory.rst", "usage/using_streams.rst"], "titles": ["Operations", "Developer Documentation", "Linear Regression", "LLM inference", "Multi-Layer Perceptron", "MLX", "Build and Install", "mlx.core.Device", "mlx.core.Dtype", "mlx.core.Stream", "mlx.core.abs", "mlx.core.add", "mlx.core.all", "mlx.core.allclose", "mlx.core.any", "mlx.core.arange", "mlx.core.arccos", "mlx.core.arccosh", "mlx.core.arcsin", "mlx.core.arcsinh", "mlx.core.arctan", "mlx.core.arctanh", "mlx.core.argmax", "mlx.core.argmin", "mlx.core.argpartition", "mlx.core.argsort", "mlx.core.array", "mlx.core.array.T", "mlx.core.array.abs", "mlx.core.array.all", "mlx.core.array.any", "mlx.core.array.argmax", "mlx.core.array.argmin", "mlx.core.array.astype", "mlx.core.array.cos", "mlx.core.array.dtype", "mlx.core.array.exp", "mlx.core.array.item", "mlx.core.array.log", "mlx.core.array.log1p", "mlx.core.array.logsumexp", "mlx.core.array.max", "mlx.core.array.mean", "mlx.core.array.min", "mlx.core.array.ndim", "mlx.core.array.prod", "mlx.core.array.reciprocal", "mlx.core.array.reshape", "mlx.core.array.round", "mlx.core.array.rsqrt", "mlx.core.array.shape", "mlx.core.array.sin", "mlx.core.array.size", "mlx.core.array.split", "mlx.core.array.sqrt", "mlx.core.array.square", "mlx.core.array.sum", "mlx.core.array.tolist", "mlx.core.array.transpose", "mlx.core.array.var", "mlx.core.array_equal", "mlx.core.broadcast_to", "mlx.core.ceil", "mlx.core.clip", "mlx.core.concatenate", "mlx.core.conv1d", "mlx.core.conv2d", "mlx.core.convolve", "mlx.core.cos", "mlx.core.cosh", "mlx.core.default_device", "mlx.core.default_stream", "mlx.core.dequantize", "mlx.core.divide", "mlx.core.equal", "mlx.core.erf", "mlx.core.erfinv", "mlx.core.eval", "mlx.core.exp", "mlx.core.expand_dims", "mlx.core.eye", "mlx.core.fft.fft", "mlx.core.fft.fft2", "mlx.core.fft.fftn", "mlx.core.fft.ifft", "mlx.core.fft.ifft2", "mlx.core.fft.ifftn", "mlx.core.fft.irfft", "mlx.core.fft.irfft2", "mlx.core.fft.irfftn", "mlx.core.fft.rfft", "mlx.core.fft.rfft2", "mlx.core.fft.rfftn", "mlx.core.flatten", "mlx.core.floor", "mlx.core.floor_divide", "mlx.core.full", "mlx.core.grad", "mlx.core.greater", "mlx.core.greater_equal", "mlx.core.identity", "mlx.core.jvp", "mlx.core.less", "mlx.core.less_equal", "mlx.core.linalg.norm", "mlx.core.linspace", "mlx.core.load", "mlx.core.log", "mlx.core.log10", "mlx.core.log1p", "mlx.core.log2", "mlx.core.logaddexp", "mlx.core.logical_not", "mlx.core.logsumexp", "mlx.core.matmul", "mlx.core.max", "mlx.core.maximum", "mlx.core.mean", "mlx.core.min", "mlx.core.minimum", "mlx.core.moveaxis", "mlx.core.multiply", "mlx.core.negative", "mlx.core.new_stream", "mlx.core.ones", "mlx.core.ones_like", "mlx.core.pad", "mlx.core.partition", "mlx.core.prod", "mlx.core.quantize", "mlx.core.quantized_matmul", "mlx.core.random.bernoulli", "mlx.core.random.categorical", "mlx.core.random.gumbel", "mlx.core.random.key", "mlx.core.random.normal", "mlx.core.random.randint", "mlx.core.random.seed", "mlx.core.random.split", "mlx.core.random.truncated_normal", "mlx.core.random.uniform", "mlx.core.reciprocal", "mlx.core.repeat", "mlx.core.reshape", "mlx.core.round", "mlx.core.rsqrt", "mlx.core.save", "mlx.core.save_safetensors", "mlx.core.savez", "mlx.core.savez_compressed", "mlx.core.set_default_device", "mlx.core.set_default_stream", "mlx.core.sigmoid", "mlx.core.sign", "mlx.core.simplify", "mlx.core.sin", "mlx.core.sinh", "mlx.core.softmax", "mlx.core.sort", "mlx.core.split", "mlx.core.sqrt", "mlx.core.square", "mlx.core.squeeze", "mlx.core.stack", "mlx.core.stop_gradient", "mlx.core.subtract", "mlx.core.sum", "mlx.core.swapaxes", "mlx.core.take", "mlx.core.take_along_axis", "mlx.core.tan", "mlx.core.tanh", "mlx.core.tensordot", "mlx.core.transpose", "mlx.core.tri", "mlx.core.tril", "mlx.core.triu", "mlx.core.value_and_grad", "mlx.core.var", "mlx.core.vjp", "mlx.core.vmap", "mlx.core.where", "mlx.core.zeros", "mlx.core.zeros_like", "mlx.nn.value_and_grad", "mlx.optimizers.AdaDelta", "mlx.optimizers.Adagrad", "mlx.optimizers.Adam", "mlx.optimizers.AdamW", "mlx.optimizers.Adamax", "mlx.optimizers.Lion", "mlx.optimizers.Optimizer", "mlx.optimizers.OptimizerState", "mlx.optimizers.RMSprop", "mlx.optimizers.SGD", "mlx.utils.tree_flatten", "mlx.utils.tree_map", "mlx.utils.tree_unflatten", "Array", "Data Types", "Devices and Streams", "FFT", "Linear Algebra", "Neural Networks", "mlx.nn.ALiBi", "mlx.nn.BatchNorm", "mlx.nn.Conv1d", "mlx.nn.Conv2d", "mlx.nn.Dropout", "mlx.nn.Dropout2d", "mlx.nn.Dropout3d", "mlx.nn.Embedding", "mlx.nn.GELU", "mlx.nn.GroupNorm", "mlx.nn.InstanceNorm", "mlx.nn.LayerNorm", "mlx.nn.Linear", "mlx.nn.Mish", "mlx.nn.Module.apply", "mlx.nn.Module.apply_to_modules", "mlx.nn.Module.children", "mlx.nn.Module.eval", "mlx.nn.Module.filter_and_map", "mlx.nn.Module.freeze", "mlx.nn.Module.leaf_modules", "mlx.nn.Module.load_weights", "mlx.nn.Module.modules", "mlx.nn.Module.named_modules", "mlx.nn.Module.parameters", "mlx.nn.Module.save_weights", "mlx.nn.Module.train", "mlx.nn.Module.trainable_parameters", "mlx.nn.Module.training", "mlx.nn.Module.unfreeze", "mlx.nn.Module.update", "mlx.nn.Module.update_modules", "mlx.nn.MultiHeadAttention", "mlx.nn.PReLU", "mlx.nn.QuantizedLinear", "mlx.nn.RMSNorm", "mlx.nn.ReLU", "mlx.nn.RoPE", "mlx.nn.SELU", "mlx.nn.Sequential", "mlx.nn.SiLU", "mlx.nn.SinusoidalPositionalEncoding", "mlx.nn.Step", "mlx.nn.Transformer", "mlx.nn.gelu", "mlx.nn.gelu_approx", "mlx.nn.gelu_fast_approx", "mlx.nn.losses.binary_cross_entropy", "mlx.nn.losses.cross_entropy", "mlx.nn.losses.hinge_loss", "mlx.nn.losses.huber_loss", "mlx.nn.losses.kl_div_loss", "mlx.nn.losses.l1_loss", "mlx.nn.losses.log_cosh_loss", "mlx.nn.losses.mse_loss", "mlx.nn.losses.nll_loss", "mlx.nn.losses.smooth_l1_loss", "mlx.nn.losses.triplet_loss", "mlx.nn.mish", "mlx.nn.prelu", "mlx.nn.relu", "mlx.nn.selu", "mlx.nn.silu", "mlx.nn.step", "Functions", "Layers", "Loss Functions", "Module", "Operations", "Optimizers", "Random", "Transforms", "Tree Utils", "Conversion to NumPy and Other Frameworks", "Quick Start Guide", "Unified Memory", "Using Streams"], "terms": {"mlx": [1, 2, 3, 4, 6, 203, 271, 273, 274, 276, 277, 278, 279], "provid": [1, 3, 72, 97, 172, 177, 196, 203, 218, 223, 225, 233, 234, 235, 238, 247, 268, 271, 280], "open": [1, 15, 136, 140], "flexibl": [1, 5, 235], "which": [1, 3, 4, 5, 6, 15, 33, 77, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 97, 101, 104, 106, 129, 132, 133, 142, 143, 146, 147, 148, 149, 162, 163, 168, 177, 179, 180, 209, 210, 212, 218, 222, 241, 252, 254, 260, 274, 279, 280], "user": [1, 3, 203], "mai": [1, 104, 209], "add": [1, 3, 79, 111, 126, 129, 206, 207, 279], "special": 1, "without": [1, 3, 5, 164, 236, 268, 276, 277, 279], "much": [1, 3], "hassl": 1, "while": [1, 3, 6, 143, 241, 277], "librari": [1, 6, 203], "suppli": 1, "effici": [1, 3, 5, 209, 241, 278], "can": [1, 3, 5, 6, 11, 15, 47, 58, 73, 74, 77, 98, 99, 102, 103, 104, 111, 116, 119, 121, 131, 132, 136, 139, 140, 165, 177, 203, 211, 222, 233, 243, 271, 273, 274, 276, 277, 278, 279, 280], "compos": [1, 5, 203, 278], "ani": [1, 3, 5, 15, 154, 195, 196, 197, 203, 212, 218, 219, 222, 238, 247, 276, 278, 279], "number": [1, 15, 52, 66, 72, 80, 97, 100, 101, 105, 126, 129, 130, 132, 135, 138, 140, 142, 144, 154, 172, 174, 177, 179, 180, 203, 205, 206, 207, 209, 210, 213, 214, 236, 237, 247, 274, 280], "applic": [1, 6], "aris": [1, 277], "case": [1, 3, 83, 86, 87, 89, 90, 91, 92, 93, 114, 143, 162, 209, 242, 246, 260, 265, 267, 278, 279, 280], "where": [1, 4, 80, 129, 177, 180, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 216, 222, 237, 239, 242, 244, 246, 248, 249, 250, 263, 265, 266, 267], "new": [1, 4, 61, 120, 143, 163, 173, 196, 236, 271, 273, 277], "function": [1, 2, 3, 4, 5, 13, 75, 76, 77, 97, 101, 104, 114, 146, 147, 152, 154, 177, 179, 180, 184, 196, 203, 212, 217, 219, 223, 233, 237, 243, 246, 247, 248, 249, 250, 262, 267, 273, 274, 276, 277], "highli": [1, 6], "optim": [1, 2, 4, 5, 234], "ar": [1, 2, 3, 4, 5, 6, 13, 15, 60, 61, 63, 67, 80, 82, 83, 85, 86, 88, 89, 91, 92, 97, 101, 104, 114, 126, 127, 129, 130, 131, 132, 133, 136, 139, 140, 148, 149, 162, 163, 168, 177, 179, 180, 190, 195, 196, 205, 206, 207, 208, 209, 210, 213, 214, 215, 216, 225, 236, 238, 268, 271, 276, 277, 278, 279], "need": [1, 3, 4, 5, 60, 129, 203, 234, 235, 245, 247, 274, 277, 278, 279], "For": [1, 3, 6, 104, 129, 147, 197, 203, 205, 209, 218, 223, 230, 233, 238, 241, 245, 274, 277, 278, 279], "you": [1, 3, 4, 5, 6, 203, 245, 247, 274, 277, 279], "design": [1, 2, 5, 274, 279], "your": [1, 3, 6, 271], "own": [1, 6, 277], "link": [1, 6], "top": [1, 216], "core": [1, 2, 3, 4, 203, 205, 214, 225, 228, 231, 251, 271, 273, 277, 278], "we": [1, 2, 3, 4, 72, 129, 130, 188, 190, 203, 211, 243, 274, 276, 279], "inner": 1, "work": [1, 3, 6], "go": [1, 3], "over": [1, 3, 4, 12, 14, 22, 23, 24, 25, 65, 66, 83, 86, 89, 92, 104, 105, 113, 115, 117, 118, 127, 128, 145, 157, 158, 166, 172, 178, 205, 206, 207, 213, 215, 239, 252], "simpl": [1, 3, 4, 203, 211, 268], "learn": [1, 2, 4, 5, 185, 186, 187, 188, 189, 190, 193, 194, 205, 213, 214, 215, 237, 239], "step": [1, 3, 4, 15, 203], "involv": [1, 273], "ad": [1, 2, 6, 185, 186, 187, 188, 189, 193, 214, 271], "let": [1, 2, 3, 277], "s": [1, 2, 3, 4, 35, 44, 72, 82, 83, 85, 86, 88, 89, 91, 92, 97, 104, 106, 117, 129, 132, 144, 147, 177, 178, 180, 184, 191, 203, 222, 223, 225, 229, 233, 273, 274, 277, 278, 279], "sai": [1, 3], "would": [1, 3, 277, 279], "like": [1, 3, 5, 125, 183, 210, 257, 277, 278, 279], "an": [1, 3, 4, 6, 8, 12, 14, 26, 61, 65, 66, 77, 80, 93, 96, 100, 104, 115, 118, 120, 124, 125, 126, 128, 129, 130, 142, 143, 144, 159, 162, 167, 168, 169, 172, 174, 180, 182, 183, 185, 191, 192, 195, 196, 203, 208, 213, 215, 216, 218, 236, 237, 238, 247, 249, 263, 274, 276, 277, 278, 279, 280], "take": [1, 3, 4, 97, 101, 116, 119, 125, 130, 169, 177, 179, 180, 183, 236, 274, 279, 280], "two": [1, 11, 13, 60, 73, 74, 82, 85, 91, 98, 99, 102, 103, 111, 114, 116, 119, 121, 167, 238, 279], "arrai": [1, 3, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 203, 205, 218, 225, 228, 231, 237, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 267, 271, 277, 278, 279], "x": [1, 2, 3, 4, 75, 100, 104, 130, 133, 144, 148, 152, 154, 175, 176, 181, 190, 196, 203, 205, 212, 213, 214, 215, 216, 217, 218, 237, 239, 240, 242, 244, 245, 246, 248, 249, 250, 260, 262, 263, 264, 265, 266, 267, 271, 273, 277, 278, 279], "y": [1, 2, 3, 4, 154, 181, 186, 203, 205, 209, 213, 214, 215, 216, 239, 253, 260, 273, 277], "scale": [1, 3, 72, 129, 130, 209, 210, 236, 241, 242, 245, 265], "them": [1, 3, 203, 223, 233, 279], "both": [1, 11, 73, 74, 98, 99, 102, 103, 104, 111, 116, 119, 121, 132, 165, 214, 273, 278, 279], "some": [1, 2, 3, 4, 223, 233], "coeffici": [1, 185, 187, 188, 189, 190], "alpha": [1, 129, 188, 193, 242, 261, 263, 265], "beta": [1, 72, 129, 187, 188, 189, 190, 205, 213, 214, 215, 260], "respect": [1, 2, 4, 97, 129, 177, 196, 203, 205, 212, 213, 214, 215, 271, 278], "togeth": [1, 4, 129, 196], "get": [1, 2, 4, 66, 134, 192, 203, 279], "z": [1, 154], "well": [1, 3, 203, 223, 233, 236], "veri": [1, 3, 236, 279], "easili": 1, "do": [1, 3, 6, 188, 203, 224, 233, 271], "just": [1, 4], "write": [1, 3, 203, 277], "out": [1, 6, 209, 210, 230], "follow": [1, 3, 4, 5, 6, 15, 67, 72, 104, 129, 185, 186, 187, 188, 189, 190, 194, 203, 249, 250, 255, 274, 279], "import": [1, 2, 3, 4, 6, 104, 148, 154, 177, 195, 196, 197, 203, 205, 214, 225, 251, 271, 277, 278], "mx": [1, 2, 3, 4, 104, 148, 154, 177, 203, 205, 214, 218, 225, 240, 251, 255, 264, 271, 273, 274, 277, 278, 279, 280], "def": [1, 2, 3, 4, 154, 177, 203, 271, 277, 279], "simple_axpbi": 1, "float": [1, 13, 15, 57, 95, 96, 104, 130, 131, 136, 139, 140, 185, 186, 187, 188, 189, 190, 193, 194, 199, 205, 208, 209, 210, 213, 214, 215, 218, 239, 241, 245, 246, 247, 252, 254, 260, 261, 267], "return": [1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 37, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 195, 196, 197, 203, 220, 222, 224, 226, 227, 228, 231, 238, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 271, 276, 277, 279], "thi": [1, 3, 4, 6, 12, 13, 14, 15, 22, 23, 24, 25, 77, 101, 104, 111, 113, 114, 115, 117, 118, 127, 128, 132, 154, 157, 158, 159, 166, 168, 178, 203, 208, 209, 210, 219, 220, 222, 223, 226, 227, 228, 231, 233, 234, 235, 236, 238, 246, 249, 250, 257, 267, 271, 276, 277], "perform": [1, 3, 5, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 114, 130, 144, 157, 168, 203, 213, 247, 279], "leav": [1, 196], "differenti": [1, 5], "howev": [1, 203, 212, 213, 274, 277], "vector": [1, 2, 5, 101, 104, 168, 179, 180, 211, 278], "math": [1, 3, 261], "often": [1, 210], "realiz": 1, "axpbi": 1, "routin": 1, "defin": [1, 2, 3, 4, 6, 104, 130, 192, 195, 277], "same": [1, 3, 6, 60, 61, 66, 67, 87, 90, 91, 92, 97, 101, 126, 132, 144, 179, 181, 203, 205, 208, 213, 214, 238, 261, 271, 274, 279], "realli": 1, "part": 1, "doe": [1, 3, 6, 203, 277], "fast": [1, 154, 212, 250, 279], "so": [1, 3, 6, 97, 154, 177, 208, 273, 279], "decid": [1, 196, 222], "want": [1, 3, 279], "reli": 1, "acceler": [1, 205], "framework": [1, 5], "continu": 1, "impos": 1, "our": [1, 3, 4, 185, 186, 187, 189, 190, 243], "assumpt": 1, "also": [1, 3, 4, 5, 11, 73, 74, 83, 86, 89, 92, 98, 99, 102, 103, 111, 116, 119, 121, 129, 165, 184, 192, 203, 222, 234, 236, 238, 242, 244, 248, 265, 266, 268, 273, 277, 278, 280], "assum": [1, 3, 196, 203, 213], "how": [1, 3, 4, 203, 206, 207, 211, 279], "gradient": [1, 2, 4, 97, 164, 177, 184, 185, 187, 188, 189, 190, 194, 203, 223, 234, 238, 257, 271, 273, 277, 278], "ins": 1, "what": [1, 3, 196], "coincid": 1, "right": [1, 129, 212, 249, 250, 254, 261], "place": [1, 3, 144, 277], "cours": 1, "The": [1, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 35, 44, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 147, 152, 153, 155, 156, 157, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 199, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216, 219, 225, 234, 235, 236, 238, 239, 241, 243, 245, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 271, 273, 277, 278, 279, 280], "structur": [1, 77], "from": [1, 3, 4, 5, 72, 88, 89, 91, 92, 96, 104, 106, 114, 125, 129, 131, 132, 133, 134, 136, 139, 148, 162, 164, 165, 168, 169, 181, 183, 195, 196, 197, 203, 216, 223, 225, 236, 260, 276, 277, 278, 279], "frontend": 1, "api": 1, "redirect": 1, "when": [1, 3, 5, 6, 104, 206, 207, 255, 260, 271, 274, 279], "appropri": 1, "fallback": 1, "metal": 1, "vjp": [1, 278], "jvp": [1, 278], "In": [1, 3, 4, 114, 129, 185, 186, 187, 189, 190, 196, 203, 209, 213, 271, 276, 279], "one": [1, 3, 6, 57, 63, 66, 79, 80, 104, 109, 114, 130, 132, 162, 165, 233, 279], "sentenc": 1, "comput": [1, 2, 3, 4, 5, 6, 72, 97, 101, 104, 111, 117, 129, 154, 157, 164, 172, 177, 178, 179, 184, 185, 187, 188, 189, 190, 203, 205, 213, 214, 215, 223, 234, 238, 239, 241, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 273, 278, 279], "graph": [1, 3, 4, 5, 77, 146, 147, 154], "rule": 1, "evalu": [1, 3, 4, 77, 101, 146, 147, 179, 203, 221, 230, 271, 273, 278], "said": [1, 3], "start": [1, 2, 3, 5, 6, 15, 105, 159, 279], "discuss": 1, "more": [1, 4, 8, 57, 114, 147, 203, 205, 209, 241, 245, 274, 279], "detail": [1, 8, 185, 186, 187, 189, 190, 203, 209, 241, 245], "thei": [1, 2, 3, 67, 190, 243, 253, 271, 276, 278, 279], "c": [1, 3, 104, 199, 205, 206, 207, 209, 210, 214, 277, 278, 279], "scalar": [1, 11, 13, 26, 37, 57, 60, 61, 63, 73, 74, 95, 96, 97, 98, 99, 102, 103, 104, 105, 111, 112, 114, 116, 119, 121, 126, 136, 139, 140, 165, 177, 181, 184, 261, 278], "sum": [1, 2, 11, 104, 113, 157, 172, 203, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 277], "element": [1, 10, 11, 16, 17, 18, 19, 20, 21, 24, 52, 62, 68, 69, 72, 73, 74, 75, 76, 78, 80, 94, 95, 98, 99, 102, 103, 107, 108, 109, 110, 111, 112, 116, 119, 121, 122, 127, 129, 130, 141, 142, 145, 152, 153, 155, 156, 160, 161, 165, 168, 170, 171, 177, 181, 208, 209, 210, 217, 237, 241, 244, 262, 263, 266], "wise": [1, 10, 11, 16, 17, 18, 19, 20, 21, 62, 68, 69, 73, 74, 75, 76, 78, 94, 95, 98, 99, 102, 103, 107, 108, 109, 110, 111, 112, 116, 119, 121, 122, 141, 145, 152, 153, 155, 156, 160, 161, 165, 170, 171, 209, 210, 217, 237, 244, 262, 263, 266], "numpi": [1, 3, 4, 5, 11, 13, 15, 61, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165, 278], "style": [1, 11, 13, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165], "broadcast": [1, 11, 13, 61, 63, 73, 74, 96, 98, 99, 102, 103, 111, 114, 116, 119, 121, 131, 132, 139, 140, 165, 169, 181, 236], "between": [1, 5, 63, 247, 253, 254, 257, 279], "input": [1, 2, 3, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 104, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 125, 126, 127, 128, 129, 130, 138, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 175, 176, 177, 178, 180, 181, 183, 205, 206, 207, 209, 210, 211, 213, 214, 215, 216, 236, 238, 239, 241, 246, 247, 251, 253, 254, 255, 257, 259, 261, 267, 278], "upcast": 1, "const": 1, "factor": [1, 252], "streamordevic": 1, "stream": [1, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 151, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 181, 182, 183, 279], "schedul": [1, 279], "itself": 1, "call": [1, 3, 4, 27, 95, 203, 211, 223, 233, 243, 271, 273], "other": [1, 3, 5, 104, 190, 203, 224, 271, 278], "within": [1, 24], "simplest": [1, 203], "wai": [1, 3, 6, 203], "about": [1, 3, 4, 279], "term": [1, 185, 186, 187, 188, 189, 193], "exist": [1, 3, 223, 233], "auto": [1, 6], "ax": [1, 12, 14, 22, 23, 58, 79, 82, 83, 85, 86, 88, 89, 91, 92, 104, 113, 115, 117, 118, 126, 128, 157, 162, 166, 167, 172, 173, 178], "multipli": [1, 129, 130, 208, 245], "earlier": 1, "goal": 1, "themselv": 1, "contain": [1, 3, 50, 77, 87, 88, 89, 104, 112, 129, 159, 181, 203, 222, 224, 225, 247, 271], "act": [1, 257], "data": [1, 4, 5, 8, 15, 80, 90, 91, 96, 100, 105, 124, 139, 174, 182, 210, 277], "nor": [1, 97, 177], "rather": [1, 279], "easi": [1, 203], "interfac": 1, "block": [1, 3, 247], "A": [1, 3, 5, 6, 50, 60, 97, 101, 104, 106, 113, 114, 129, 131, 132, 133, 135, 136, 139, 140, 159, 163, 177, 179, 180, 184, 187, 189, 195, 196, 197, 203, 205, 209, 213, 214, 215, 217, 222, 226, 227, 234, 235, 239, 243, 245, 247, 250, 261, 262, 271, 273, 277], "It": [1, 3, 6, 97, 177, 189, 191, 203, 235, 238, 277], "creat": [1, 3, 6, 80, 100, 203, 271, 273, 277], "output": [1, 3, 6, 12, 13, 14, 15, 22, 23, 24, 61, 80, 87, 90, 91, 92, 96, 97, 100, 104, 105, 113, 115, 117, 118, 124, 125, 127, 128, 131, 132, 133, 135, 136, 139, 140, 148, 149, 157, 162, 166, 169, 174, 177, 178, 179, 180, 181, 182, 183, 205, 206, 207, 214, 216, 236, 238, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 277, 278, 279], "given": [1, 12, 14, 24, 61, 63, 64, 72, 77, 79, 81, 82, 83, 84, 85, 86, 90, 91, 92, 96, 104, 113, 115, 117, 118, 128, 136, 144, 157, 159, 166, 174, 175, 176, 178, 208, 222, 236], "set": [1, 3, 4, 6, 192, 212, 216, 221, 223, 230, 233, 234, 238, 241, 246, 261, 267, 271, 274], "further": [1, 6], "class": [1, 3, 4, 7, 8, 9, 26, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 271], "under": [1, 104], "These": [1, 169, 279], "word": 1, "bit": [1, 72, 129, 130, 199, 218, 238], "abstract": 1, "back": [1, 3, 277], "give": [1, 3, 4, 24], "ourselv": 1, "concret": [1, 216, 279], "imag": [1, 207, 209, 210], "public": [1, 203], "explicit": [1, 274, 277], "alpha_": 1, "beta_": 1, "must": [1, 6, 63, 77, 96, 104, 131, 132, 136, 139, 140, 181, 277], "know": [1, 3], "popul": 1, "To": [1, 2, 3, 4, 6, 203, 278], "avoid": 1, "unnecessari": [1, 3], "alloc": [1, 271], "respons": 1, "space": [1, 105, 259], "void": 1, "eval_cpu": 1, "std": 1, "overrid": 1, "eval_gpu": 1, "jacobian": [1, 101, 179, 278], "product": [1, 101, 114, 128, 172, 179, 236, 278], "primal": [1, 101, 179], "tangent": [1, 20, 21, 101, 170, 171], "int": [1, 3, 4, 7, 9, 12, 14, 15, 22, 23, 24, 25, 29, 30, 31, 32, 40, 41, 42, 43, 45, 48, 50, 53, 56, 57, 59, 61, 64, 65, 66, 72, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 100, 104, 105, 113, 115, 117, 118, 120, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 157, 158, 159, 162, 163, 166, 167, 168, 169, 172, 173, 174, 175, 176, 177, 178, 180, 182, 203, 205, 206, 207, 211, 213, 214, 215, 216, 236, 238, 239, 241, 245, 247, 252, 255, 259, 261, 271], "argnum": [1, 97, 177], "cotan": 1, "across": [1, 213], "pair": [1, 126, 225, 241], "repres": [1, 3, 261, 277], "axi": [1, 3, 4, 12, 14, 22, 23, 24, 25, 29, 30, 31, 32, 40, 41, 42, 43, 45, 53, 56, 59, 64, 79, 81, 84, 87, 88, 89, 90, 91, 92, 104, 113, 115, 117, 118, 120, 126, 127, 128, 132, 142, 157, 158, 159, 162, 163, 166, 167, 168, 169, 173, 178, 180, 252, 255, 259, 261], "correspond": [1, 12, 14, 57, 63, 72, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 113, 115, 118, 128, 166, 172, 180, 196], "dimens": [1, 3, 12, 14, 22, 23, 44, 50, 57, 66, 79, 88, 89, 91, 92, 93, 104, 113, 114, 115, 117, 118, 128, 129, 132, 138, 166, 169, 172, 173, 178, 205, 206, 207, 209, 210, 213, 214, 215, 236, 239, 241, 247], "vmap": [1, 278], "print": [1, 2, 3, 4, 6, 195, 196, 197, 203, 274, 277, 278], "ostream": 1, "os": [1, 6], "equival": [1, 27, 47, 58, 95, 168, 212, 235, 237, 238], "check": [1, 6, 60, 225], "bool": [1, 12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 57, 59, 60, 77, 104, 113, 115, 117, 118, 128, 130, 131, 136, 139, 140, 146, 147, 166, 178, 194, 205, 206, 207, 213, 214, 215, 216, 218, 222, 223, 225, 230, 233, 236, 238, 241, 245, 247], "is_equival": 1, "privat": 1, "fall": 1, "eval": [1, 2, 3, 4, 154, 203, 271, 273, 278], "deriv": 1, "base": [1, 77, 104, 108, 110, 189, 191, 241, 247, 271, 273, 274], "abov": [1, 3, 6, 129, 175, 188, 203, 279], "demonstr": [1, 277], "treat": [1, 60, 88, 89, 91, 92, 168], "paramet": [1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 193, 194, 195, 196, 197, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 222, 223, 225, 230, 233, 234, 235, 236, 237, 238, 239, 241, 243, 245, 246, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 268, 271, 273], "produc": [1, 236], "through": [1, 164, 190, 247, 277], "construct": [1, 4, 96, 124, 182], "its": [1, 6, 114, 127, 138, 154, 174, 184, 187, 188, 189, 197, 203, 238, 277, 279], "type": [1, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 33, 50, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 191, 195, 203, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "shape": [1, 3, 4, 47, 60, 61, 65, 66, 81, 84, 87, 90, 91, 92, 96, 101, 114, 124, 125, 131, 132, 133, 135, 136, 139, 140, 143, 169, 179, 181, 182, 183, 203, 205, 206, 207, 209, 210, 214, 216, 225, 261, 273, 278, 279], "pass": [1, 3, 4, 47, 58, 126, 177, 184, 195, 196, 203, 223, 233, 234, 235, 238, 243], "re": [1, 4], "now": [1, 3, 238], "promot": 1, "dtype": [1, 3, 15, 26, 33, 57, 80, 96, 100, 104, 105, 124, 133, 135, 136, 139, 140, 174, 182, 199, 251, 277, 278], "promoted_dtyp": 1, "promote_typ": 1, "float32": [1, 15, 80, 100, 104, 105, 124, 133, 135, 139, 140, 174, 182, 199, 251, 277, 278], "non": [1, 6, 217, 231, 262, 271], "point": [1, 2, 3, 6, 95, 130, 199], "out_dtyp": 1, "is_floating_point": 1, "cast": [1, 33, 90, 91, 92, 218], "up": [1, 3, 238], "determin": 1, "x_cast": 1, "astyp": [1, 3, 218, 277], "y_cast": 1, "broadcasted_input": 1, "broadcast_arrai": 1, "out_shap": 1, "0": [1, 2, 3, 4, 6, 7, 15, 48, 53, 59, 64, 65, 66, 80, 93, 97, 104, 126, 131, 140, 142, 144, 159, 163, 174, 175, 176, 177, 178, 180, 185, 187, 188, 189, 190, 193, 194, 195, 203, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 237, 240, 241, 242, 245, 246, 247, 249, 250, 251, 252, 253, 254, 260, 261, 263, 264, 265, 267, 271, 274, 277, 278], "unique_ptr": 1, "make_uniqu": 1, "to_stream": 1, "handl": [1, 203], "resolv": 1, "No": [1, 3], "happen": [1, 3, 247, 273], "alon": [1, 277], "effect": [1, 209], "onli": [1, 3, 5, 6, 60, 65, 66, 104, 129, 146, 147, 199, 203, 222, 223, 225, 230, 233, 234, 235, 271, 279], "execut": [1, 6, 277, 279], "depend": [1, 2, 57, 104, 279], "devic": [1, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 150, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 181, 182, 183, 279, 280], "specifi": [1, 15, 33, 66, 88, 89, 96, 97, 104, 105, 120, 124, 132, 142, 167, 168, 169, 172, 173, 177, 180, 182, 205, 246, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 267, 279], "memori": [1, 5, 154, 271, 277], "ha": [1, 3, 4, 5, 57, 87, 88, 90, 91, 92, 97, 132, 205, 216, 271, 273, 278, 279], "been": [1, 3], "try": [1, 6], "naiv": 1, "gener": [1, 2, 15, 80, 88, 89, 105, 131, 135, 136, 139, 140, 247, 274, 280], "version": [1, 6, 72, 111, 113, 129, 157, 180, 274], "declar": 1, "member": [1, 203, 228, 231], "method": [1, 3, 7, 8, 9, 26, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 203, 271], "each": [1, 50, 72, 77, 114, 126, 129, 130, 132, 142, 148, 149, 159, 173, 180, 181, 209, 210, 211, 213, 241, 247, 252, 274], "find": [1, 2, 6], "pointwis": 1, "captur": [1, 203], "templat": 1, "axpby_impl": 1, "typenam": 1, "t": [1, 3, 75, 130, 177, 185, 186, 187, 188, 189, 190, 193, 194, 203, 279], "readi": 1, "fill": [1, 96, 125, 174, 183], "malloc_or_wait": 1, "synchron": 1, "avail": [1, 2, 3, 4, 6, 8, 199, 279], "There": [1, 203], "wait": [1, 3], "here": [1, 3, 279], "request": 1, "pressur": 1, "condit": [1, 181, 279], "set_data": 1, "nbyte": 1, "collect": [1, 192, 196, 276], "pointer": 1, "x_ptr": 1, "y_ptr": 1, "out_ptr": 1, "relev": 1, "static_cast": 1, "size_t": 1, "out_idx": 1, "size": [1, 3, 4, 50, 66, 72, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 96, 100, 104, 129, 130, 132, 143, 159, 162, 203, 206, 207, 211, 214, 238, 277], "map": [1, 4, 106, 196, 211, 218], "linear": [1, 3, 4, 5, 196, 203, 212, 225, 238, 240, 242, 244, 248, 249, 250, 264, 265, 266, 271], "indic": [1, 13, 22, 23, 24, 25, 77, 97, 159, 168, 169, 177, 230, 232, 252], "offset": [1, 3], "x_offset": 1, "elem_to_loc": 1, "stride": [1, 65, 66, 206, 207, 241], "y_offset": 1, "contigu": 1, "regularli": 1, "default": [1, 6, 12, 14, 15, 22, 23, 24, 25, 60, 64, 65, 66, 72, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 97, 100, 104, 105, 106, 113, 115, 117, 118, 124, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 142, 143, 144, 146, 147, 158, 159, 162, 163, 166, 172, 173, 174, 175, 176, 177, 178, 180, 182, 185, 186, 187, 188, 189, 190, 192, 193, 194, 199, 205, 206, 207, 214, 216, 218, 223, 225, 230, 233, 236, 237, 238, 241, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 271, 274, 276, 277, 280], "row": [1, 80, 100, 129, 174], "major": 1, "henc": [1, 129], "doesn": [1, 203], "addit": [1, 3, 11, 205, 213, 215, 236, 239, 271], "abl": [1, 129], "all": [1, 4, 6, 13, 24, 66, 77, 80, 83, 86, 89, 92, 114, 126, 127, 162, 191, 203, 218, 219, 223, 226, 227, 228, 231, 233, 236, 238, 245, 247, 271, 274, 278, 280], "incom": 1, "accordingli": 1, "dispatch": 1, "float16": [1, 199, 218, 277], "bfloat16": [1, 277], "complex64": 1, "throw": 1, "error": [1, 6, 75, 76, 159, 212, 238, 248, 249, 250, 257, 258, 277], "encount": 1, "unexpect": [1, 15], "regist": [1, 4], "op": [1, 223], "assert": 1, "2": [1, 2, 3, 4, 66, 75, 82, 85, 87, 88, 89, 90, 91, 92, 104, 110, 114, 129, 138, 172, 174, 175, 176, 185, 186, 187, 188, 193, 199, 203, 207, 212, 239, 245, 249, 254, 260, 261, 271, 277, 278, 279], "1": [1, 3, 4, 15, 24, 25, 65, 66, 81, 82, 84, 85, 87, 88, 89, 90, 91, 92, 93, 104, 114, 127, 129, 132, 140, 152, 158, 168, 177, 185, 186, 187, 188, 189, 190, 193, 194, 199, 203, 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, 216, 237, 239, 241, 242, 245, 246, 249, 250, 251, 252, 253, 254, 255, 257, 259, 260, 261, 265, 267, 271, 273, 277, 278, 279], "correct": [1, 187, 188, 189], "els": [1, 3, 203, 223], "float16_t": 1, "bfloat16_t": 1, "complex64_t": 1, "runtime_error": 1, "support": [1, 3, 5, 6, 13, 65, 66, 106, 114, 129, 277], "have": [1, 3, 6, 60, 88, 89, 91, 92, 114, 132, 190, 195, 236, 243, 276, 279], "rememb": 1, "3": [1, 3, 6, 104, 190, 274, 277, 278], "complic": 1, "keep": [1, 12, 14, 22, 23, 113, 115, 117, 118, 128, 166, 178, 203, 222], "mind": [1, 3], "half": [1, 15, 136, 140, 241], "precis": [1, 3, 203, 212], "direct": [1, 3, 190, 220, 279], "fix": [1, 3, 6], "possibl": [1, 3, 114, 159, 211, 279], "due": 1, "transpos": [1, 3, 27, 130], "aren": 1, "guarante": 1, "fit": [1, 129, 279], "requir": [1, 3, 203, 277], "column": [1, 80, 100, 129], "inplac": 1, "expect": [1, 3, 206, 207, 208, 209, 210, 245, 247], "answer": 1, "copi": [1, 3, 5, 127, 158, 277], "simpli": [1, 3, 6, 240, 264, 271], "catlas_saxpbi": 1, "axpby_impl_acceler": 1, "first": [1, 2, 3, 4, 6, 93, 97, 114, 127, 138, 167, 172, 177, 187, 188, 189, 195, 203, 213, 277, 279], "mode": [1, 67, 221, 230, 232], "i": [1, 3, 101, 104, 188, 203, 206, 207, 209, 210, 223, 257], "e": [1, 4, 6, 75, 101, 152, 186, 205, 206, 207, 209, 210, 213, 214, 215, 223, 239, 268, 273, 280], "match": [1, 6, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 225, 277], "transposit": 1, "data_s": 1, "items": 1, "flag": [1, 277], "copy_inplac": 1, "copytyp": 1, "n": [1, 3, 26, 65, 66, 80, 81, 83, 84, 86, 87, 90, 92, 100, 174, 178, 205, 206, 207, 209, 210, 257, 261], "incx": 1, "inci": 1, "great": 1, "But": [1, 279], "criteria": 1, "luckili": 1, "alwai": [1, 195], "With": 1, "final": [1, 2, 3, 4], "singl": [1, 4, 77, 101, 106, 126, 179], "row_contigu": 1, "col_contigu": 1, "common": 1, "hit": 1, "mileston": 1, "enough": 1, "run": [1, 3, 4, 5, 6, 154, 185, 187, 188, 189, 205, 218, 279, 280], "If": [1, 3, 6, 12, 14, 15, 22, 23, 24, 25, 57, 60, 63, 64, 67, 77, 90, 91, 92, 95, 96, 97, 104, 106, 113, 114, 115, 117, 118, 124, 126, 127, 128, 132, 142, 146, 147, 157, 158, 159, 166, 168, 169, 172, 177, 178, 180, 182, 196, 205, 206, 207, 213, 215, 216, 223, 225, 233, 238, 241, 243, 245, 261, 279, 280], "plan": 1, "stop": [1, 3, 15, 105, 164], "enjoi": 1, "speed": 1, "appl": [1, 3, 5, 6, 279], "silicon": [1, 3, 5, 6, 279], "address": 1, "shade": 1, "languag": [1, 199], "kernel": [1, 65, 66], "written": 1, "help": [1, 3, 279], "resourc": 1, "walkthrough": 1, "pipelin": 1, "specif": [1, 6], "cpp": 1, "algorithm": [1, 190], "launch": 1, "exactli": [1, 3, 225], "mani": [1, 159, 206, 207, 211], "thread": 1, "pick": 1, "updat": [1, 2, 3, 4, 188, 190, 194, 196, 205, 218, 225, 235, 273], "assign": [1, 271], "axpby_gener": 1, "buffer": [1, 277], "constant": [1, 3, 6, 126, 193, 205, 213, 215, 239, 261, 277], "4": [1, 3, 72, 104, 129, 130, 148, 199, 205, 214, 238, 247, 278, 279], "5": [1, 2, 3, 6, 104, 131, 193, 205, 208, 209, 210, 214, 260], "x_stride": 1, "6": [1, 3, 104, 148, 193, 247, 249, 250, 261, 278], "y_stride": 1, "7": [1, 3, 104, 129], "ndim": [1, 104], "8": [1, 3, 6, 104, 129, 185, 186, 187, 188, 189, 193, 199, 214, 247, 278, 279], "uint": 1, "index": [1, 7, 9, 24, 79, 80, 97, 127, 147, 168, 169, 177], "thread_position_in_grid": 1, "convert": [1, 57, 238, 277, 278], "instanti": [1, 4], "uniqu": [1, 274], "host": 1, "name": [1, 106, 129, 130, 147, 148, 149, 192, 203, 213, 222, 225, 227], "identifi": [1, 195, 276], "instantiate_axpbi": 1, "type_nam": 1, "host_nam": 1, "axpby_general_": 1, "compil": [1, 6], "mlx_ext": 1, "metallib": [1, 6], "see": [1, 3, 4, 6, 8, 28, 29, 30, 31, 32, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 104, 147, 203, 205, 209, 212, 221, 237, 238, 241, 242, 245, 248, 249, 250, 265, 279], "later": [1, 6], "co": [1, 147, 245], "locat": [1, 234, 235, 279], "share": [1, 5, 72, 129, 130], "register_librari": 1, "potenti": 1, "path": [1, 6, 148, 149, 225], "tri": 1, "load": [1, 4, 225], "hasn": 1, "alreadi": [1, 3], "static": [1, 6], "object": [1, 8, 26, 37, 57, 131, 136, 139, 140, 180, 195, 196, 209, 276], "why": [1, 3], "packag": [1, 2, 4], "process": [1, 3, 67, 196, 210, 211, 247, 276], "logic": [1, 112], "grid": 1, "shown": 1, "below": [1, 104, 174, 176, 199], "prepar": [1, 3], "carri": 1, "should": [1, 2, 3, 4, 6, 77, 101, 129, 154, 169, 177, 179, 195, 203, 206, 207, 209, 210, 230, 236, 243, 253, 271, 276, 277, 280], "d": [1, 3, 104, 114, 168, 174, 175, 176, 185, 187, 189, 197, 210, 279], "ostringstream": 1, "kname": 1, "axpby_": 1, "general_": 1, "type_to_nam": 1, "make": [1, 3, 4, 6, 114, 203, 278, 279], "sure": [1, 3, 6, 203], "look": [1, 3], "folder": 1, "get_colocated_mtllib_path": 1, "get_kernel": 1, "str": [1, 67, 97, 104, 106, 146, 147, 148, 149, 177, 195, 197, 218, 219, 222, 223, 225, 227, 229, 233, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "encod": [1, 241, 245, 247], "compute_encod": 1, "get_command_encod": 1, "setcomputepipelinest": 1, "those": [1, 3, 203], "nelem": 1, "set_array_buff": 1, "setbyt": 1, "sizeof": 1, "threadgroup": 1, "higher": 1, "than": [1, 3, 57, 67, 98, 99, 102, 103, 114, 190, 196, 241, 246, 260, 267, 279], "max": [1, 104, 116, 189, 237, 253, 261, 263, 279], "allow": [1, 191, 203, 235, 271, 278], "tgp_size": 1, "min": [1, 104, 119, 237, 263], "maxtotalthreadsperthreadgroup": 1, "3d": [1, 205, 210], "mtl": 1, "group_dim": 1, "grid_dim": 1, "divid": [1, 95, 129], "among": 1, "dispatchthread": 1, "few": [1, 3, 4, 5, 154, 278], "thing": [1, 3], "note": [1, 3, 6, 13, 65, 66, 88, 89, 104, 129, 132, 203, 277], "befor": [1, 3, 6, 24, 127, 222, 247], "move": [1, 120, 279], "track": [1, 203, 205], "activ": [1, 6, 209, 217, 246, 247, 262, 267, 268], "command": [1, 6], "instead": [1, 203, 235, 245], "end_encod": 1, "end": [1, 129, 242, 246, 254, 260, 265, 267], "until": [1, 278], "limit": [1, 63], "flush": 1, "enqueu": 1, "commit": 1, "associ": [1, 148, 149], "suggest": 1, "deeper": 1, "dive": 1, "studi": 1, "come": [1, 3], "far": [1, 273], "built": [1, 6], "includ": [1, 219, 238, 278, 280], "forward": [1, 177], "diff": 1, "push": 1, "along": [1, 22, 23, 64, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 104, 142, 157, 159, 163, 168, 169, 172, 203], "similarli": [1, 6, 114], "scale_arr": 1, "contribut": 1, "tangent_x": 1, "tangent_i": 1, "revers": [1, 173, 245], "arg": [1, 3, 8, 47, 58, 77, 148, 149, 154], "push_back": 1, "fulli": [1, 5, 277, 279], "overal": 1, "directori": [1, 3, 6], "extens": [1, 106, 199], "h": [1, 65, 66, 104, 205, 207, 209, 210], "mlx_sample_extens": 1, "__init__": [1, 3, 4, 7, 8, 9, 26, 203, 271], "py": [1, 3, 6], "cmakelist": 1, "txt": 1, "setup": [1, 2, 4, 6], "hold": [1, 3, 8, 104, 191], "instal": 1, "pybind11": [1, 6], "sinc": [1, 3, 4, 190, 271, 277, 279], "compon": [1, 3], "etc": [1, 129, 203], "becom": 1, "pybind11_modul": 1, "m": [1, 6, 80, 104, 174, 185], "doc": [1, 4, 147], "sampl": [1, 2, 3, 105, 131, 132, 133, 136, 139, 140, 261, 274], "_a": 1, "pos_onli": 1, "kw_onli": 1, "none": [1, 3, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 195, 196, 212, 218, 222, 223, 233, 236, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "r": [1, 3, 177, 209], "pbdoc": 1, "most": [1, 132, 203], "complex": [1, 88, 89, 90, 91, 92, 131, 136, 139, 140, 195, 203, 235], "bell": 1, "whistl": 1, "liter": 1, "string": [1, 277], "modul": [1, 3, 4, 184, 238, 243, 247, 276], "ensur": [1, 257], "caster": 1, "find_packag": 1, "config": 1, "add_librari": 1, "sourc": [1, 120, 173], "target_sourc": 1, "cmake_current_list_dir": 1, "header": 1, "target_include_directori": 1, "target_link_librari": 1, "attach": 1, "conveni": [1, 4], "mlx_build_metallib": 1, "target": [1, 177, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "destin": [1, 120], "automat": [1, 5, 278, 279], "practic": 1, "mlx_build_met": [1, 6], "mlx_ext_metallib": 1, "titl": 1, "include_dir": 1, "project_source_dir": 1, "mlx_include_dir": 1, "output_directori": 1, "cmake_library_output_directori": 1, "add_depend": 1, "endif": 1, "pybind11_add_modul": 1, "build_shared_lib": 1, "target_link_opt": 1, "wl": 1, "rpath": 1, "loader_path": 1, "onc": [1, 154], "describ": 1, "util": [1, 3, 5, 6, 148, 203], "__name__": [1, 3], "__main__": [1, 3], "descript": [1, 3, 199], "ext_modul": 1, "cmakeextens": 1, "cmdclass": 1, "build_ext": 1, "cmakebuild": 1, "package_dir": 1, "package_data": 1, "dylib": 1, "zip_saf": 1, "fals": [1, 3, 12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 59, 60, 77, 104, 113, 115, 117, 118, 128, 166, 178, 181, 194, 195, 196, 199, 213, 214, 216, 223, 225, 233, 236, 238, 241, 245, 247, 277], "python_requir": 1, "even": [1, 3, 277], "though": [1, 3, 277], "j8": 1, "libmlx_ext": 1, "cpython": 1, "3x": 1, "darwin": 1, "pip": [1, 6], "after": [1, 3, 4, 24, 95, 127, 129, 205, 213, 215, 236, 247, 260, 279], "plai": [1, 3], "ones": [1, 3, 125, 148, 154, 174, 234, 235, 238], "b": [1, 3, 11, 13, 60, 73, 74, 95, 98, 99, 102, 103, 104, 111, 114, 116, 119, 121, 129, 165, 172, 177, 216, 277, 278, 279], "f": [1, 2, 4, 104, 188, 203, 277], "item": [1, 2, 3, 4, 196, 277, 278], "true": [1, 2, 3, 60, 104, 130, 157, 181, 195, 196, 199, 203, 205, 206, 207, 213, 214, 215, 216, 222, 223, 225, 230, 233, 238, 241, 245, 247, 257], "quick": [1, 5], "benchmark": 1, "compar": [1, 60], "time": [1, 3, 6, 154, 203, 279], "set_default_devic": 1, "256": [1, 4], "512": [1, 3, 247, 279], "random": [1, 2, 3, 4, 5, 205, 214, 225, 230, 279, 280], "normal": [1, 2, 3, 139, 192, 205, 213, 214, 215, 239, 247, 277, 279], "bench": 1, "warm": 1, "rang": [1, 2, 3, 4, 6, 15, 105, 249, 250, 273, 274, 279], "100": [1, 2, 3, 279], "5000": 1, "simple_tim": 1, "custom_tim": 1, "3f": [1, 4], "custom": [1, 247], "114": 1, "109": 1, "modest": 1, "improv": [1, 3, 185, 186, 187, 188, 189, 193], "awai": [1, 3], "good": [1, 6, 279], "nn": [1, 3, 4, 148, 196, 203, 271, 273], "grad": [1, 2, 4, 177, 273, 278], "simplifi": 1, "full": [1, 4, 47, 58, 67, 157, 234, 235], "implement": [2, 4, 104, 185, 186, 187, 188, 189, 190, 191, 192, 193, 211, 222, 236, 241, 243, 245, 246, 247, 267, 277], "basic": [2, 144], "model": [2, 4, 5, 148, 184, 196, 203, 218, 221, 223, 225, 229, 230, 232, 233, 234, 236, 247, 271, 273], "problem": [2, 4, 203], "metadata": 2, "num_featur": [2, 205], "num_exampl": 2, "1_000": 2, "num_it": 2, "10_000": 2, "iter": [2, 4, 196, 274], "sgd": [2, 4, 190, 273], "lr": [2, 190], "01": [2, 188], "rate": [2, 185, 186, 187, 188, 189, 190, 193, 194], "ll": [2, 4, 254], "synthet": 2, "dataset": 2, "matrix": [2, 72, 80, 100, 104, 114, 129, 130, 238], "ground": [2, 3, 260], "truth": [2, 260], "w_star": 2, "valu": [2, 3, 10, 15, 22, 23, 37, 57, 60, 63, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 96, 104, 105, 126, 131, 132, 133, 135, 136, 139, 140, 168, 169, 177, 180, 184, 188, 192, 195, 196, 199, 208, 209, 210, 214, 216, 222, 236, 237, 246, 247, 251, 252, 253, 254, 256, 257, 258, 259, 260, 267, 271], "gaussian": [2, 212, 248, 249, 250], "nois": 2, "exampl": [2, 3, 4, 15, 104, 168, 203, 205, 214, 223, 225, 230, 233, 251, 273, 274, 277, 278], "noisi": 2, "label": [2, 252], "ep": [2, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "1e": [2, 4, 13, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "us": [2, 3, 4, 5, 6, 15, 72, 93, 104, 114, 129, 130, 142, 143, 185, 187, 188, 189, 190, 191, 195, 203, 209, 211, 212, 216, 218, 222, 234, 235, 236, 238, 241, 245, 247, 249, 250, 271, 273, 274, 276, 278, 279], "weight": [2, 65, 66, 188, 190, 194, 196, 203, 225, 229, 238, 252, 271], "squar": [2, 3, 100, 145, 160, 177, 185, 187, 188, 189, 196, 203, 239, 258, 260, 277], "loss": [2, 4, 177, 203, 273], "loss_fn": [2, 4, 273], "w": [2, 66, 72, 129, 130, 177, 194, 205, 207, 209, 210, 216], "mean": [2, 3, 4, 177, 203, 205, 213, 223, 239, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 277], "grad_fn": 2, "initi": [2, 3, 203, 205, 213, 214, 215, 216, 237, 239, 271], "randomli": [2, 3, 208, 209, 210], "Then": [2, 6], "repeatedli": 2, "_": [2, 3, 203, 274, 279], "verifi": 2, "close": [2, 5, 13], "error_norm": 2, "5f": 2, "someth": [2, 3], "00005": 2, "00364": 2, "complet": [2, 3, 6, 234, 235, 279], "logist": [2, 152, 244, 249, 250, 266], "github": [2, 4, 6], "repo": [2, 4, 6], "enabl": [3, 6, 77, 194], "larg": [3, 203, 236, 257], "ish": 3, "transform": [3, 5, 77, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 146, 147, 184, 203, 205, 213, 215, 216, 222, 223, 233, 238, 241], "compromis": 3, "eas": 3, "llama": 3, "famili": 3, "less": [3, 24, 103, 127, 241, 260], "200": 3, "line": [3, 277], "python": [3, 37, 50, 57, 77, 195, 196, 197, 271, 276, 277], "neural": [3, 5, 193, 211, 217, 262, 271], "network": [3, 5, 193, 205, 209, 211, 271], "build": [3, 5, 271], "concis": 3, "architectur": [3, 203, 235, 279], "notabl": [3, 5], "rope": [3, 203], "posit": [3, 24, 97, 120, 127, 177, 196, 203, 206, 207, 236, 241, 245, 261], "option": [3, 12, 14, 15, 22, 23, 24, 25, 26, 31, 32, 64, 65, 66, 67, 72, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 100, 104, 105, 106, 113, 115, 117, 118, 124, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 142, 143, 146, 147, 157, 158, 159, 162, 163, 166, 168, 169, 172, 173, 174, 175, 176, 177, 178, 180, 182, 185, 186, 187, 188, 189, 190, 193, 194, 195, 196, 205, 206, 207, 216, 218, 222, 223, 225, 233, 236, 238, 241, 245, 247, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 274, 280], "kei": [3, 131, 132, 133, 135, 136, 138, 139, 140, 192, 195, 196, 222, 223, 233, 236, 274, 276], "cach": 3, "concaten": 3, "project": [3, 236], "llamaattent": 3, "self": [3, 4, 7, 9, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 58, 59, 203, 217, 262, 271], "dim": [3, 172, 211, 213, 214, 215, 236, 239, 241, 245, 247], "num_head": [3, 236, 247], "super": [3, 4, 203, 271], "tradit": [3, 209, 210, 241], "query_proj": 3, "bia": [3, 72, 129, 130, 187, 188, 189, 196, 203, 206, 207, 216, 223, 225, 233, 236, 238], "key_proj": 3, "value_proj": 3, "out_proj": [3, 271], "__call__": [3, 4, 203, 271], "queri": [3, 236], "mask": [3, 230, 236], "extract": [3, 203, 222, 271], "l": [3, 4, 203, 205, 206, 260], "reshap": [3, 104], "combin": 3, "key_cach": 3, "value_cach": 3, "sqrt": [3, 75, 185, 186, 187, 188, 193, 205, 213, 214, 215, 216, 239, 245], "score": 3, "softmax": [3, 252], "values_hat": 3, "rm": 3, "swiglu": 3, "rmsnorm": [3, 203], "llamaencoderlay": 3, "mlp_dim": [3, 247], "norm1": 3, "norm2": 3, "linear1": 3, "linear2": 3, "linear3": 3, "sigmoid": [3, 244, 249, 250, 251, 266], "instanc": [3, 129, 197, 203, 214, 218, 219, 220, 223, 226, 227, 233, 235, 243, 271, 277], "embed": [3, 203, 241, 245], "emb": [3, 211, 245], "token": [3, 211], "num_lay": [3, 4, 273], "vocab_s": 3, "norm": [3, 189, 190, 213, 261], "multiheadattent": [3, 203], "create_additive_causal_mask": 3, "list": [3, 8, 12, 14, 26, 29, 30, 40, 41, 42, 43, 45, 50, 53, 56, 57, 59, 61, 64, 77, 79, 82, 83, 85, 86, 88, 89, 91, 92, 96, 97, 101, 104, 113, 115, 117, 118, 124, 126, 128, 131, 132, 133, 135, 136, 139, 140, 143, 157, 159, 162, 163, 166, 172, 173, 177, 178, 179, 182, 187, 188, 189, 190, 195, 197, 203, 223, 225, 226, 227, 228, 231, 233, 234, 235, 271, 276], "still": [3, 6, 104], "consid": [3, 13, 60, 195, 196, 213, 276], "train": [3, 4, 203, 205, 208, 209, 210, 221, 223, 233], "ignor": [3, 63], "whatsoev": 3, "rest": [3, 196, 241], "subsect": 3, "prompt": 3, "autoregress": 3, "yield": [3, 4, 274], "temp": 3, "causal": 3, "save": [3, 106, 129, 147, 148, 149, 229], "append": [3, 114], "store": 3, "per": [3, 4, 72, 129, 130, 191, 205, 213, 214, 215, 239], "care": 3, "last": [3, 25, 57, 83, 86, 88, 89, 91, 92, 93, 114, 132, 158, 172, 206, 207, 209, 210, 213, 277], "logit": [3, 132, 251, 252], "next": [3, 4], "categor": 3, "lazili": [3, 203], "noth": [3, 203], "yet": [3, 104, 203, 271, 278], "forc": [3, 4, 203, 278], "choos": [3, 241], "pars": 3, "feed": 3, "loop": [3, 4], "unsqueez": 3, "sequenc": [3, 205, 206, 247, 274, 279], "length": [3, 162, 205, 206], "len": [3, 83, 86, 89, 92], "overwrit": 3, "discard": [3, 195], "old": 3, "moment": [3, 187, 188, 189], "anymor": 3, "everyth": 3, "small": [3, 154, 205, 213, 215, 239, 257, 261, 279], "10": [3, 4, 108, 144, 148, 154, 196, 203, 225], "12": 3, "8192": 3, "1024": 3, "actual": [3, 15, 225, 271], "materi": [3, 5], "could": [3, 203], "20_000": 3, "machin": [3, 5, 6, 193], "8gb": 3, "ram": 3, "32": [3, 4, 129, 130, 199], "44": 3, "doubl": 3, "bracket": 3, "becaus": [3, 203], "batch": [3, 114, 205, 206, 207, 209, 210, 236], "zip": [3, 4], "haven": 3, "anyth": [3, 177], "result": [3, 15, 57, 72, 104, 106, 114, 130, 142, 144, 163, 172, 181, 196, 245, 277], "similar": [3, 196, 234, 235, 236, 277], "runtim": 3, "section": [3, 159, 261], "access": [3, 37, 203, 271, 279], "origin": [3, 185, 186, 187, 189, 190, 205, 277], "sentencepiec": 3, "pytorch": [3, 5, 213], "compat": [3, 132], "npz": [3, 106, 148, 149, 225, 229], "file": [3, 6, 106, 146, 147, 148, 149, 225, 229], "directli": 3, "argpars": 3, "itertool": [3, 196], "starmap": [3, 196], "np": [3, 4, 277, 278], "torch": [3, 277], "map_torch_to_mlx": 3, "tok_embed": 3, "elif": 3, "replac": [3, 234, 235, 247, 260], "attention_norm": 3, "ffn_norm": 3, "wq": 3, "wk": 3, "wv": 3, "wo": 3, "w1": 3, "w2": 3, "w3": 3, "ffn": 3, "separ": [3, 47, 58, 213], "submodul": [3, 4, 203, 223, 224, 233, 235], "feed_forward": 3, "parser": 3, "argumentpars": 3, "add_argu": 3, "torch_weight": 3, "output_fil": 3, "parse_arg": 3, "state": [3, 4, 191, 192, 203, 273, 274], "savez": 3, "k": [3, 80, 174, 175, 176, 216, 223], "v": [3, 67, 203, 223, 277], "left": [3, 104, 129, 146, 147, 212, 241, 249, 250, 254, 261], "disk": 3, "text": [3, 190, 217, 242, 246, 253, 254, 257, 260, 261, 262, 263, 265, 267], "format": [3, 106, 146, 147, 148, 149, 277], "oper": [3, 5, 33, 154, 157, 164, 169, 190, 203, 247, 277, 278, 279, 280], "dictionari": [3, 147, 191, 192, 195, 203, 222, 234, 235, 276], "represent": [3, 129, 195, 197], "tree_unflatten": 3, "helper": 3, "weight_fil": 3, "incur": 3, "sever": [3, 65, 66, 148, 149], "futur": [3, 238], "pth": 3, "current": [3, 5, 6, 65, 66, 129, 203], "around": 3, "m1": [3, 279], "ultra": 3, "7b": 3, "me": 3, "ishmael": 3, "year": 3, "ago": 3, "never": 3, "long": 3, "info": 3, "247": 3, "press": [3, 104], "enter": 3, "littl": 3, "monei": 3, "my": [3, 6], "purs": 3, "greater": [3, 24, 99, 127, 246, 267], "consequ": 3, "walk": 3, "down": 3, "gower": 3, "street": 3, "afternoon": 3, "heavi": 3, "rain": 3, "saw": 3, "off": [3, 6], "man": 3, "rag": 3, "who": 3, "sat": 3, "upon": [3, 196], "hi": 3, "bundl": 3, "hard": 3, "wet": 3, "he": 3, "were": [3, 279], "cry": 3, "watch": 3, "him": 3, "observ": 3, "numer": [3, 104, 111, 113, 157, 185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239, 261], "crowd": 3, "wa": [3, 192], "hurri": 3, "437": 3, "330": 3, "second": [3, 114, 167, 177, 187, 188, 189, 279], "spent": 3, "amount": 3, "39": 3, "ms": 3, "By": [3, 277], "bigger": 3, "remain": [3, 177, 208, 209, 210], "almost": 3, "nobodi": 3, "took": 3, "least": [3, 63, 129], "notic": 3, "distanc": [3, 261], "had": 3, "doubt": 3, "minut": 3, "straight": 3, "slowli": 3, "rais": [3, 104, 159, 225], "ey": 3, "speak": [3, 104], "resum": 3, "postur": 3, "stood": 3, "feel": 3, "pain": 3, "heart": 3, "smile": 3, "face": 3, "am": 3, "someon": 3, "three": 3, "quarter": 3, "hour": 3, "made": 3, "immedi": [3, 218], "repli": 3, "again": [3, 203], "hand": 3, "did": 3, "accustom": 3, "thu": [3, 203], "question": 3, "reason": 3, "tell": [3, 277], "understand": 3, "579": 3, "690": 3, "num": [3, 105, 138], "500": [3, 279], "628": 3, "went": 3, "nervou": 3, "trembl": 3, "told": 3, "And": 3, "perhap": 3, "surpris": 3, "matter": [3, 203], "shall": 3, "anyhow": 3, "friend": 3, "ye": 3, "slight": 3, "kind": 3, "longer": [3, 67], "soon": 3, "unless": [3, 104, 271], "unlik": [3, 13, 209, 210], "strang": 3, "amus": 3, "That": 3, "secret": 3, "disappoint": 3, "mine": 3, "cannot": [3, 63, 277], "happi": 3, "ask": 3, "Is": [3, 245, 247], "shop": 3, "bui": 3, "food": 3, "633": 3, "21": 3, "475": 3, "su": 3, "j": [3, 6, 104, 186, 187, 189, 209], "lu": 3, "pan": 3, "murtadha": 3, "wen": 3, "liu": 3, "2021": 3, "roform": [3, 241], "enhanc": [3, 241], "rotari": [3, 241], "arxiv": [3, 185, 190, 213, 214, 215, 217, 239, 262], "preprint": [3, 185, 190], "2104": 3, "09864": 3, "zhang": 3, "sennrich": 3, "2019": [3, 188], "root": [3, 145, 160, 239], "advanc": 3, "inform": [3, 4, 147, 203, 205, 212, 236, 279], "system": 3, "shazeer": 3, "2020": 3, "glu": 3, "variant": [3, 189, 260], "2002": 3, "05202": 3, "classifi": 4, "mnist": 4, "As": [4, 168, 203], "mlp": [4, 203, 247, 273], "inherit": [4, 276], "standard": [4, 37, 57, 114, 133, 247, 278], "idiom": 4, "input_dim": [4, 203, 216, 238], "hidden_dim": [4, 271, 273], "output_dim": [4, 203, 216, 238], "layer_s": 4, "idim": 4, "odim": 4, "maximum": [4, 22, 63, 203, 240, 245, 249, 250, 264, 271], "cross": [4, 251, 252], "entropi": [4, 251, 252], "sub": [4, 138], "commonli": [4, 234], "cross_entropi": [4, 203], "accuraci": 4, "valid": [4, 67, 180, 195, 223, 233, 276], "eval_fn": 4, "argmax": 4, "loader": 4, "num_class": [4, 273], "batch_siz": [4, 273], "num_epoch": [4, 273], "learning_r": [4, 185, 186, 187, 188, 189, 190, 193, 194, 273], "train_imag": [4, 273], "train_label": [4, 273], "test_imag": 4, "test_label": 4, "shuffl": 4, "minibatch": 4, "batch_iter": [4, 273], "perm": 4, "permut": 4, "id": [4, 6], "put": 4, "trainabl": [4, 184, 203, 271], "loss_and_grad_fn": [4, 273], "value_and_grad": [4, 203, 234, 271, 273, 277, 278], "epoch": 4, "test": [4, 6], "confus": 4, "decent": 4, "95": 4, "brought": 5, "research": 5, "except": [5, 80, 87, 88, 90, 91, 92, 213, 225, 277], "featur": [5, 65, 66, 205, 213, 214, 215, 216, 238, 239, 241, 247], "main": [5, 80, 196, 203], "differ": [5, 165, 260], "lazi": [5, 271, 278], "multi": [5, 206, 207], "cpu": [5, 279], "gpu": [5, 279], "inspir": 5, "jax": [5, 274], "arrayfir": 5, "unifi": 5, "live": [5, 279], "guid": 5, "convers": 5, "regress": [5, 257], "layer": [5, 203, 209, 210, 213, 215, 216, 230, 235, 238, 243, 247, 268, 271], "perceptron": 5, "llm": 5, "infer": [5, 96, 106], "fft": 5, "algebra": 5, "tree": [5, 77, 97, 154, 177, 180, 191, 195, 196, 197], "develop": [5, 6], "document": [5, 47, 58], "meet": 6, "seri": 6, "chip": 6, "nativ": 6, "maco": 6, "13": 6, "recommend": [6, 190], "14": 6, "sonoma": 6, "distribut": [6, 131, 132, 133, 135, 139, 140, 216, 255, 259, 261], "probabl": [6, 136, 208, 209, 210, 238, 255, 279], "platform": 6, "processor": 6, "arm": [6, 199], "i386": 6, "switch": 6, "conda": 6, "17": 6, "g": [6, 104, 129, 193, 194, 268, 280], "clang": 6, "cmake": 6, "24": 6, "xcode": 6, "15": [6, 104], "clone": 6, "git": 6, "com": 6, "ml": 6, "explor": 6, "cd": 6, "brew": 6, "global": [6, 137, 274], "env": 6, "cmake_build_parallel_level": 6, "edit": [6, 235], "unittest": 6, "discov": 6, "stub": 6, "dev": 6, "generate_stub": 6, "mkdir": 6, "p": [6, 131, 187, 189, 203, 208, 209, 210, 261], "either": [6, 11, 47, 57, 58, 63, 73, 74, 95, 98, 99, 102, 103, 104, 111, 114, 116, 119, 121, 165, 177, 243], "libmlx": 6, "preprocessor": 6, "metal_path": 6, "mlx_build_test": 6, "ON": 6, "mlx_build_exampl": 6, "mlx_build_benchmark": 6, "mlx_build_python_bind": 6, "multipl": [6, 114, 121, 129, 130, 236, 245], "wish": 6, "environ": 6, "variabl": [6, 97, 101, 177, 179, 180], "export": 6, "developer_dir": 6, "app": 6, "content": [6, 222], "sdk": 6, "xcrun": 6, "macosx": 6, "show": [6, 199], "unabl": 6, "tool": 6, "select": [6, 181, 218, 222], "sudo": 6, "devicetyp": 7, "attribut": [7, 8, 9, 26, 271], "kwarg": [8, 148, 149, 280], "union": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 138, 139, 140, 141, 142, 143, 144, 145, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 181, 182, 183, 207, 223, 225, 233], "absolut": [10, 13, 249, 250, 260], "semant": [11, 61, 73, 74, 98, 99, 102, 103, 111, 114, 116, 119, 121, 165, 279], "keepdim": [12, 14, 22, 23, 29, 30, 31, 32, 40, 41, 42, 43, 45, 56, 59, 104, 113, 115, 117, 118, 128, 157, 166, 178], "reduct": [12, 14, 113, 115, 118, 128, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261], "reduc": [12, 14, 22, 23, 113, 115, 117, 118, 128, 154, 166, 178, 205, 257], "unspecifi": [12, 14, 15, 22, 23, 24, 25, 64, 96, 113, 115, 117, 118, 124, 127, 128, 142, 146, 147, 157, 158, 166, 168, 178, 182, 280], "entir": [12, 14, 22, 23, 113, 115, 117, 118, 128, 166, 178, 209, 210], "singleton": [12, 14, 22, 23, 113, 114, 115, 117, 118, 128, 166, 178], "rtol": 13, "05": [13, 205, 213, 214, 215, 239], "atol": 13, "08": [13, 186, 187, 188, 189, 193], "approxim": [13, 154, 212, 248, 249, 250], "comparison": [13, 74, 98, 99, 102, 103], "equal": [13, 24, 60, 80, 99, 103, 127, 136, 159, 214, 216], "ab": [13, 104, 177, 213, 214, 215, 217, 239, 262], "array_equ": 13, "rel": 13, "toler": 13, "boolean": [13, 60, 112, 199, 232], "interv": [15, 105, 136, 140], "increment": 15, "otherwis": [15, 195, 196, 223, 225, 233, 246, 247, 254, 260, 267, 277], "int32": [15, 104, 136, 199, 278], "convent": [15, 67, 188], "lead": 15, "fraction": 15, "integr": [15, 168], "invers": [16, 17, 18, 19, 20, 21, 76, 84, 85, 86, 87, 88, 89], "cosin": [16, 17, 68, 69], "hyperbol": [17, 19, 21, 69, 156, 171], "sine": [18, 19, 155, 156], "minimum": [23, 63, 245], "kth": [24, 127], "partit": 24, "order": [24, 104, 127, 129, 203, 213, 234, 243], "undefin": [24, 127], "sort": [24, 25, 127], "flatten": [24, 25, 104, 127, 142, 158, 168, 169, 195], "dimension": [26, 81, 82, 83, 84, 85, 86, 90, 91, 92, 205, 206, 207, 211, 216, 238, 245], "val": [26, 96], "tupl": [26, 47, 58, 64, 66, 77, 79, 101, 104, 126, 129, 143, 162, 177, 179, 187, 188, 189, 190, 195, 196, 197, 207, 225, 227, 243, 276], "ndarrai": [26, 278], "properti": [27, 35, 44, 50, 52, 232], "argument": [27, 47, 58, 77, 97, 177, 196, 203, 274, 279, 280], "decim": [48, 144], "indices_or_sect": [53, 159], "nest": [57, 203, 271, 276], "ddof": [59, 178], "equal_nan": 60, "nan": 60, "a_min": 63, "a_max": 63, "edg": [63, 126], "At": 63, "anoth": [63, 114, 165, 181, 203, 218, 279], "pad": [65, 66, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 206, 207], "dilat": [65, 66], "group": [65, 66, 72, 129, 130, 213, 238], "1d": [65, 67, 169], "convolut": [65, 66, 67, 206, 207, 209, 210], "channel": [65, 66, 205, 206, 207, 209, 210], "c_in": [65, 66], "c_out": [65, 66], "convolv": [65, 66], "2d": [66, 129, 205, 209], "spatial": [66, 213], "symmetr": 66, "discret": [67, 81, 82, 83, 84, 85, 86, 90, 91, 92, 211], "swap": [67, 167, 235, 238], "conv": 67, "filter": [67, 206, 207, 218, 222], "flip": 67, "signal": 67, "bias": [72, 129, 130, 223, 233, 236], "group_siz": [72, 129, 130, 238], "64": [72, 129, 130, 199, 238], "configur": 72, "formal": [72, 129], "notat": [72, 195, 227], "quantiz": [72, 130, 238], "w_i": [72, 129], "hat": [72, 129], "occupi": [72, 129, 130], "divis": [73, 95, 129], "quotient": [73, 95], "mathrm": [75, 152, 214], "frac": [75, 129, 152, 185, 186, 187, 188, 189, 193, 205, 208, 209, 210, 213, 214, 215, 216, 239, 254, 257], "pi": [75, 245], "int_0": 75, "dx": 75, "erf": 76, "retain_graph": [77, 146, 147], "node": [77, 154, 180], "dict": [77, 106, 147, 148, 228, 231, 234, 235, 271, 276], "leaf": [77, 195, 196, 222], "preserv": [77, 143], "intend": 77, "control": [77, 274], "flow": [77, 164], "exponenti": [78, 242, 265], "insert": [79, 279], "ident": [80, 164, 230], "diagon": [80, 174, 175, 176], "zero": [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 174, 175, 176, 183, 203, 208, 209, 210, 225], "th": 80, "whose": [80, 184], "One": [81, 84, 90, 145], "fourier": [81, 82, 83, 84, 85, 86, 90, 91, 92], "truncat": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 139], "dft": [81, 82, 83, 84, 85, 86, 90, 91, 92], "rfft": 87, "real": [87, 88, 89, 90, 91, 92], "rfft2": 88, "rfftn": 89, "silent": [90, 91, 92], "start_axi": 93, "end_axi": 93, "integ": [95, 104, 126, 129, 130, 131, 136, 159, 172, 180, 199, 211], "floor": 95, "fun": [97, 101, 177, 179, 180, 279], "argnam": [97, 177], "cpp_function": [97, 177, 180], "neither": [97, 177], "keyword": [97, 148, 149, 177, 196, 203, 274, 280], "strict": [98, 102, 223, 225, 233], "ord": 104, "tabl": [104, 199, 211], "frobeniu": 104, "matric": 104, "strictli": 104, "mathemat": 104, "variou": 104, "purpos": 104, "calcul": 104, "fro": 104, "inf": [104, 236], "largest": 104, "sing": 104, "smallest": 104, "singular": 104, "nuclear": 104, "_f": 104, "sum_": [104, 257], "a_": 104, "valueerror": [104, 225], "refer": [104, 214, 217, 262], "golub": 104, "van": 104, "loan": 104, "baltimor": 104, "md": 104, "john": 104, "hopkin": 104, "univers": 104, "1985": 104, "pg": 104, "la": 104, "arang": [104, 277], "9": [104, 185, 187, 188, 189, 190, 277], "74597": 104, "20": 104, "84804": 104, "41421": 104, "23607": 104, "74166": 104, "24264": 104, "11": 104, "225": 104, "50": 105, "evenli": 105, "binari": [106, 146, 147, 148, 149, 246, 251, 267], "npy": [106, 146], "safetensor": [106, 147], "natur": [107, 109], "logarithm": [107, 108, 109, 110], "log": [109, 111, 113, 255, 257, 259], "plu": 109, "exp": [111, 113, 133, 157, 242, 255, 265, 279], "stabl": [111, 113, 157, 257], "prepend": 114, "remov": [114, 132, 162], "negat": 122, "pad_with": 126, "constant_valu": 126, "pad_width": 126, "before_1": 126, "after_1": 126, "before_2": 126, "after_2": 126, "before_n": 126, "after_n": 126, "before_i": 126, "after_i": 126, "extend": 126, "side": 126, "smaller": [127, 190], "everi": [129, 154, 196], "particular": [129, 213], "consecut": [129, 241], "w_1": 129, "w_g": 129, "begin": [129, 242, 246, 254, 260, 265, 267], "align": 129, "max_i": 129, "min_i": 129, "textrm": [129, 212, 248], "round": 129, "pack": [129, 130], "unsign": [129, 130, 199], "lower": [129, 136, 139, 140, 174], "upper": [129, 136, 139, 140], "1st": 129, "signific": 129, "2nd": 129, "dequant": 129, "w_q": 129, "whether": [130, 146, 147, 222, 236], "prng": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 274], "num_sampl": 132, "unnorm": [132, 251, 252], "draw": 132, "uint32": [132, 199], "cdf": [133, 212, 248], "accord": [133, 181, 236], "seed": 134, "low": [136, 140], "high": [136, 140, 203, 211], "bound": [136, 139, 140, 212, 279], "roadcast": 136, "domain": 139, "uniformli": 140, "repetit": 142, "reciproc": 145, "arr": 146, "retain": [146, 147], "dure": [146, 147, 208, 209, 210, 277], "done": [146, 147, 203, 208, 277], "http": [147, 213, 214, 215, 217, 239, 262], "huggingfac": 147, "uncompress": 148, "my_path": 148, "tree_flatten": [148, 196, 197, 203], "transformerencod": 148, "128": [148, 203], "flat_param": 148, "compress": 149, "simplif": 154, "reus": 154, "consumpt": 154, "meant": 154, "overhead": [154, 279], "1m": 154, "thousand": 154, "foo": 154, "matmul": [154, 279], "twice": [154, 279], "subarrai": 159, "being": [164, 203], "prevent": [164, 261, 277], "unchang": [164, 241], "axis1": 167, "axis2": 167, "taken": 168, "prior": [168, 169], "exclud": 169, "tensor": [172, 261, 277], "dot": [172, 195, 227, 236], "elsewher": 174, "col": 174, "triangl": 174, "mse": 177, "param": [177, 203], "lvalu": 177, "dlvalu": 177, "dparam": 177, "lasso": 177, "l1": [177, 254, 256, 257, 260], "varianc": [178, 205, 213], "divisor": 178, "cotang": 179, "in_ax": 180, "out_ax": 180, "prefix": [180, 195], "fn": [184, 196, 278], "callabl": [184, 195, 196, 218, 219, 222, 243, 247], "wrt": 184, "rho": 185, "06": [185, 261], "paper": [185, 186, 187, 189, 190, 205, 245], "zeiler": 185, "2012": [185, 193], "adapt": [185, 186], "1212": 185, "5701": 185, "v_": [185, 186, 187, 188, 189, 193, 194], "v_t": [185, 186, 187, 188, 189, 193, 194], "g_t": [185, 186, 187, 188, 189, 190, 193, 194], "delta": [185, 254], "w_": [185, 186, 187, 188, 189, 190, 193, 194], "u_t": 185, "epsilon": [185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239], "u_": 185, "w_t": [185, 186, 187, 188, 189, 190, 193, 194], "lambda": [185, 186, 187, 188, 189, 190, 193, 194, 196, 203, 218, 223, 242, 265], "averag": [185, 187, 188, 189], "denomin": [185, 186, 187, 188, 189, 193, 214], "stabil": [185, 186, 187, 188, 189, 193, 205, 213, 214, 215, 239], "duchi": 186, "hazan": 186, "singer": 186, "2011": 186, "subgradi": 186, "onlin": 186, "stochast": [186, 187, 189, 194], "jmlr": 186, "999": [187, 188, 189], "omit": [187, 189], "estim": [187, 189], "kingma": [187, 189], "ba": [187, 189], "2015": [187, 189, 209], "iclr": [187, 188, 189], "m_": [187, 188, 189, 190], "beta_1": [187, 188, 189, 190], "m_t": [187, 188, 189, 190], "beta_2": [187, 188, 189, 190], "weight_decai": [188, 190, 194], "contrast": [188, 192], "loshchilov": 188, "hutter": 188, "decoupl": 188, "decai": [188, 190, 194], "regular": [188, 209, 217, 262], "adam": [189, 190], "infin": 189, "99": [190, 193], "sign": [190, 199], "tend": 190, "larger": [190, 241], "10x": 190, "adamw": 190, "maintain": [190, 209, 210], "strength": [190, 194], "wd": 190, "chen": 190, "symbol": 190, "discoveri": 190, "2302": 190, "06675": 190, "c_": 190, "eta": 190, "c_t": 190, "momentum": [190, 194, 205], "basi": 191, "appli": [191, 196, 203, 205, 206, 207, 209, 210, 212, 213, 214, 215, 216, 217, 219, 230, 237, 238, 239, 240, 242, 244, 246, 248, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "optimizerst": 191, "recurs": [192, 203, 222, 223, 228, 231, 233, 271], "defaultdict": 192, "miss": [192, 225], "present": 192, "tieleman": 193, "hinton": 193, "lectur": 193, "coursera": 193, "smooth": [193, 252, 260], "dampen": 194, "nesterov": 194, "descent": 194, "mu": 194, "tau": 194, "l2": [194, 254, 257], "penalti": 194, "is_leaf": [195, 196], "arbitrari": [195, 271], "depth": [195, 210], "hello": [195, 197], "charact": 195, "flat": [195, 197], "superset": 196, "extra": 196, "closer": 196, "constitut": 196, "dict_kei": 196, "recreat": 197, "world": 197, "42": 197, "byte": 199, "bool_": 199, "uint8": 199, "uint16": 199, "16": [199, 214, 218, 271], "int8": 199, "int16": 199, "int64": 199, "arbitrarili": [203, 276, 278], "manual": 203, "explicitli": [203, 274], "solv": 203, "intuit": 203, "freez": [203, 233, 271], "finetun": 203, "in_dim": [203, 271], "out_dim": [203, 271], "enumer": 203, "caus": 203, "local": [203, 209], "scope": 203, "l2_loss": 203, "y_hat": 203, "trainable_paramet": [203, 222], "loss_and_grad": 203, "workhors": 203, "Its": 203, "frozen": [203, 223, 231, 233, 238, 271], "individu": [203, 209, 210], "subset": [203, 222], "action": 203, "displai": 203, "tree_map": 203, "count": 203, "num_param": 203, "preclud": 203, "pure": [203, 273], "pattern": 203, "achiev": 203, "other_input": 203, "necessari": 203, "wrap": 203, "apply_to_modul": [203, 223], "children": 203, "filter_and_map": 203, "leaf_modul": 203, "load_weight": 203, "named_modul": 203, "save_weight": 203, "unfreez": [203, 223], "update_modul": 203, "sequenti": 203, "relu": [203, 237, 247, 263], "prelu": 203, "gelu": [203, 249, 250], "silu": 203, "selu": 203, "mish": 203, "quantizedlinear": 203, "conv1d": 203, "conv2d": 203, "batchnorm": 203, "layernorm": 203, "groupnorm": 203, "instancenorm": 203, "dropout": [203, 209, 210, 230, 247], "dropout2d": 203, "dropout3d": 203, "alibi": 203, "sinusoidalpositionalencod": 203, "gelu_approx": [203, 212, 248], "gelu_fast_approx": [203, 212, 248], "binary_cross_entropi": 203, "kl_div_loss": 203, "l1_loss": 203, "mse_loss": 203, "nll_loss": 203, "smooth_l1_loss": 203, "triplet_loss": 203, "hinge_loss": 203, "huber_loss": 203, "log_cosh_loss": 203, "affin": [205, 213, 214, 215, 216, 238], "track_running_stat": 205, "var": [205, 213, 214, 215], "gamma": [205, 213, 214, 215, 239], "nc": 205, "nlc": [205, 206], "four": 205, "nhwc": [205, 207], "height": [205, 207, 209, 210], "width": [205, 207, 209, 210, 238], "deep": 205, "intern": 205, "covari": 205, "shift": 205, "bn": 205, "in_channel": [206, 207], "out_channel": [206, 207], "kernel_s": [206, 207], "learnabl": [206, 207, 243], "portion": 208, "independ": [209, 210], "nwhc": 209, "whc": 209, "entri": [209, 210], "benefici": [209, 210], "earli": 209, "adjac": 209, "pixel": 209, "correl": 209, "thompson": 209, "goroshin": 209, "jain": 209, "lecun": 209, "bregler": 209, "cvpr": 209, "ndhwc": 210, "dhwc": 210, "medic": 210, "video": 210, "num_embed": 211, "lookup": 211, "typic": [211, 273], "usual": [211, 276], "vocabulari": 211, "approx": 212, "unit": [212, 240, 242, 244, 248, 249, 250, 264, 265, 266], "phi": [212, 248], "geluapprox": 212, "sigma": [212, 244, 249, 250, 266], "60033": [212, 249], "0433603": [212, 249], "gelufast": 212, "773": [212, 250], "regard": 212, "num_group": 213, "pytorch_compat": 213, "split": 213, "preced": 213, "org": [213, 214, 215, 217, 239, 262], "1803": 213, "08494": 213, "inorm": 214, "1607": [214, 215], "08022": 214, "06450": 215, "uniform": [216, 225, 274, 279], "mathcal": 216, "u": 216, "d_i": 216, "monoton": [217, 262], "1908": [217, 262], "08681": [217, 262], "tanh": [217, 262], "softplu": [217, 262], "map_fn": [218, 222], "filter_fn": [218, 222], "valid_parameter_filt": 218, "apply_fn": 219, "descend": 220, "is_leaf_fn": 222, "found": 222, "drop": 222, "idempot": [223, 233], "attent": [223, 236, 245, 247], "endswith": 223, "file_or_weight": 225, "ok": 225, "certain": 230, "ie": 233, "noop": 233, "unfrozen": 233, "chang": [234, 238, 254, 260, 277], "tracer": 234, "partial": [234, 235], "child": 235, "programmat": 235, "query_input_dim": 236, "key_input_dim": 236, "value_input_dim": 236, "value_dim": 236, "value_output_dim": 236, "head": [236, 247], "aggreg": 236, "linearli": 236, "neg": [236, 259, 261], "attend": 236, "num_paramet": 237, "init": 237, "25": 237, "parametr": [237, 263], "classmethod": 238, "from_linear": 238, "quantize_modul": 238, "1910": 239, "07467": 239, "rectifi": [240, 264], "10000": 241, "rotat": 241, "slightli": [241, 279], "angular": 241, "frequenc": [241, 245], "leq": [242, 254, 265], "0507": [242, 265], "67326": [242, 265], "elu": [242, 265], "plain": 243, "known": [244, 266], "swish": [244, 266], "cdot": [244, 249, 250, 253, 266], "min_freq": 245, "0001": 245, "max_freq": 245, "cos_first": 245, "full_turn": 245, "sinusoid": 245, "sin": [245, 278], "threshold": [246, 254, 260, 267], "geq": [246, 267], "num_encoder_lay": 247, "num_decoder_lay": 247, "custom_encod": 247, "custom_decod": 247, "norm_first": 247, "decod": 247, "interact": 247, "mechan": 247, "hidden": 247, "faster": 248, "exact": [249, 250], "0003": 249, "015": 250, "pre": 251, "predict": [251, 252, 253, 254, 255, 256, 257, 258, 259, 260], "105361": 251, "223144": 251, "20397": 251, "916291": 251, "612192": 251, "label_smooth": 252, "hing": 253, "y_": [253, 257], "pred": [253, 257], "huber": 254, "l_": [254, 261], "kullback": 255, "leibler": 255, "diverg": 255, "cosh": 257, "logcosh": 257, "sensit": 257, "outlier": 257, "dual": 257, "behavior": 257, "offer": 257, "balanc": 257, "robust": 257, "approach": 257, "task": 257, "likelihood": 259, "nll": 259, "formula": 260, "anchor": 261, "margin": 261, "triplet": 261, "_p": 261, "degre": 261, "pairwis": 261, "instabl": 261, "subclass": 271, "concept": 271, "mymlp": 271, "in_proj": 271, "subsequ": 273, "implicit": 274, "fine": 274, "grain": 274, "manag": [274, 279], "pseudo": 274, "altern": 274, "splittabl": 274, "threefri": 274, "counter": 274, "cycl": 276, "protocol": 277, "receiv": 277, "pep": 277, "3118": 277, "view": 277, "a_view": 277, "owndata": 277, "reflect": 277, "quit": 277, "power": 277, "extern": 277, "x_view": 277, "modifi": 277, "df": 277, "x\u00b2": 277, "2x": 277, "indirectli": 277, "modif": 277, "seen": 277, "occur": 277, "incorpor": 277, "issu": 277, "incorrect": 277, "memoryview": 277, "via": 277, "intermedi": 277, "jnp": 277, "tf": 277, "inspect": 278, "composit": 278, "pool": 279, "advantag": 279, "don": 279, "parallel": 279, "race": 279, "interest": 279, "albeit": 279, "contriv": 279, "suppos": 279, "d1": 279, "d2": 279, "4096": 279, "dens": 279, "better": 279, "millisecond": 279, "measur": 279, "default_stream": 280, "default_devic": 280, "my_devic": 280}, "objects": {"mlx.core": [[7, 0, 1, "", "Device"], [8, 0, 1, "", "Dtype"], [9, 0, 1, "", "Stream"], [10, 2, 1, "", "abs"], [11, 2, 1, "", "add"], [12, 2, 1, "", "all"], [13, 2, 1, "", "allclose"], [14, 2, 1, "", "any"], [15, 2, 1, "", "arange"], [16, 2, 1, "", "arccos"], [17, 2, 1, "", "arccosh"], [18, 2, 1, "", "arcsin"], [19, 2, 1, "", "arcsinh"], [20, 2, 1, "", "arctan"], [21, 2, 1, "", "arctanh"], [22, 2, 1, "", "argmax"], [23, 2, 1, "", "argmin"], [24, 2, 1, "", "argpartition"], [25, 2, 1, "", "argsort"], [26, 0, 1, "", "array"], [60, 2, 1, "", "array_equal"], [61, 2, 1, "", "broadcast_to"], [62, 2, 1, "", "ceil"], [63, 2, 1, "", "clip"], [64, 2, 1, "", "concatenate"], [65, 2, 1, "", "conv1d"], [66, 2, 1, "", "conv2d"], [67, 2, 1, "", "convolve"], [68, 2, 1, "", "cos"], [69, 2, 1, "", "cosh"], [70, 2, 1, "", "default_device"], [71, 2, 1, "", "default_stream"], [72, 2, 1, "", "dequantize"], [73, 2, 1, "", "divide"], [74, 2, 1, "", "equal"], [75, 2, 1, "", "erf"], [76, 2, 1, "", "erfinv"], [77, 2, 1, "", "eval"], [78, 2, 1, "", "exp"], [79, 2, 1, "", "expand_dims"], [80, 2, 1, "", "eye"], [93, 2, 1, "", "flatten"], [94, 2, 1, "", "floor"], [95, 2, 1, "", "floor_divide"], [96, 2, 1, "", "full"], [97, 2, 1, "", "grad"], [98, 2, 1, "", "greater"], [99, 2, 1, "", "greater_equal"], [100, 2, 1, "", "identity"], [101, 2, 1, "", "jvp"], [102, 2, 1, "", "less"], [103, 2, 1, "", "less_equal"], [105, 2, 1, "", "linspace"], [106, 2, 1, "", "load"], [107, 2, 1, "", "log"], [108, 2, 1, "", "log10"], [109, 2, 1, "", "log1p"], [110, 2, 1, "", "log2"], [111, 2, 1, "", "logaddexp"], [112, 2, 1, "", "logical_not"], [113, 2, 1, "", "logsumexp"], [114, 2, 1, "", "matmul"], [115, 2, 1, "", "max"], [116, 2, 1, "", "maximum"], [117, 2, 1, "", "mean"], [118, 2, 1, "", "min"], [119, 2, 1, "", "minimum"], [120, 2, 1, "", "moveaxis"], [121, 2, 1, "", "multiply"], [122, 2, 1, "", "negative"], [123, 2, 1, "", "new_stream"], [124, 2, 1, "", "ones"], [125, 2, 1, "", "ones_like"], [126, 2, 1, "", "pad"], [127, 2, 1, "", "partition"], [128, 2, 1, "", "prod"], [129, 2, 1, "", "quantize"], [130, 2, 1, "", "quantized_matmul"], [141, 2, 1, "", "reciprocal"], [142, 2, 1, "", "repeat"], [143, 2, 1, "", "reshape"], [144, 2, 1, "", "round"], [145, 2, 1, "", "rsqrt"], [146, 2, 1, "", "save"], [147, 2, 1, "", "save_safetensors"], [148, 2, 1, "", "savez"], [149, 2, 1, "", "savez_compressed"], [150, 2, 1, "", "set_default_device"], [151, 2, 1, "", "set_default_stream"], [152, 2, 1, "", "sigmoid"], [153, 2, 1, "", "sign"], [154, 2, 1, "", "simplify"], [155, 2, 1, "", "sin"], [156, 2, 1, "", "sinh"], [157, 2, 1, "", "softmax"], [158, 2, 1, "", "sort"], [159, 2, 1, "", "split"], [160, 2, 1, "", "sqrt"], [161, 2, 1, "", "square"], [162, 2, 1, "", "squeeze"], [163, 2, 1, "", "stack"], [164, 2, 1, "", "stop_gradient"], [165, 2, 1, "", "subtract"], [166, 2, 1, "", "sum"], [167, 2, 1, "", "swapaxes"], [168, 2, 1, "", "take"], [169, 2, 1, "", "take_along_axis"], [170, 2, 1, "", "tan"], [171, 2, 1, "", "tanh"], [172, 2, 1, "", "tensordot"], [173, 2, 1, "", "transpose"], [174, 2, 1, "", "tri"], [175, 2, 1, "", "tril"], [176, 2, 1, "", "triu"], [177, 2, 1, "", "value_and_grad"], [178, 2, 1, "", "var"], [179, 2, 1, "", "vjp"], [180, 2, 1, "", "vmap"], [181, 2, 1, "", "where"], [182, 2, 1, "", "zeros"], [183, 2, 1, "", "zeros_like"]], "mlx.core.Device": [[7, 1, 1, "", "__init__"]], "mlx.core.Dtype": [[8, 1, 1, "", "__init__"]], "mlx.core.Stream": [[9, 1, 1, "", "__init__"]], "mlx.core.array": [[27, 3, 1, "", "T"], [26, 1, 1, "", "__init__"], [28, 1, 1, "", "abs"], [29, 1, 1, "", "all"], [30, 1, 1, "", "any"], [31, 1, 1, "", "argmax"], [32, 1, 1, "", "argmin"], [33, 1, 1, "", "astype"], [34, 1, 1, "", "cos"], [35, 3, 1, "", "dtype"], [36, 1, 1, "", "exp"], [37, 1, 1, "", "item"], [38, 1, 1, "", "log"], [39, 1, 1, "", "log1p"], [40, 1, 1, "", "logsumexp"], [41, 1, 1, "", "max"], [42, 1, 1, "", "mean"], [43, 1, 1, "", "min"], [44, 3, 1, "", "ndim"], [45, 1, 1, "", "prod"], [46, 1, 1, "", "reciprocal"], [47, 1, 1, "", "reshape"], [48, 1, 1, "", "round"], [49, 1, 1, "", "rsqrt"], [50, 3, 1, "", "shape"], [51, 1, 1, "", "sin"], [52, 3, 1, "", "size"], [53, 1, 1, "", "split"], [54, 1, 1, "", "sqrt"], [55, 1, 1, "", "square"], [56, 1, 1, "", "sum"], [57, 1, 1, "", "tolist"], [58, 1, 1, "", "transpose"], [59, 1, 1, "", "var"]], "mlx.core.fft": [[81, 2, 1, "", "fft"], [82, 2, 1, "", "fft2"], [83, 2, 1, "", "fftn"], [84, 2, 1, "", "ifft"], [85, 2, 1, "", "ifft2"], [86, 2, 1, "", "ifftn"], [87, 2, 1, "", "irfft"], [88, 2, 1, "", "irfft2"], [89, 2, 1, "", "irfftn"], [90, 2, 1, "", "rfft"], [91, 2, 1, "", "rfft2"], [92, 2, 1, "", "rfftn"]], "mlx.core.linalg": [[104, 2, 1, "", "norm"]], "mlx.core.random": [[131, 2, 1, "", "bernoulli"], [132, 2, 1, "", "categorical"], [133, 2, 1, "", "gumbel"], [134, 2, 1, "", "key"], [135, 2, 1, "", "normal"], [136, 2, 1, "", "randint"], [137, 2, 1, "", "seed"], [138, 2, 1, "", "split"], [139, 2, 1, "", "truncated_normal"], [140, 2, 1, "", "uniform"]], "mlx.nn": [[204, 0, 1, "", "ALiBi"], [205, 0, 1, "", "BatchNorm"], [206, 0, 1, "", "Conv1d"], [207, 0, 1, "", "Conv2d"], [208, 0, 1, "", "Dropout"], [209, 0, 1, "", "Dropout2d"], [210, 0, 1, "", "Dropout3d"], [211, 0, 1, "", "Embedding"], [212, 0, 1, "", "GELU"], [213, 0, 1, "", "GroupNorm"], [214, 0, 1, "", "InstanceNorm"], [215, 0, 1, "", "LayerNorm"], [216, 0, 1, "", "Linear"], [217, 0, 1, "", "Mish"], [271, 0, 1, "", "Module"], [236, 0, 1, "", "MultiHeadAttention"], [237, 0, 1, "", "PReLU"], [238, 0, 1, "", "QuantizedLinear"], [239, 0, 1, "", "RMSNorm"], [240, 0, 1, "", "ReLU"], [241, 0, 1, "", "RoPE"], [242, 0, 1, "", "SELU"], [243, 0, 1, "", "Sequential"], [244, 0, 1, "", "SiLU"], [245, 0, 1, "", "SinusoidalPositionalEncoding"], [246, 0, 1, "", "Step"], [247, 0, 1, "", "Transformer"], [248, 0, 1, "", "gelu"], [249, 0, 1, "", "gelu_approx"], [250, 0, 1, "", "gelu_fast_approx"], [262, 0, 1, "", "mish"], [263, 0, 1, "", "prelu"], [264, 0, 1, "", "relu"], [265, 0, 1, "", "selu"], [266, 0, 1, "", "silu"], [267, 0, 1, "", "step"], [184, 2, 1, "", "value_and_grad"]], "mlx.nn.Module": [[218, 1, 1, "", "apply"], [219, 1, 1, "", "apply_to_modules"], [220, 1, 1, "", "children"], [221, 1, 1, "", "eval"], [222, 1, 1, "", "filter_and_map"], [223, 1, 1, "", "freeze"], [224, 1, 1, "", "leaf_modules"], [225, 1, 1, "", "load_weights"], [226, 1, 1, "", "modules"], [227, 1, 1, "", "named_modules"], [228, 1, 1, "", "parameters"], [229, 1, 1, "", "save_weights"], [230, 1, 1, "", "train"], [231, 1, 1, "", "trainable_parameters"], [232, 3, 1, "", "training"], [233, 1, 1, "", "unfreeze"], [234, 1, 1, "", "update"], [235, 1, 1, "", "update_modules"]], "mlx.nn.losses": [[251, 0, 1, "", "binary_cross_entropy"], [252, 0, 1, "", "cross_entropy"], [253, 0, 1, "", "hinge_loss"], [254, 0, 1, "", "huber_loss"], [255, 0, 1, "", "kl_div_loss"], [256, 0, 1, "", "l1_loss"], [257, 0, 1, "", "log_cosh_loss"], [258, 0, 1, "", "mse_loss"], [259, 0, 1, "", "nll_loss"], [260, 0, 1, "", "smooth_l1_loss"], [261, 0, 1, "", "triplet_loss"]], "mlx.optimizers": [[185, 0, 1, "", "AdaDelta"], [186, 0, 1, "", "Adagrad"], [187, 0, 1, "", "Adam"], [188, 0, 1, "", "AdamW"], [189, 0, 1, "", "Adamax"], [190, 0, 1, "", "Lion"], [191, 0, 1, "", "Optimizer"], [192, 0, 1, "", "OptimizerState"], [193, 0, 1, "", "RMSprop"], [194, 0, 1, "", "SGD"]], "mlx.optimizers.Optimizer": [[191, 4, 1, "", "state"]], "mlx.utils": [[195, 2, 1, "", "tree_flatten"], [196, 2, 1, "", "tree_map"], [197, 2, 1, "", "tree_unflatten"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:function", "3": "py:property", "4": "py:attribute"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "function", "Python function"], "3": ["py", "property", "Python property"], "4": ["py", "attribute", "Python attribute"]}, "titleterms": {"oper": [0, 1, 272], "develop": 1, "document": 1, "introduc": 1, "exampl": [1, 5, 279], "primit": 1, "us": [1, 280], "implement": [1, 3], "cpu": 1, "backend": 1, "gpu": 1, "transform": [1, 247, 275, 278], "build": [1, 6], "bind": 1, "python": [1, 5, 6], "cmake": 1, "setuptool": 1, "usag": [1, 5], "result": 1, "script": [1, 3], "download": [1, 3], "code": [1, 3], "linear": [2, 202, 216], "regress": 2, "llm": 3, "infer": 3, "model": 3, "attent": 3, "layer": [3, 4, 269], "encod": 3, "full": [3, 96], "gener": 3, "put": 3, "all": [3, 12, 29], "togeth": 3, "convert": 3, "weight": 3, "load": [3, 106], "benchmark": 3, "multi": 4, "perceptron": 4, "mlx": [5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "instal": [5, 6], "api": [5, 6], "refer": 5, "c": [5, 6], "further": 5, "read": 5, "from": 6, "pypi": 6, "troubleshoot": 6, "sourc": 6, "requir": 6, "option": 6, "metal": 6, "found": 6, "core": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183], "devic": [7, 200], "dtype": [8, 35], "stream": [9, 200, 280], "ab": [10, 28], "add": 11, "allclos": 13, "ani": [14, 30], "arang": 15, "arcco": 16, "arccosh": 17, "arcsin": 18, "arcsinh": 19, "arctan": 20, "arctanh": 21, "argmax": [22, 31], "argmin": [23, 32], "argpartit": 24, "argsort": 25, "arrai": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 198], "t": 27, "astyp": 33, "co": [34, 68], "exp": [36, 78], "item": 37, "log": [38, 107], "log1p": [39, 109], "logsumexp": [40, 113], "max": [41, 115], "mean": [42, 117], "min": [43, 118], "ndim": 44, "prod": [45, 128], "reciproc": [46, 141], "reshap": [47, 143], "round": [48, 144], "rsqrt": [49, 145], "shape": 50, "sin": [51, 155], "size": 52, "split": [53, 138, 159], "sqrt": [54, 160], "squar": [55, 161], "sum": [56, 166], "tolist": 57, "transpos": [58, 173], "var": [59, 178], "array_equ": 60, "broadcast_to": 61, "ceil": 62, "clip": 63, "concaten": 64, "conv1d": [65, 206], "conv2d": [66, 207], "convolv": 67, "cosh": 69, "default_devic": 70, "default_stream": 71, "dequant": 72, "divid": 73, "equal": 74, "erf": 75, "erfinv": 76, "eval": [77, 221], "expand_dim": 79, "ey": 80, "fft": [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 201], "fft2": 82, "fftn": 83, "ifft": 84, "ifft2": 85, "ifftn": 86, "irfft": 87, "irfft2": 88, "irfftn": 89, "rfft": 90, "rfft2": 91, "rfftn": 92, "flatten": 93, "floor": 94, "floor_divid": 95, "grad": [97, 203], "greater": 98, "greater_equ": 99, "ident": 100, "jvp": 101, "less": 102, "less_equ": 103, "linalg": 104, "norm": 104, "linspac": 105, "log10": 108, "log2": 110, "logaddexp": 111, "logical_not": 112, "matmul": 114, "maximum": 116, "minimum": 119, "moveaxi": 120, "multipli": 121, "neg": 122, "new_stream": 123, "ones": 124, "ones_lik": 125, "pad": 126, "partit": 127, "quantiz": 129, "quantized_matmul": 130, "random": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 274], "bernoulli": 131, "categor": 132, "gumbel": 133, "kei": 134, "normal": 135, "randint": 136, "seed": 137, "truncated_norm": 139, "uniform": 140, "repeat": 142, "save": 146, "save_safetensor": 147, "savez": 148, "savez_compress": 149, "set_default_devic": 150, "set_default_stream": 151, "sigmoid": 152, "sign": 153, "simplifi": 154, "sinh": 156, "softmax": 157, "sort": 158, "squeez": 162, "stack": 163, "stop_gradi": 164, "subtract": 165, "swapax": 167, "take": 168, "take_along_axi": 169, "tan": 170, "tanh": 171, "tensordot": 172, "tri": 174, "tril": 175, "triu": 176, "value_and_grad": [177, 184], "vjp": 179, "vmap": 180, "where": 181, "zero": 182, "zeros_lik": 183, "nn": [184, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267], "optim": [185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 273], "adadelta": 185, "adagrad": 186, "adam": 187, "adamw": 188, "adamax": 189, "lion": 190, "optimizerst": 192, "rmsprop": 193, "sgd": 194, "util": [195, 196, 197, 276], "tree_flatten": 195, "tree_map": 196, "tree_unflatten": 197, "data": 199, "type": 199, "support": 199, "algebra": 202, "neural": 203, "network": 203, "quick": [203, 278], "start": [203, 278], "The": 203, "modul": [203, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 271], "class": 203, "paramet": [203, 228], "updat": [203, 234], "inspect": 203, "valu": 203, "alibi": 204, "batchnorm": 205, "dropout": 208, "dropout2d": 209, "dropout3d": 210, "embed": 211, "gelu": [212, 248], "groupnorm": 213, "instancenorm": 214, "layernorm": 215, "mish": [217, 262], "appli": 218, "apply_to_modul": 219, "children": 220, "filter_and_map": 222, "freez": 223, "leaf_modul": 224, "load_weight": 225, "named_modul": 227, "save_weight": 229, "train": [230, 232], "trainable_paramet": 231, "unfreez": 233, "update_modul": 235, "multiheadattent": 236, "prelu": [237, 263], "quantizedlinear": 238, "rmsnorm": 239, "relu": [240, 264], "rope": 241, "selu": [242, 265], "sequenti": 243, "silu": [244, 266], "sinusoidalpositionalencod": 245, "step": [246, 267], "gelu_approx": 249, "gelu_fast_approx": 250, "loss": [251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 270], "binary_cross_entropi": 251, "cross_entropi": 252, "hinge_loss": 253, "huber_loss": 254, "kl_div_loss": 255, "l1_loss": 256, "log_cosh_loss": 257, "mse_loss": 258, "nll_loss": 259, "smooth_l1_loss": 260, "triplet_loss": 261, "function": [268, 270, 278], "tree": 276, "convers": 277, "numpi": 277, "other": 277, "framework": 277, "pytorch": 277, "jax": 277, "tensorflow": 277, "guid": 278, "basic": 278, "graph": 278, "unifi": 279, "memori": 279, "A": 279, "simpl": 279, "specifi": 280}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 56}})
\ No newline at end of file
diff --git a/docs/build/html/unified_memory.html b/docs/build/html/unified_memory.html
deleted file mode 100644
index 390db24bf..000000000
--- a/docs/build/html/unified_memory.html
+++ /dev/null
@@ -1,801 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Unified Memory — MLX 0.0.7 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Skip to main content
-
-
-
-
-
-
- Back to top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Unified Memory
-Apple silicon has a unified memory architecture. The CPU and GPU have direct
-access to the same memory pool. MLX is designed to take advantage of that.
-Concretely, when you make an array in MLX you don’t have to specify its location:
-a = mx . random . normal (( 100 ,))
-b = mx . random . normal (( 100 ,))
-
-
-Both a
and b
live in unified memory.
-In MLX, rather than moving arrays to devices, you specify the device when you
-run the operation. Any device can perform any operation on a
and b
-without needing to move them from one memory location to another. For example:
-mx . add ( a , b , stream = mx . cpu )
-mx . add ( a , b , stream = mx . gpu )
-
-
-In the above, both the CPU and the GPU will perform the same add
-operation. The operations can (and likely will) be run in parallel since
-there are no dependencies between them. See Using Streams for more
-information the semantics of streams in MLX.
-In the above add
example, there are no dependencies between operations, so
-there is no possibility for race conditions. If there are dependencies, the
-MLX scheduler will automatically manage them. For example:
-c = mx . add ( a , b , stream = mx . cpu )
-d = mx . add ( a , c , stream = mx . gpu )
-
-
-In the above case, the second add
runs on the GPU but it depends on the
-output of the first add
which is running on the CPU. MLX will
-automatically insert a dependency between the two streams so that the second
-add
only starts executing after the first is complete and c
is
-available.
-
-A Simple Example
-Here is a more interesting (albeit slightly contrived example) of how unified
-memory can be helpful. Suppose we have the following computation:
-def fun ( a , b , d1 , d2 ):
- x = mx . matmul ( a , b , stream = d1 )
- for _ in range ( 500 ):
- b = mx . exp ( b , stream = d2 )
- return x , b
-
-
-which we want to run with the following arguments:
-a = mx . random . uniform ( shape = ( 4096 , 512 ))
-b = mx . random . uniform ( shape = ( 512 , 4 ))
-
-
-The first matmul
operation is a good fit for the GPU since it’s more
-compute dense. The second sequence of operations are a better fit for the CPU,
-since they are very small and would probably be overhead bound on the GPU.
-If we time the computation fully on the GPU, we get 2.8 milliseconds. But if we
-run the computation with d1=mx.gpu
and d2=mx.cpu
, then the time is only
-about 1.4 milliseconds, about twice as fast. These times were measured on an M1
-Max.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/build/html/usage/numpy.html b/docs/build/html/usage/numpy.html
new file mode 100644
index 000000000..b581713e1
--- /dev/null
+++ b/docs/build/html/usage/numpy.html
@@ -0,0 +1,834 @@
+
+
+
+
+
+
+
+
+
+
+
+ Conversion to NumPy and Other Frameworks — MLX 0.0.7 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Conversion to NumPy and Other Frameworks
+
+
+
+
+
+
+
+
+
+
+Conversion to NumPy and Other Frameworks
+MLX array implements the Python Buffer Protocol .
+Let’s convert an array to NumPy and back.
+import mlx.core as mx
+import numpy as np
+
+a = mx . arange ( 3 )
+b = np . array ( a ) # copy of a
+c = mx . array ( b ) # copy of b
+
+
+
+
Note
+
Since NumPy does not support bfloat16
arrays, you will need to convert to float16
or float32
first:
+np.array(a.astype(mx.float32))
.
+Otherwise, you will receive an error like: Item size 2 for PEP 3118 buffer format string does not match the dtype V item size 0.
+
+By default, NumPy copies data to a new array. This can be prevented by creating an array view:
+a = mx . arange ( 3 )
+a_view = np . array ( a , copy = False )
+print ( a_view . flags . owndata ) # False
+a_view [ 0 ] = 1
+print ( a [ 0 ] . item ()) # 1
+
+
+A NumPy array view is a normal NumPy array, except that it does not own its memory.
+This means writing to the view is reflected in the original array.
+While this is quite powerful to prevent copying arrays, it should be noted that external changes to the memory of arrays cannot be reflected in gradients.
+Let’s demonstrate this in an example:
+def f ( x ):
+ x_view = np . array ( x , copy = False )
+ x_view [:] *= x_view # modify memory without telling mx
+ return x . sum ()
+
+x = mx . array ([ 3.0 ])
+y , df = mx . value_and_grad ( f )( x )
+print ( "f(x) = x² =" , y . item ()) # 9.0
+print ( "f'(x) = 2x !=" , df . item ()) # 1.0
+
+
+The function f
indirectly modifies the array x
through a memory view.
+However, this modification is not reflected in the gradient, as seen in the last line outputting 1.0
,
+representing the gradient of the sum operation alone.
+The squaring of x
occurs externally to MLX, meaning that no gradient is incorporated.
+It’s important to note that a similar issue arises during array conversion and copying.
+For instance, a function defined as mx.array(np.array(x)**2).sum()
would also result in an incorrect gradient,
+even though no in-place operations on MLX memory are executed.
+
+PyTorch
+PyTorch supports the buffer protocol, but it requires an explicit memoryview
.
+import mlx.core as mx
+import torch
+
+a = mx . arange ( 3 )
+b = torch . tensor ( memoryview ( a ))
+c = mx . array ( b . numpy ())
+
+
+Conversion from PyTorch tensors back to arrays must be done via intermediate NumPy arrays with numpy()
.
+
+
+JAX
+JAX fully supports the buffer protocol.
+import mlx.core as mx
+import jax.numpy as jnp
+
+a = mx . arange ( 3 )
+b = jnp . array ( a )
+c = mx . array ( b )
+
+
+
+
+TensorFlow
+TensorFlow supports the buffer protocol, but it requires an explicit memoryview
.
+import mlx.core as mx
+import tensorflow as tf
+
+a = mx . arange ( 3 )
+b = tf . constant ( memoryview ( a ))
+c = mx . array ( b )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/usage/quick_start.html b/docs/build/html/usage/quick_start.html
new file mode 100644
index 000000000..012ccc4b3
--- /dev/null
+++ b/docs/build/html/usage/quick_start.html
@@ -0,0 +1,800 @@
+
+
+
+
+
+
+
+
+
+
+
+ Quick Start Guide — MLX 0.0.7 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Quick Start Guide
+
+
+
+
+
+
+
+
+
+
+Quick Start Guide
+
+Basics
+Import mlx.core
and make an array
:
+>> import mlx.core as mx
+>> a = mx . array ([ 1 , 2 , 3 , 4 ])
+>> a . shape
+[ 4 ]
+>> a . dtype
+int32
+>> b = mx . array ([ 1.0 , 2.0 , 3.0 , 4.0 ])
+>> b . dtype
+float32
+
+
+Operations in MLX are lazy. The outputs of MLX operations are not computed
+until they are needed. To force an array to be evaluated use
+eval()
. Arrays will automatically be evaluated in a few cases. For
+example, inspecting a scalar with array.item()
, printing an array,
+or converting an array from array
to numpy.ndarray
all
+automatically evaluate the array.
+>> c = a + b # c not yet evaluated
+>> mx . eval ( c ) # evaluates c
+>> c = a + b
+>> print ( c ) # Also evaluates c
+array ([ 2 , 4 , 6 , 8 ], dtype = float32 )
+>> c = a + b
+>> import numpy as np
+>> np . array ( c ) # Also evaluates c
+array ([ 2. , 4. , 6. , 8. ], dtype = float32 )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/usage/unified_memory.html b/docs/build/html/usage/unified_memory.html
new file mode 100644
index 000000000..b02a16092
--- /dev/null
+++ b/docs/build/html/usage/unified_memory.html
@@ -0,0 +1,802 @@
+
+
+
+
+
+
+
+
+
+
+
+ Unified Memory — MLX 0.0.7 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Unified Memory
+Apple silicon has a unified memory architecture. The CPU and GPU have direct
+access to the same memory pool. MLX is designed to take advantage of that.
+Concretely, when you make an array in MLX you don’t have to specify its location:
+a = mx . random . normal (( 100 ,))
+b = mx . random . normal (( 100 ,))
+
+
+Both a
and b
live in unified memory.
+In MLX, rather than moving arrays to devices, you specify the device when you
+run the operation. Any device can perform any operation on a
and b
+without needing to move them from one memory location to another. For example:
+mx . add ( a , b , stream = mx . cpu )
+mx . add ( a , b , stream = mx . gpu )
+
+
+In the above, both the CPU and the GPU will perform the same add
+operation. The operations can (and likely will) be run in parallel since
+there are no dependencies between them. See Using Streams for more
+information the semantics of streams in MLX.
+In the above add
example, there are no dependencies between operations, so
+there is no possibility for race conditions. If there are dependencies, the
+MLX scheduler will automatically manage them. For example:
+c = mx . add ( a , b , stream = mx . cpu )
+d = mx . add ( a , c , stream = mx . gpu )
+
+
+In the above case, the second add
runs on the GPU but it depends on the
+output of the first add
which is running on the CPU. MLX will
+automatically insert a dependency between the two streams so that the second
+add
only starts executing after the first is complete and c
is
+available.
+
+A Simple Example
+Here is a more interesting (albeit slightly contrived example) of how unified
+memory can be helpful. Suppose we have the following computation:
+def fun ( a , b , d1 , d2 ):
+ x = mx . matmul ( a , b , stream = d1 )
+ for _ in range ( 500 ):
+ b = mx . exp ( b , stream = d2 )
+ return x , b
+
+
+which we want to run with the following arguments:
+a = mx . random . uniform ( shape = ( 4096 , 512 ))
+b = mx . random . uniform ( shape = ( 512 , 4 ))
+
+
+The first matmul
operation is a good fit for the GPU since it’s more
+compute dense. The second sequence of operations are a better fit for the CPU,
+since they are very small and would probably be overhead bound on the GPU.
+If we time the computation fully on the GPU, we get 2.8 milliseconds. But if we
+run the computation with d1=mx.gpu
and d2=mx.cpu
, then the time is only
+about 1.4 milliseconds, about twice as fast. These times were measured on an M1
+Max.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/usage/using_streams.html b/docs/build/html/usage/using_streams.html
new file mode 100644
index 000000000..41e64e617
--- /dev/null
+++ b/docs/build/html/usage/using_streams.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
+
+
+ Using Streams — MLX 0.0.7 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to main content
+
+
+
+
+
+
+ Back to top
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Using Streams
+
+Specifying the Stream
+All operations (including random number generation) take an optional
+keyword argument stream
. The stream
kwarg specifies which
+Stream
the operation should run on. If the stream is unspecified then
+the operation is run on the default stream of the default device:
+mx.default_stream(mx.default_device())
. The stream
kwarg can also
+be a Device
(e.g. stream=my_device
) in which case the operation is
+run on the default stream of the provided device
+mx.default_stream(my_device)
.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/build/html/using_streams.html b/docs/build/html/using_streams.html
deleted file mode 100644
index 01c1994f1..000000000
--- a/docs/build/html/using_streams.html
+++ /dev/null
@@ -1,757 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Using Streams — MLX 0.0.7 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Skip to main content
-
-
-
-
-
-
- Back to top
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Using Streams
-
-Specifying the Stream
-All operations (including random number generation) take an optional
-keyword argument stream
. The stream
kwarg specifies which
-Stream
the operation should run on. If the stream is unspecified then
-the operation is run on the default stream of the default device:
-mx.default_stream(mx.default_device())
. The stream
kwarg can also
-be a Device
(e.g. stream=my_device
) in which case the operation is
-run on the default stream of the provided device
-mx.default_stream(my_device)
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file