diff --git a/docs/build/doctrees/cpp/ops.doctree b/docs/build/doctrees/cpp/ops.doctree new file mode 100644 index 000000000..8ade67022 Binary files /dev/null and b/docs/build/doctrees/cpp/ops.doctree differ diff --git a/docs/build/doctrees/dev/extensions.doctree b/docs/build/doctrees/dev/extensions.doctree new file mode 100644 index 000000000..a0d2baf1d Binary files /dev/null and b/docs/build/doctrees/dev/extensions.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle new file mode 100644 index 000000000..2f7d96493 Binary files /dev/null and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/examples/linear_regression.doctree b/docs/build/doctrees/examples/linear_regression.doctree new file mode 100644 index 000000000..4b9be359e Binary files /dev/null and b/docs/build/doctrees/examples/linear_regression.doctree differ diff --git a/docs/build/doctrees/examples/llama-inference.doctree b/docs/build/doctrees/examples/llama-inference.doctree new file mode 100644 index 000000000..23804ca7a Binary files /dev/null and b/docs/build/doctrees/examples/llama-inference.doctree differ diff --git a/docs/build/doctrees/examples/mlp.doctree b/docs/build/doctrees/examples/mlp.doctree new file mode 100644 index 000000000..20decac88 Binary files /dev/null and b/docs/build/doctrees/examples/mlp.doctree differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree new file mode 100644 index 000000000..96bbda118 Binary files /dev/null and b/docs/build/doctrees/index.doctree differ diff --git a/docs/build/doctrees/install.doctree b/docs/build/doctrees/install.doctree new file mode 100644 index 000000000..8d5f88809 Binary files /dev/null and b/docs/build/doctrees/install.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.Device.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.Device.doctree new file mode 100644 index 000000000..0e8b53837 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.Device.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.Dtype.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.Dtype.doctree new file mode 100644 index 000000000..b76aa6100 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.Dtype.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.Stream.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.Stream.doctree new file mode 100644 index 000000000..b09770dda Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.Stream.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.abs.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.abs.doctree new file mode 100644 index 000000000..8d6d05722 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.abs.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.add.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.add.doctree new file mode 100644 index 000000000..f2286c5aa Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.add.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.all.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.all.doctree new file mode 100644 index 000000000..b8e2f1d37 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.all.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.allclose.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.allclose.doctree new file mode 100644 index 000000000..657f0c24b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.allclose.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.any.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.any.doctree new file mode 100644 index 000000000..b7da1ff32 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.any.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arange.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arange.doctree new file mode 100644 index 000000000..0fd022e89 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arange.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arccos.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arccos.doctree new file mode 100644 index 000000000..f7ab0f64a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arccos.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arccosh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arccosh.doctree new file mode 100644 index 000000000..e251f756c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arccosh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arcsin.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arcsin.doctree new file mode 100644 index 000000000..4eaeb9945 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arcsin.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arcsinh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arcsinh.doctree new file mode 100644 index 000000000..d567a4b93 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arcsinh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arctan.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arctan.doctree new file mode 100644 index 000000000..7e1681e42 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arctan.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.arctanh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.arctanh.doctree new file mode 100644 index 000000000..4203ad352 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.arctanh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.argmax.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.argmax.doctree new file mode 100644 index 000000000..7f3ef214f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.argmax.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.argmin.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.argmin.doctree new file mode 100644 index 000000000..a85e59e58 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.argmin.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.argpartition.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.argpartition.doctree new file mode 100644 index 000000000..a309dea13 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.argpartition.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.argsort.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.argsort.doctree new file mode 100644 index 000000000..17aaf5d4a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.argsort.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.T.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.T.doctree new file mode 100644 index 000000000..8a845dddc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.T.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.abs.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.abs.doctree new file mode 100644 index 000000000..942979806 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.abs.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.all.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.all.doctree new file mode 100644 index 000000000..79f01e39d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.all.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.any.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.any.doctree new file mode 100644 index 000000000..98eb5675f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.any.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.argmax.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.argmax.doctree new file mode 100644 index 000000000..78d192cbe Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.argmax.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.argmin.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.argmin.doctree new file mode 100644 index 000000000..ea2043861 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.argmin.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.astype.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.astype.doctree new file mode 100644 index 000000000..1dd1944a7 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.astype.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.cos.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.cos.doctree new file mode 100644 index 000000000..5903c60b3 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.cos.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.doctree new file mode 100644 index 000000000..43418f8c8 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.dtype.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.dtype.doctree new file mode 100644 index 000000000..19bef20a7 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.dtype.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.exp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.exp.doctree new file mode 100644 index 000000000..6a32c5103 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.exp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.item.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.item.doctree new file mode 100644 index 000000000..ec88b9d46 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.item.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.log.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.log.doctree new file mode 100644 index 000000000..db73a238c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.log.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.log1p.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.log1p.doctree new file mode 100644 index 000000000..3840dcd76 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.log1p.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.logsumexp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.logsumexp.doctree new file mode 100644 index 000000000..1ecb477ab Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.logsumexp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.max.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.max.doctree new file mode 100644 index 000000000..261fdf7ba Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.max.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.mean.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.mean.doctree new file mode 100644 index 000000000..c14cb4fb0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.mean.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.min.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.min.doctree new file mode 100644 index 000000000..9a739fba5 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.min.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.ndim.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.ndim.doctree new file mode 100644 index 000000000..12ff80192 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.ndim.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.prod.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.prod.doctree new file mode 100644 index 000000000..643d5471c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.prod.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.reciprocal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.reciprocal.doctree new file mode 100644 index 000000000..3156e2020 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.reciprocal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.reshape.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.reshape.doctree new file mode 100644 index 000000000..f52a86511 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.reshape.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.round.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.round.doctree new file mode 100644 index 000000000..9afc4c91b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.round.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.rsqrt.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.rsqrt.doctree new file mode 100644 index 000000000..3c275626b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.rsqrt.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.shape.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.shape.doctree new file mode 100644 index 000000000..2f6183431 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.shape.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.sin.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.sin.doctree new file mode 100644 index 000000000..51752c2a9 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.sin.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.size.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.size.doctree new file mode 100644 index 000000000..c73cad869 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.size.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.split.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.split.doctree new file mode 100644 index 000000000..8a1f5e9e7 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.split.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.sqrt.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.sqrt.doctree new file mode 100644 index 000000000..0045103e0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.sqrt.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.square.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.square.doctree new file mode 100644 index 000000000..9ed6d6f8b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.square.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.sum.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.sum.doctree new file mode 100644 index 000000000..d8a5adefa Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.sum.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.tolist.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.tolist.doctree new file mode 100644 index 000000000..d7866eb13 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.tolist.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.transpose.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.transpose.doctree new file mode 100644 index 000000000..f7922948f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.transpose.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array.var.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array.var.doctree new file mode 100644 index 000000000..1067c4261 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array.var.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.array_equal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.array_equal.doctree new file mode 100644 index 000000000..77eec964b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.array_equal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.broadcast_to.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.broadcast_to.doctree new file mode 100644 index 000000000..6dca61080 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.broadcast_to.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.ceil.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.ceil.doctree new file mode 100644 index 000000000..f55398aa2 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.ceil.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.clip.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.clip.doctree new file mode 100644 index 000000000..bcf04a497 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.clip.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.concatenate.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.concatenate.doctree new file mode 100644 index 000000000..cdbf97110 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.concatenate.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.conv1d.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.conv1d.doctree new file mode 100644 index 000000000..77b1b8ca2 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.conv1d.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.conv2d.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.conv2d.doctree new file mode 100644 index 000000000..9eacea9e0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.conv2d.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.convolve.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.convolve.doctree new file mode 100644 index 000000000..c4823f85c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.convolve.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.cos.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.cos.doctree new file mode 100644 index 000000000..035779f02 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.cos.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.cosh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.cosh.doctree new file mode 100644 index 000000000..474dfbf72 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.cosh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.default_device.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.default_device.doctree new file mode 100644 index 000000000..f530d1da5 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.default_device.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.default_stream.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.default_stream.doctree new file mode 100644 index 000000000..7198c13a9 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.default_stream.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.dequantize.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.dequantize.doctree new file mode 100644 index 000000000..1e05a407d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.dequantize.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.divide.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.divide.doctree new file mode 100644 index 000000000..964b2400c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.divide.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.divmod.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.divmod.doctree new file mode 100644 index 000000000..dfdfaca64 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.divmod.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.equal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.equal.doctree new file mode 100644 index 000000000..cd39a49c6 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.equal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.erf.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.erf.doctree new file mode 100644 index 000000000..ddc2eefed Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.erf.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.erfinv.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.erfinv.doctree new file mode 100644 index 000000000..1676d7dbc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.erfinv.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.eval.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.eval.doctree new file mode 100644 index 000000000..e9a0ba367 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.eval.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.exp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.exp.doctree new file mode 100644 index 000000000..a5515bc24 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.exp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.expand_dims.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.expand_dims.doctree new file mode 100644 index 000000000..2b4cc7a1c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.expand_dims.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.eye.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.eye.doctree new file mode 100644 index 000000000..5f93ca3e2 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.eye.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft.doctree new file mode 100644 index 000000000..279ef6473 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft2.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft2.doctree new file mode 100644 index 000000000..406878c3c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fft2.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.fftn.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fftn.doctree new file mode 100644 index 000000000..06fe68acc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.fftn.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft.doctree new file mode 100644 index 000000000..c23ebb2cb Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft2.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft2.doctree new file mode 100644 index 000000000..3bc531ea8 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifft2.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifftn.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifftn.doctree new file mode 100644 index 000000000..640ca7896 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.ifftn.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft.doctree new file mode 100644 index 000000000..8372bf45e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft2.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft2.doctree new file mode 100644 index 000000000..6cb1aaddf Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfft2.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfftn.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfftn.doctree new file mode 100644 index 000000000..253424bd4 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.irfftn.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft.doctree new file mode 100644 index 000000000..87e93b544 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft2.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft2.doctree new file mode 100644 index 000000000..1c61d4992 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfft2.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfftn.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfftn.doctree new file mode 100644 index 000000000..3c41914bf Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.fft.rfftn.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.flatten.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.flatten.doctree new file mode 100644 index 000000000..841f020bd Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.flatten.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.floor.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.floor.doctree new file mode 100644 index 000000000..94cfb529b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.floor.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.floor_divide.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.floor_divide.doctree new file mode 100644 index 000000000..8d63347ec Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.floor_divide.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.full.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.full.doctree new file mode 100644 index 000000000..ca8e07c20 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.full.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.grad.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.grad.doctree new file mode 100644 index 000000000..bd99443dc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.grad.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.greater.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.greater.doctree new file mode 100644 index 000000000..0e625e342 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.greater.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.greater_equal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.greater_equal.doctree new file mode 100644 index 000000000..5573eb556 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.greater_equal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.identity.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.identity.doctree new file mode 100644 index 000000000..e11d9bd2d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.identity.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.inner.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.inner.doctree new file mode 100644 index 000000000..d48aa6bc8 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.inner.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.isinf.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.isinf.doctree new file mode 100644 index 000000000..830ebb9a4 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.isinf.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.isnan.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.isnan.doctree new file mode 100644 index 000000000..8322e6451 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.isnan.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.isneginf.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.isneginf.doctree new file mode 100644 index 000000000..3cb9d80d6 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.isneginf.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.isposinf.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.isposinf.doctree new file mode 100644 index 000000000..aac5c0a6a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.isposinf.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.jvp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.jvp.doctree new file mode 100644 index 000000000..7c6fbd1b1 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.jvp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.less.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.less.doctree new file mode 100644 index 000000000..f9e957686 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.less.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.less_equal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.less_equal.doctree new file mode 100644 index 000000000..808bf41e6 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.less_equal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.linalg.norm.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.linalg.norm.doctree new file mode 100644 index 000000000..4bf27e832 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.linalg.norm.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.linspace.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.linspace.doctree new file mode 100644 index 000000000..03abea113 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.linspace.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.load.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.load.doctree new file mode 100644 index 000000000..eee3858aa Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.load.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.log.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.log.doctree new file mode 100644 index 000000000..0b4027e64 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.log.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.log10.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.log10.doctree new file mode 100644 index 000000000..28848956a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.log10.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.log1p.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.log1p.doctree new file mode 100644 index 000000000..91a06483e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.log1p.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.log2.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.log2.doctree new file mode 100644 index 000000000..62d2e0dad Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.log2.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.logaddexp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.logaddexp.doctree new file mode 100644 index 000000000..3b7cc020d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.logaddexp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.logical_and.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.logical_and.doctree new file mode 100644 index 000000000..9dfc94bfd Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.logical_and.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.logical_not.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.logical_not.doctree new file mode 100644 index 000000000..43109d0cb Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.logical_not.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.logical_or.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.logical_or.doctree new file mode 100644 index 000000000..b6db9d22a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.logical_or.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.logsumexp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.logsumexp.doctree new file mode 100644 index 000000000..2ecb37256 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.logsumexp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.matmul.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.matmul.doctree new file mode 100644 index 000000000..31c0b2bd4 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.matmul.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.max.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.max.doctree new file mode 100644 index 000000000..c13fe054f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.max.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.maximum.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.maximum.doctree new file mode 100644 index 000000000..ef48dff78 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.maximum.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.mean.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.mean.doctree new file mode 100644 index 000000000..effa5331b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.mean.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.min.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.min.doctree new file mode 100644 index 000000000..78741b97a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.min.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.minimum.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.minimum.doctree new file mode 100644 index 000000000..8d836911f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.minimum.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.moveaxis.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.moveaxis.doctree new file mode 100644 index 000000000..1c39b81ae Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.moveaxis.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.multiply.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.multiply.doctree new file mode 100644 index 000000000..c374fa7e7 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.multiply.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.negative.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.negative.doctree new file mode 100644 index 000000000..13feb8655 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.negative.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.new_stream.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.new_stream.doctree new file mode 100644 index 000000000..e9cf8d29e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.new_stream.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.ones.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.ones.doctree new file mode 100644 index 000000000..293e89f6c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.ones.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.ones_like.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.ones_like.doctree new file mode 100644 index 000000000..5576b0db8 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.ones_like.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.outer.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.outer.doctree new file mode 100644 index 000000000..43ac2a1d0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.outer.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.pad.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.pad.doctree new file mode 100644 index 000000000..de3a605fd Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.pad.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.partition.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.partition.doctree new file mode 100644 index 000000000..e70afcebc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.partition.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.prod.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.prod.doctree new file mode 100644 index 000000000..baf59662e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.prod.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.quantize.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.quantize.doctree new file mode 100644 index 000000000..cd5d60f56 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.quantize.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.quantized_matmul.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.quantized_matmul.doctree new file mode 100644 index 000000000..28716d48a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.quantized_matmul.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.bernoulli.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.bernoulli.doctree new file mode 100644 index 000000000..51bd41931 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.bernoulli.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.categorical.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.categorical.doctree new file mode 100644 index 000000000..9cf4871c4 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.categorical.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.gumbel.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.gumbel.doctree new file mode 100644 index 000000000..b49ceb730 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.gumbel.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.key.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.key.doctree new file mode 100644 index 000000000..7c388509d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.key.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.normal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.normal.doctree new file mode 100644 index 000000000..c59a5f8aa Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.normal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.randint.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.randint.doctree new file mode 100644 index 000000000..c66cc8b90 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.randint.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.seed.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.seed.doctree new file mode 100644 index 000000000..a8f54cc52 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.seed.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.split.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.split.doctree new file mode 100644 index 000000000..fdbc46917 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.split.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.truncated_normal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.truncated_normal.doctree new file mode 100644 index 000000000..2319da031 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.truncated_normal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.random.uniform.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.random.uniform.doctree new file mode 100644 index 000000000..61200ae17 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.random.uniform.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.reciprocal.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.reciprocal.doctree new file mode 100644 index 000000000..7151f851a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.reciprocal.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.repeat.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.repeat.doctree new file mode 100644 index 000000000..f65c41fa8 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.repeat.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.reshape.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.reshape.doctree new file mode 100644 index 000000000..f3f77d856 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.reshape.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.round.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.round.doctree new file mode 100644 index 000000000..21f35145b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.round.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.rsqrt.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.rsqrt.doctree new file mode 100644 index 000000000..26bb22da0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.rsqrt.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.save.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.save.doctree new file mode 100644 index 000000000..62c6b196c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.save.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.save_gguf.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.save_gguf.doctree new file mode 100644 index 000000000..e5603bc97 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.save_gguf.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.save_safetensors.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.save_safetensors.doctree new file mode 100644 index 000000000..fde220212 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.save_safetensors.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.savez.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.savez.doctree new file mode 100644 index 000000000..5bb76b6dc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.savez.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.savez_compressed.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.savez_compressed.doctree new file mode 100644 index 000000000..2363ee48a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.savez_compressed.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.set_default_device.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.set_default_device.doctree new file mode 100644 index 000000000..5484b3d35 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.set_default_device.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.set_default_stream.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.set_default_stream.doctree new file mode 100644 index 000000000..3b72c0325 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.set_default_stream.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sigmoid.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sigmoid.doctree new file mode 100644 index 000000000..4acb22b29 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sigmoid.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sign.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sign.doctree new file mode 100644 index 000000000..1a099b4ee Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sign.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.simplify.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.simplify.doctree new file mode 100644 index 000000000..c8d8e4a8e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.simplify.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sin.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sin.doctree new file mode 100644 index 000000000..de8e10ad5 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sin.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sinh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sinh.doctree new file mode 100644 index 000000000..acf0171e2 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sinh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.softmax.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.softmax.doctree new file mode 100644 index 000000000..5a5a74b3c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.softmax.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sort.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sort.doctree new file mode 100644 index 000000000..d6aa3f72e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sort.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.split.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.split.doctree new file mode 100644 index 000000000..ee68048f0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.split.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sqrt.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sqrt.doctree new file mode 100644 index 000000000..3c8c33a8b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sqrt.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.square.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.square.doctree new file mode 100644 index 000000000..602fbe023 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.square.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.squeeze.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.squeeze.doctree new file mode 100644 index 000000000..9b8a960b9 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.squeeze.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.stack.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.stack.doctree new file mode 100644 index 000000000..96b5b740e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.stack.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.stop_gradient.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.stop_gradient.doctree new file mode 100644 index 000000000..2f5d6ba12 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.stop_gradient.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.subtract.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.subtract.doctree new file mode 100644 index 000000000..295b0f412 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.subtract.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.sum.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.sum.doctree new file mode 100644 index 000000000..2997e4271 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.sum.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.swapaxes.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.swapaxes.doctree new file mode 100644 index 000000000..dcde15d9f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.swapaxes.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.take.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.take.doctree new file mode 100644 index 000000000..8512009d9 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.take.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.take_along_axis.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.take_along_axis.doctree new file mode 100644 index 000000000..b1644987b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.take_along_axis.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.tan.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.tan.doctree new file mode 100644 index 000000000..fabce8aff Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.tan.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.tanh.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.tanh.doctree new file mode 100644 index 000000000..38b040c87 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.tanh.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.tensordot.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.tensordot.doctree new file mode 100644 index 000000000..811252803 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.tensordot.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.transpose.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.transpose.doctree new file mode 100644 index 000000000..994e06fcc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.transpose.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.tri.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.tri.doctree new file mode 100644 index 000000000..c8e4f3593 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.tri.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.tril.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.tril.doctree new file mode 100644 index 000000000..8920df3fb Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.tril.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.triu.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.triu.doctree new file mode 100644 index 000000000..52fabce5d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.triu.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.value_and_grad.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.value_and_grad.doctree new file mode 100644 index 000000000..c6a282a28 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.value_and_grad.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.var.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.var.doctree new file mode 100644 index 000000000..0513ecacc Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.var.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.vjp.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.vjp.doctree new file mode 100644 index 000000000..f89559aba Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.vjp.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.vmap.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.vmap.doctree new file mode 100644 index 000000000..868898ddb Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.vmap.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.where.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.where.doctree new file mode 100644 index 000000000..9cb374060 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.where.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.zeros.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.zeros.doctree new file mode 100644 index 000000000..e4499ae4c Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.zeros.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.core.zeros_like.doctree b/docs/build/doctrees/python/_autosummary/mlx.core.zeros_like.doctree new file mode 100644 index 000000000..3682d9770 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.core.zeros_like.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.nn.value_and_grad.doctree b/docs/build/doctrees/python/_autosummary/mlx.nn.value_and_grad.doctree new file mode 100644 index 000000000..96a0ef226 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.nn.value_and_grad.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdaDelta.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdaDelta.doctree new file mode 100644 index 000000000..65030721a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdaDelta.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adagrad.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adagrad.doctree new file mode 100644 index 000000000..4b414542a Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adagrad.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adam.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adam.doctree new file mode 100644 index 000000000..e3291a8d1 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adam.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdamW.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdamW.doctree new file mode 100644 index 000000000..cfe6a6c0d Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.AdamW.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adamax.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adamax.doctree new file mode 100644 index 000000000..5bbe3c40b Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Adamax.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.Lion.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Lion.doctree new file mode 100644 index 000000000..4fa8ddcc0 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Lion.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.Optimizer.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Optimizer.doctree new file mode 100644 index 000000000..921aca155 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.Optimizer.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.OptimizerState.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.OptimizerState.doctree new file mode 100644 index 000000000..d4a69be2e Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.OptimizerState.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.RMSprop.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.RMSprop.doctree new file mode 100644 index 000000000..8f8379715 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.RMSprop.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.optimizers.SGD.doctree b/docs/build/doctrees/python/_autosummary/mlx.optimizers.SGD.doctree new file mode 100644 index 000000000..215c29f80 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.optimizers.SGD.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.utils.tree_flatten.doctree b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_flatten.doctree new file mode 100644 index 000000000..cab935487 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_flatten.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.utils.tree_map.doctree b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_map.doctree new file mode 100644 index 000000000..e7351cc08 Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_map.doctree differ diff --git a/docs/build/doctrees/python/_autosummary/mlx.utils.tree_unflatten.doctree b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_unflatten.doctree new file mode 100644 index 000000000..703f7e65f Binary files /dev/null and b/docs/build/doctrees/python/_autosummary/mlx.utils.tree_unflatten.doctree differ diff --git a/docs/build/doctrees/python/array.doctree b/docs/build/doctrees/python/array.doctree new file mode 100644 index 000000000..e36586447 Binary files /dev/null and b/docs/build/doctrees/python/array.doctree differ diff --git a/docs/build/doctrees/python/data_types.doctree b/docs/build/doctrees/python/data_types.doctree new file mode 100644 index 000000000..d4ad20ae3 Binary files /dev/null and b/docs/build/doctrees/python/data_types.doctree differ diff --git a/docs/build/doctrees/python/devices_and_streams.doctree b/docs/build/doctrees/python/devices_and_streams.doctree new file mode 100644 index 000000000..6a30a134c Binary files /dev/null and b/docs/build/doctrees/python/devices_and_streams.doctree differ diff --git a/docs/build/doctrees/python/fft.doctree b/docs/build/doctrees/python/fft.doctree new file mode 100644 index 000000000..2bede7452 Binary files /dev/null and b/docs/build/doctrees/python/fft.doctree differ diff --git a/docs/build/doctrees/python/linalg.doctree b/docs/build/doctrees/python/linalg.doctree new file mode 100644 index 000000000..87a09a6a9 Binary files /dev/null and b/docs/build/doctrees/python/linalg.doctree differ diff --git a/docs/build/doctrees/python/nn.doctree b/docs/build/doctrees/python/nn.doctree new file mode 100644 index 000000000..93ceef54f Binary files /dev/null and b/docs/build/doctrees/python/nn.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ALiBi.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ALiBi.doctree new file mode 100644 index 000000000..ce1b0d928 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ALiBi.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.BatchNorm.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.BatchNorm.doctree new file mode 100644 index 000000000..556c5024f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.BatchNorm.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv1d.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv1d.doctree new file mode 100644 index 000000000..2f1d10293 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv1d.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv2d.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv2d.doctree new file mode 100644 index 000000000..779bcd026 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Conv2d.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout.doctree new file mode 100644 index 000000000..bc3c9ccc3 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout2d.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout2d.doctree new file mode 100644 index 000000000..9f172fb41 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout2d.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout3d.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout3d.doctree new file mode 100644 index 000000000..60a8d9a2f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Dropout3d.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Embedding.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Embedding.doctree new file mode 100644 index 000000000..684a41cde Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Embedding.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GELU.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GELU.doctree new file mode 100644 index 000000000..2304bd122 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GELU.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GroupNorm.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GroupNorm.doctree new file mode 100644 index 000000000..9e7d9afd2 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.GroupNorm.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.InstanceNorm.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.InstanceNorm.doctree new file mode 100644 index 000000000..a6f01f388 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.InstanceNorm.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.LayerNorm.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.LayerNorm.doctree new file mode 100644 index 000000000..bdf459c54 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.LayerNorm.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Linear.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Linear.doctree new file mode 100644 index 000000000..b5945397d Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Linear.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Mish.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Mish.doctree new file mode 100644 index 000000000..96b277ed6 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Mish.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply.doctree new file mode 100644 index 000000000..3ad46d0ee Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.doctree new file mode 100644 index 000000000..f1f8d3914 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.apply_to_modules.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.children.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.children.doctree new file mode 100644 index 000000000..fda65019e Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.children.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.eval.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.eval.doctree new file mode 100644 index 000000000..b70062947 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.eval.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.filter_and_map.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.filter_and_map.doctree new file mode 100644 index 000000000..875b776f8 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.filter_and_map.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.freeze.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.freeze.doctree new file mode 100644 index 000000000..9122645c8 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.freeze.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.leaf_modules.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.leaf_modules.doctree new file mode 100644 index 000000000..ef4a4b492 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.leaf_modules.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.load_weights.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.load_weights.doctree new file mode 100644 index 000000000..77dc55cba Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.load_weights.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.modules.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.modules.doctree new file mode 100644 index 000000000..a8ed51722 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.modules.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.named_modules.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.named_modules.doctree new file mode 100644 index 000000000..21d03145b Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.named_modules.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.parameters.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.parameters.doctree new file mode 100644 index 000000000..bd4496131 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.parameters.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.save_weights.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.save_weights.doctree new file mode 100644 index 000000000..d8a9709a4 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.save_weights.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.train.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.train.doctree new file mode 100644 index 000000000..c74bddc02 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.train.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.doctree new file mode 100644 index 000000000..9d931a5cf Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.trainable_parameters.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.training.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.training.doctree new file mode 100644 index 000000000..76044dd0f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.training.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.unfreeze.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.unfreeze.doctree new file mode 100644 index 000000000..94b45be80 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.unfreeze.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update.doctree new file mode 100644 index 000000000..322f33b28 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update_modules.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update_modules.doctree new file mode 100644 index 000000000..6c21b5186 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Module.update_modules.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.MultiHeadAttention.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.MultiHeadAttention.doctree new file mode 100644 index 000000000..bbe97731b Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.MultiHeadAttention.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.PReLU.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.PReLU.doctree new file mode 100644 index 000000000..cf408b269 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.PReLU.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.QuantizedLinear.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.QuantizedLinear.doctree new file mode 100644 index 000000000..c29951241 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.QuantizedLinear.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RMSNorm.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RMSNorm.doctree new file mode 100644 index 000000000..0ab225c96 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RMSNorm.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ReLU.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ReLU.doctree new file mode 100644 index 000000000..2903dff65 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.ReLU.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RoPE.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RoPE.doctree new file mode 100644 index 000000000..2772875e1 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.RoPE.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SELU.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SELU.doctree new file mode 100644 index 000000000..8a9a42862 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SELU.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Sequential.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Sequential.doctree new file mode 100644 index 000000000..bd76c52d8 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Sequential.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SiLU.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SiLU.doctree new file mode 100644 index 000000000..aa5817bab Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SiLU.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.doctree new file mode 100644 index 000000000..7840bf5a2 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Step.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Step.doctree new file mode 100644 index 000000000..87fff6072 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Step.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Transformer.doctree b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Transformer.doctree new file mode 100644 index 000000000..87cde6d83 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary/mlx.nn.Transformer.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu.doctree new file mode 100644 index 000000000..92c3f6ee5 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_approx.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_approx.doctree new file mode 100644 index 000000000..2bd6c8705 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_approx.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.doctree new file mode 100644 index 000000000..c714500d8 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.doctree new file mode 100644 index 000000000..108e75c4f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss.doctree new file mode 100644 index 000000000..f8126e969 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.doctree new file mode 100644 index 000000000..9cdd9958b Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.doctree new file mode 100644 index 000000000..9014d6530 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.doctree new file mode 100644 index 000000000..c040f2d7f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.doctree new file mode 100644 index 000000000..dfbd521e7 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.doctree new file mode 100644 index 000000000..84495517a Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.doctree new file mode 100644 index 000000000..718c7c5e4 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.doctree new file mode 100644 index 000000000..a34c3b155 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.doctree new file mode 100644 index 000000000..0d95d52a9 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.doctree new file mode 100644 index 000000000..b1965fa8f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.doctree new file mode 100644 index 000000000..726832989 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.mish.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.mish.doctree new file mode 100644 index 000000000..2e3c4d245 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.mish.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.prelu.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.prelu.doctree new file mode 100644 index 000000000..0c97a551e Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.prelu.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.relu.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.relu.doctree new file mode 100644 index 000000000..398e9179f Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.relu.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.selu.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.selu.doctree new file mode 100644 index 000000000..3e4da6c66 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.selu.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.silu.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.silu.doctree new file mode 100644 index 000000000..62bde63c8 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.silu.doctree differ diff --git a/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.step.doctree b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.step.doctree new file mode 100644 index 000000000..46c14e3e5 Binary files /dev/null and b/docs/build/doctrees/python/nn/_autosummary_functions/mlx.nn.step.doctree differ diff --git a/docs/build/doctrees/python/nn/functions.doctree b/docs/build/doctrees/python/nn/functions.doctree new file mode 100644 index 000000000..5d54c1c5d Binary files /dev/null and b/docs/build/doctrees/python/nn/functions.doctree differ diff --git a/docs/build/doctrees/python/nn/layers.doctree b/docs/build/doctrees/python/nn/layers.doctree new file mode 100644 index 000000000..6eaf2aa68 Binary files /dev/null and b/docs/build/doctrees/python/nn/layers.doctree differ diff --git a/docs/build/doctrees/python/nn/losses.doctree b/docs/build/doctrees/python/nn/losses.doctree new file mode 100644 index 000000000..52f541c36 Binary files /dev/null and b/docs/build/doctrees/python/nn/losses.doctree differ diff --git a/docs/build/doctrees/python/nn/module.doctree b/docs/build/doctrees/python/nn/module.doctree new file mode 100644 index 000000000..a7c439af2 Binary files /dev/null and b/docs/build/doctrees/python/nn/module.doctree differ diff --git a/docs/build/doctrees/python/ops.doctree b/docs/build/doctrees/python/ops.doctree new file mode 100644 index 000000000..967eee39b Binary files /dev/null and b/docs/build/doctrees/python/ops.doctree differ diff --git a/docs/build/doctrees/python/optimizers.doctree b/docs/build/doctrees/python/optimizers.doctree new file mode 100644 index 000000000..81dd2455d Binary files /dev/null and b/docs/build/doctrees/python/optimizers.doctree differ diff --git a/docs/build/doctrees/python/random.doctree b/docs/build/doctrees/python/random.doctree new file mode 100644 index 000000000..8cf3f5aa8 Binary files /dev/null and b/docs/build/doctrees/python/random.doctree differ diff --git a/docs/build/doctrees/python/transforms.doctree b/docs/build/doctrees/python/transforms.doctree new file mode 100644 index 000000000..03a963292 Binary files /dev/null and b/docs/build/doctrees/python/transforms.doctree differ diff --git a/docs/build/doctrees/python/tree_utils.doctree b/docs/build/doctrees/python/tree_utils.doctree new file mode 100644 index 000000000..0dce28183 Binary files /dev/null and b/docs/build/doctrees/python/tree_utils.doctree differ diff --git a/docs/build/doctrees/usage/function_transforms.doctree b/docs/build/doctrees/usage/function_transforms.doctree new file mode 100644 index 000000000..43a605bb4 Binary files /dev/null and b/docs/build/doctrees/usage/function_transforms.doctree differ diff --git a/docs/build/doctrees/usage/indexing.doctree b/docs/build/doctrees/usage/indexing.doctree new file mode 100644 index 000000000..1057dbc09 Binary files /dev/null and b/docs/build/doctrees/usage/indexing.doctree differ diff --git a/docs/build/doctrees/usage/lazy_evaluation.doctree b/docs/build/doctrees/usage/lazy_evaluation.doctree new file mode 100644 index 000000000..246d9817d Binary files /dev/null and b/docs/build/doctrees/usage/lazy_evaluation.doctree differ diff --git a/docs/build/doctrees/usage/numpy.doctree b/docs/build/doctrees/usage/numpy.doctree new file mode 100644 index 000000000..0270c9da0 Binary files /dev/null and b/docs/build/doctrees/usage/numpy.doctree differ diff --git a/docs/build/doctrees/usage/quick_start.doctree b/docs/build/doctrees/usage/quick_start.doctree new file mode 100644 index 000000000..9788c75bf Binary files /dev/null and b/docs/build/doctrees/usage/quick_start.doctree differ diff --git a/docs/build/doctrees/usage/saving_and_loading.doctree b/docs/build/doctrees/usage/saving_and_loading.doctree new file mode 100644 index 000000000..ce6f41b86 Binary files /dev/null and b/docs/build/doctrees/usage/saving_and_loading.doctree differ diff --git a/docs/build/doctrees/usage/unified_memory.doctree b/docs/build/doctrees/usage/unified_memory.doctree new file mode 100644 index 000000000..f4e516386 Binary files /dev/null and b/docs/build/doctrees/usage/unified_memory.doctree differ diff --git a/docs/build/doctrees/usage/using_streams.doctree b/docs/build/doctrees/usage/using_streams.doctree new file mode 100644 index 000000000..af6d4f6b9 Binary files /dev/null and b/docs/build/doctrees/usage/using_streams.doctree differ diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index f0399f624..b37778299 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 38bd5d82efdab9011af8239531f26d1f +config: 7e59579523e86960f9656ed95d122b83 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_sources/index.rst b/docs/build/html/_sources/index.rst index cd3db34b3..4f4411758 100644 --- a/docs/build/html/_sources/index.rst +++ b/docs/build/html/_sources/index.rst @@ -40,6 +40,7 @@ are the CPU and GPU. usage/unified_memory usage/indexing usage/saving_and_loading + usage/function_transforms usage/numpy usage/using_streams diff --git a/docs/build/html/_sources/install.rst b/docs/build/html/_sources/install.rst index 1883329fb..6c0535079 100644 --- a/docs/build/html/_sources/install.rst +++ b/docs/build/html/_sources/install.rst @@ -1,8 +1,8 @@ Build and Install ================= -Install from PyPI ------------------ +Python Installation +------------------- MLX is available on PyPI. All you have to do to use MLX with your own Apple silicon computer is @@ -21,6 +21,14 @@ To install from PyPI you must meet the following requirements: MLX is only available on devices running macOS >= 13.3 It is highly recommended to use macOS 14 (Sonoma) + +MLX is also available on conda-forge. To install MLX with conda do: + +.. code-block:: shell + + conda install conda-forge::mlx + + Troubleshooting ^^^^^^^^^^^^^^^ @@ -213,3 +221,14 @@ Verify the terminal is now running natively the following command: $ uname -p arm + +Also check that cmake is using the correct architecture: + +.. code-block:: shell + + $ cmake --system-information | grep CMAKE_HOST_SYSTEM_PROCESSOR + CMAKE_HOST_SYSTEM_PROCESSOR "arm64" + +If you see ``"x86_64"``, try re-installing ``cmake``. If you see ``"arm64"`` +but the build errors out with "Building for x86_64 on macOS is not supported." +wipe your build cahce with ``rm -rf build/`` and try again. diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.isinf.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.isinf.rst new file mode 100644 index 000000000..118618962 --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.isinf.rst @@ -0,0 +1,6 @@ +mlx.core.isinf +============== + +.. currentmodule:: mlx.core + +.. autofunction:: isinf \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.isnan.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.isnan.rst new file mode 100644 index 000000000..1da12b54b --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.isnan.rst @@ -0,0 +1,6 @@ +mlx.core.isnan +============== + +.. currentmodule:: mlx.core + +.. autofunction:: isnan \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.isneginf.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.isneginf.rst new file mode 100644 index 000000000..b8e99773c --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.isneginf.rst @@ -0,0 +1,6 @@ +mlx.core.isneginf +================= + +.. currentmodule:: mlx.core + +.. autofunction:: isneginf \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.isposinf.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.isposinf.rst new file mode 100644 index 000000000..2f37e085f --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.isposinf.rst @@ -0,0 +1,6 @@ +mlx.core.isposinf +================= + +.. currentmodule:: mlx.core + +.. autofunction:: isposinf \ No newline at end of file diff --git a/docs/build/html/_sources/python/nn/functions.rst b/docs/build/html/_sources/python/nn/functions.rst index f13cbe7b4..fd4302ef1 100644 --- a/docs/build/html/_sources/python/nn/functions.rst +++ b/docs/build/html/_sources/python/nn/functions.rst @@ -15,9 +15,9 @@ simple functions. gelu gelu_approx gelu_fast_approx - relu + mish prelu + relu + selu silu step - selu - mish diff --git a/docs/build/html/_sources/python/nn/layers.rst b/docs/build/html/_sources/python/nn/layers.rst index 4b2107446..fc8848c54 100644 --- a/docs/build/html/_sources/python/nn/layers.rst +++ b/docs/build/html/_sources/python/nn/layers.rst @@ -9,29 +9,29 @@ Layers :toctree: _autosummary :template: nn-module-template.rst - Sequential - ReLU - PReLU - GELU - SiLU - Step - SELU - Mish - Embedding - Linear - QuantizedLinear + ALiBi + BatchNorm Conv1d Conv2d - BatchNorm - LayerNorm - RMSNorm - GroupNorm - InstanceNorm Dropout Dropout2d Dropout3d - Transformer + Embedding + GELU + GroupNorm + InstanceNorm + LayerNorm + Linear + Mish MultiHeadAttention - ALiBi + PReLU + QuantizedLinear + RMSNorm + ReLU RoPE + SELU + Sequential + SiLU SinusoidalPositionalEncoding + Step + Transformer diff --git a/docs/build/html/_sources/python/nn/losses.rst b/docs/build/html/_sources/python/nn/losses.rst index 5a80ba947..31f40fb1f 100644 --- a/docs/build/html/_sources/python/nn/losses.rst +++ b/docs/build/html/_sources/python/nn/losses.rst @@ -10,14 +10,14 @@ Loss Functions :template: nn-module-template.rst binary_cross_entropy + cosine_similarity_loss cross_entropy + hinge_loss + huber_loss kl_div_loss l1_loss + log_cosh_loss mse_loss nll_loss smooth_l1_loss - triplet_loss - hinge_loss - huber_loss - log_cosh_loss - cosine_similarity_loss \ No newline at end of file + triplet_loss \ No newline at end of file diff --git a/docs/build/html/_sources/python/ops.rst b/docs/build/html/_sources/python/ops.rst index 3dcd3660d..649724a34 100644 --- a/docs/build/html/_sources/python/ops.rst +++ b/docs/build/html/_sources/python/ops.rst @@ -51,6 +51,10 @@ Operations greater_equal identity inner + isnan + isposinf + isneginf + isinf less less_equal linspace diff --git a/docs/build/html/_sources/python/random.rst b/docs/build/html/_sources/python/random.rst index 8ac3eaa11..706378f9d 100644 --- a/docs/build/html/_sources/python/random.rst +++ b/docs/build/html/_sources/python/random.rst @@ -33,13 +33,13 @@ we use a splittable version of Threefry, which is a counter-based PRNG. .. autosummary:: :toctree: _autosummary - seed - key - split bernoulli categorical gumbel + key normal randint - uniform + seed + split truncated_normal + uniform diff --git a/docs/build/html/_sources/usage/function_transforms.rst b/docs/build/html/_sources/usage/function_transforms.rst new file mode 100644 index 000000000..72a313f97 --- /dev/null +++ b/docs/build/html/_sources/usage/function_transforms.rst @@ -0,0 +1,188 @@ +.. _function_transforms: + +Function Transforms +=================== + +.. currentmodule:: mlx.core + +MLX uses composable function transformations for automatic differentiation and +vectorization. The key idea behind composable function transformations is that +every transformation returns a function which can be further transformed. + +Here is a simple example: + +.. code-block:: shell + + >>> dfdx = mx.grad(mx.sin) + >>> dfdx(mx.array(mx.pi)) + array(-1, dtype=float32) + >>> mx.cos(mx.array(mx.pi)) + array(-1, dtype=float32) + + +The output of :func:`grad` on :func:`sin` is simply another function. In this +case it is the gradient of the sine function which is exactly the cosine +function. To get the second derivative you can do: + +.. code-block:: shell + + >>> d2fdx2 = mx.grad(mx.grad(mx.sin)) + >>> d2fdx2(mx.array(mx.pi / 2)) + array(-1, dtype=float32) + >>> mx.sin(mx.array(mx.pi / 2)) + array(1, dtype=float32) + +Using :func:`grad` on the output of :func:`grad` is always ok. You keep +getting higher order derivatives. + +Any of the MLX function transformations can be composed in any order to any +depth. To see the complete list of function transformations check-out the +:ref:`API documentation `. See the following sections for more +information on :ref:`automatic differentiaion ` and +:ref:`automatic vectorization `. + +Automatic Differentiation +------------------------- + +.. _auto diff: + +Automatic differentiation in MLX works on functions rather than on implicit +graphs. + +.. note:: + + If you are coming to MLX from PyTorch, you no longer need functions like + ``backward``, ``zero_grad``, and ``detach``, or properties like + ``requires_grad``. + +The most basic example is taking the gradient of a scalar-valued function as we +saw above. You can use the :func:`grad` and :func:`value_and_grad` function to +compute gradients of more complex functions. By default these functions compute +the gradient with respect to the first argument: + +.. code-block:: python + + def loss_fn(w, x, y): + return mx.mean(mx.square(w * x - y)) + + w = mx.array(1.0) + x = mx.array([0.5, -0.5]) + y = mx.array([1.5, -1.5]) + + # Computes the gradient of loss_fn with respect to w: + grad_fn = mx.grad(loss_fn) + dloss_dw = grad_fn(w, x, y) + # Prints array(-1, dtype=float32) + print(dloss_dw) + + # To get the gradient with respect to x we can do: + grad_fn = mx.grad(loss_fn, argnums=1) + dloss_dx = grad_fn(w, x, y) + # Prints array([-1, 1], dtype=float32) + print(dloss_dx) + + +One way to get the loss and gradient is to call ``loss_fn`` followed by +``grad_fn``, but this can result in a lot of redundant work. Instead, you +should use :func:`value_and_grad`. Continuing the above example: + + +.. code-block:: python + + # Computes the gradient of loss_fn with respect to w: + loss_and_grad_fn = mx.value_and_grad(loss_fn) + loss, dloss_dw = loss_and_grad_fn(w, x, y) + + # Prints array(1, dtype=float32) + print(loss) + + # Prints array(-1, dtype=float32) + print(dloss_dw) + + +You can also take the gradient with respect to arbitrarily nested Python +containers of arrays (specifically any of :obj:`list`, :obj:`tuple`, or +:obj:`dict`). + +Suppose we wanted a weight and a bias parameter in the above example. A nice +way to do that is the following: + +.. code-block:: python + + def loss_fn(params, x, y): + w, b = params["weight"], params["bias"] + h = w * x + b + return mx.mean(mx.square(h - y)) + + params = {"weight": mx.array(1.0), "bias": mx.array(0.0)} + x = mx.array([0.5, -0.5]) + y = mx.array([1.5, -1.5]) + + # Computes the gradient of loss_fn with respect to both the + # weight and bias: + grad_fn = mx.grad(loss_fn) + grads = grad_fn(params, x, y) + + # Prints + # {'weight': array(-1, dtype=float32), 'bias': array(0, dtype=float32)} + print(grads) + +Notice the tree structure of the parameters is preserved in the gradients. + +In some cases you may want to stop gradients from propagating through a +part of the function. You can use the :func:`stop_gradient` for that. + + +Automatic Vectorization +----------------------- + +.. _vmap: + +Use :func:`vmap` to automate vectorizing complex functions. Here we'll go +through a basic and contrived example for the sake of clarity, but :func:`vmap` +can be quite powerful for more complex functions which are difficult to optimize +by hand. + +.. warning:: + + Some operations are not yet supported with :func:`vmap`. If you encounter an error + like: ``ValueError: Primitive's vmap not implemented.`` file an `issue + `_ and include your function. + We will prioritize including it. + +A naive way to add the elements from two sets of vectors is with a loop: + +.. code-block:: python + + xs = mx.random.uniform(shape=(4096, 100)) + ys = mx.random.uniform(shape=(100, 4096)) + + def naive_add(xs, ys): + return [xs[i] + ys[:, i] for i in range(xs.shape[1])] + +Instead you can use :func:`vmap` to automatically vectorize the addition: + +.. code-block:: python + + # Vectorize over the second dimension of x and the + # first dimension of y + vmap_add = mx.vmap(lambda x, y: x + y, in_axes=(1, 0)) + +The ``in_axes`` parameter can be used to specify which dimensions of the +corresponding input to vectorize over. Similarly, use ``out_axes`` to specify +where the vectorized axes should be in the outputs. + +Let's time these two different versions: + +.. code-block:: python + + import timeit + + print(timeit.timeit(lambda: mx.eval(naive_add(xs, ys)), number=100)) + print(timeit.timeit(lambda: mx.eval(vmap_add(xs, ys)), number=100)) + +On an M1 Max the naive version takes in total ``0.390`` seconds whereas the +vectorized version takes only ``0.025`` seconds, more than ten times faster. + +Of course, this operation is quite contrived. A better approach is to simply do +``xs + ys.T``, but for more complex functions :func:`vmap` can be quite handy. diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 61add5d14..1164b23c8 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.0.7', + VERSION: '0.0.9', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/cpp/ops.html b/docs/build/html/cpp/ops.html index e7d6a6bc9..9d310076b 100644 --- a/docs/build/html/cpp/ops.html +++ b/docs/build/html/cpp/ops.html @@ -9,7 +9,7 @@ - Operations — MLX 0.0.7 documentation + Operations — MLX 0.0.9 documentation @@ -134,8 +134,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -152,6 +152,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -256,6 +257,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -327,16 +332,16 @@
  • Random
  • Transforms
      @@ -392,59 +397,59 @@
  • Layers
  • Functions
  • Loss Functions
  • diff --git a/docs/build/html/dev/extensions.html b/docs/build/html/dev/extensions.html index 95b0bb07f..8ddf01f47 100644 --- a/docs/build/html/dev/extensions.html +++ b/docs/build/html/dev/extensions.html @@ -9,7 +9,7 @@ - Developer Documentation — MLX 0.0.7 documentation + Developer Documentation — MLX 0.0.9 documentation @@ -133,8 +133,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -151,6 +151,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -255,6 +256,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -326,16 +331,16 @@
  • Random
  • Transforms
      @@ -391,59 +396,59 @@
  • Layers
  • Functions
  • Loss Functions
  • diff --git a/docs/build/html/examples/linear_regression.html b/docs/build/html/examples/linear_regression.html index 80d34e46e..8b6f3d477 100644 --- a/docs/build/html/examples/linear_regression.html +++ b/docs/build/html/examples/linear_regression.html @@ -9,7 +9,7 @@ - Linear Regression — MLX 0.0.7 documentation + Linear Regression — MLX 0.0.9 documentation @@ -134,8 +134,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -152,6 +152,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -256,6 +257,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -327,16 +332,16 @@
  • Random
  • Transforms
      @@ -392,59 +397,59 @@
  • Layers
  • Functions
  • Loss Functions
  • diff --git a/docs/build/html/examples/llama-inference.html b/docs/build/html/examples/llama-inference.html index 802841735..32af2d647 100644 --- a/docs/build/html/examples/llama-inference.html +++ b/docs/build/html/examples/llama-inference.html @@ -9,7 +9,7 @@ - LLM inference — MLX 0.0.7 documentation + LLM inference — MLX 0.0.9 documentation @@ -134,8 +134,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -152,6 +152,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -256,6 +257,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -327,16 +332,16 @@
  • Random
  • Transforms
      @@ -392,59 +397,59 @@
  • Layers
  • Functions
  • Loss Functions
  • diff --git a/docs/build/html/examples/mlp.html b/docs/build/html/examples/mlp.html index 63c732d7e..0639d2da9 100644 --- a/docs/build/html/examples/mlp.html +++ b/docs/build/html/examples/mlp.html @@ -9,7 +9,7 @@ - Multi-Layer Perceptron — MLX 0.0.7 documentation + Multi-Layer Perceptron — MLX 0.0.9 documentation @@ -134,8 +134,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -152,6 +152,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -256,6 +257,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -327,16 +332,16 @@
  • Random
  • Transforms
      @@ -392,59 +397,59 @@
  • Layers
  • Functions
  • Loss Functions
  • diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 469251e20..87ccc4351 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -8,7 +8,7 @@ - Index — MLX 0.0.7 documentation + Index — MLX 0.0.9 documentation @@ -131,8 +131,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -149,6 +149,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -253,6 +254,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -324,16 +329,16 @@
  • Random
  • Transforms
      @@ -389,59 +394,59 @@
  • Layers
  • Functions
  • Loss Functions
  • @@ -920,15 +925,23 @@ document.write(`
  • inner() (in module mlx.core)
  • - - + @@ -255,6 +256,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -326,16 +331,16 @@
  • Random
  • Transforms
      @@ -391,59 +396,59 @@
  • Layers
  • Functions
  • Loss Functions
  • @@ -678,6 +683,7 @@ are the CPU and GPU.

  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • diff --git a/docs/build/html/install.html b/docs/build/html/install.html index b43ffd621..6cf9d8e75 100644 --- a/docs/build/html/install.html +++ b/docs/build/html/install.html @@ -9,7 +9,7 @@ - Build and Install — MLX 0.0.7 documentation + Build and Install — MLX 0.0.9 documentation @@ -134,8 +134,8 @@ - MLX 0.0.7 documentation - Home - + MLX 0.0.9 documentation - Home + @@ -152,6 +152,7 @@
  • Unified Memory
  • Indexing Arrays
  • Saving and Loading Arrays
  • +
  • Function Transforms
  • Conversion to NumPy and Other Frameworks
  • Using Streams
  • @@ -256,6 +257,10 @@
  • mlx.core.greater_equal
  • mlx.core.identity
  • mlx.core.inner
  • +
  • mlx.core.isnan
  • +
  • mlx.core.isposinf
  • +
  • mlx.core.isneginf
  • +
  • mlx.core.isinf
  • mlx.core.less
  • mlx.core.less_equal
  • mlx.core.linspace
  • @@ -327,16 +332,16 @@
  • Random
  • Transforms
      @@ -392,59 +397,59 @@
  • Layers
  • Functions
  • Loss Functions
  • @@ -639,7 +644,7 @@ document.write(`