docs update

This commit is contained in:
Awni Hannun
2024-02-08 12:44:23 -08:00
committed by CircleCI Docs
parent 06b6d9a4d4
commit e492638dff
437 changed files with 11568 additions and 13689 deletions

View File

@@ -0,0 +1,6 @@
mlx.core.compile
================
.. currentmodule:: mlx.core
.. autofunction:: compile

View File

@@ -0,0 +1,6 @@
mlx.core.disable\_compile
=========================
.. currentmodule:: mlx.core
.. autofunction:: disable_compile

View File

@@ -0,0 +1,6 @@
mlx.core.enable\_compile
========================
.. currentmodule:: mlx.core
.. autofunction:: enable_compile

View File

@@ -1,6 +0,0 @@
mlx.core.simplify
=================
.. currentmodule:: mlx.core
.. autofunction:: simplify

View File

@@ -14,5 +14,6 @@
~AdaDelta.__init__
~AdaDelta.apply_single
~AdaDelta.init_single

View File

@@ -14,5 +14,6 @@
~Adafactor.__init__
~Adafactor.apply_single
~Adafactor.init_single

View File

@@ -14,5 +14,6 @@
~Adagrad.__init__
~Adagrad.apply_single
~Adagrad.init_single

View File

@@ -14,5 +14,6 @@
~Adam.__init__
~Adam.apply_single
~Adam.init_single

View File

@@ -14,5 +14,6 @@
~Adamax.__init__
~Adamax.apply_single
~Adamax.init_single

View File

@@ -14,5 +14,6 @@
~Lion.__init__
~Lion.apply_single
~Lion.init_single

View File

@@ -0,0 +1,6 @@
mlx.optimizers.Optimizer.apply\_gradients
=========================================
.. currentmodule:: mlx.optimizers
.. automethod:: Optimizer.apply_gradients

View File

@@ -0,0 +1,6 @@
mlx.optimizers.Optimizer.init
=============================
.. currentmodule:: mlx.optimizers
.. automethod:: Optimizer.init

View File

@@ -1,20 +0,0 @@
mlx.optimizers.Optimizer
========================
.. currentmodule:: mlx.optimizers
.. autoclass:: Optimizer
.. rubric:: Methods
.. autosummary::
~Optimizer.__init__
~Optimizer.apply_gradients
~Optimizer.apply_single
~Optimizer.update

View File

@@ -0,0 +1,6 @@
mlx.optimizers.Optimizer.state
==============================
.. currentmodule:: mlx.optimizers
.. autoproperty:: Optimizer.state

View File

@@ -0,0 +1,6 @@
mlx.optimizers.Optimizer.update
===============================
.. currentmodule:: mlx.optimizers
.. automethod:: Optimizer.update

View File

@@ -1,17 +0,0 @@
mlx.optimizers.OptimizerState
=============================
.. currentmodule:: mlx.optimizers
.. autoclass:: OptimizerState
.. rubric:: Methods
.. autosummary::
~OptimizerState.get

View File

@@ -14,5 +14,6 @@
~RMSprop.__init__
~RMSprop.apply_single
~RMSprop.init_single

View File

@@ -14,5 +14,6 @@
~SGD.__init__
~SGD.apply_single
~SGD.init_single

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: ALiBi
.. autoclass:: ALiBi

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: BatchNorm
.. autoclass:: BatchNorm

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Conv1d
.. autoclass:: Conv1d

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Conv2d
.. autoclass:: Conv2d

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Dropout
.. autoclass:: Dropout

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Dropout2d
.. autoclass:: Dropout2d

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Dropout3d
.. autoclass:: Dropout3d

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Embedding
.. autoclass:: Embedding

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: GELU
.. autoclass:: GELU

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: GroupNorm
.. autoclass:: GroupNorm

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: InstanceNorm
.. autoclass:: InstanceNorm

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: LayerNorm
.. autoclass:: LayerNorm

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Linear
.. autoclass:: Linear

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Mish
.. autoclass:: Mish

View File

@@ -0,0 +1,6 @@
mlx.nn.Module.state
===================
.. currentmodule:: mlx.nn
.. autoproperty:: Module.state

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: MultiHeadAttention
.. autoclass:: MultiHeadAttention

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: PReLU
.. autoclass:: PReLU

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: QuantizedLinear
.. autoclass:: QuantizedLinear

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: RMSNorm
.. autoclass:: RMSNorm

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: ReLU
.. autoclass:: ReLU

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: RoPE
.. autoclass:: RoPE

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: SELU
.. autoclass:: SELU

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Sequential
.. autoclass:: Sequential

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: SiLU
.. autoclass:: SiLU

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: SinusoidalPositionalEncoding
.. autoclass:: SinusoidalPositionalEncoding

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Softshrink
.. autoclass:: Softshrink

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Step
.. autoclass:: Step

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: Transformer
.. autoclass:: Transformer

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: gelu
.. autofunction:: gelu

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: gelu_approx
.. autofunction:: gelu_approx

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: gelu_fast_approx
.. autofunction:: gelu_fast_approx

View File

@@ -1,6 +0,0 @@
mlx.nn.init.constant
====================
.. currentmodule:: mlx.nn.init
.. autofunction:: constant

View File

@@ -1,6 +0,0 @@
mlx.nn.init.glorot\_normal
==========================
.. currentmodule:: mlx.nn.init
.. autofunction:: glorot_normal

View File

@@ -1,6 +0,0 @@
mlx.nn.init.glorot\_uniform
===========================
.. currentmodule:: mlx.nn.init
.. autofunction:: glorot_uniform

View File

@@ -1,6 +0,0 @@
mlx.nn.init.he\_normal
======================
.. currentmodule:: mlx.nn.init
.. autofunction:: he_normal

View File

@@ -1,6 +0,0 @@
mlx.nn.init.he\_uniform
=======================
.. currentmodule:: mlx.nn.init
.. autofunction:: he_uniform

View File

@@ -1,6 +0,0 @@
mlx.nn.init.identity
====================
.. currentmodule:: mlx.nn.init
.. autofunction:: identity

View File

@@ -1,6 +0,0 @@
mlx.nn.init.normal
==================
.. currentmodule:: mlx.nn.init
.. autofunction:: normal

View File

@@ -1,6 +0,0 @@
mlx.nn.init.uniform
===================
.. currentmodule:: mlx.nn.init
.. autofunction:: uniform

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.constant
============================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: constant

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.glorot\_normal
==================================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: glorot_normal

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.glorot\_uniform
===================================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: glorot_uniform

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.he\_normal
==============================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: he_normal

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.he\_uniform
===============================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: he_uniform

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.identity
============================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: identity

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.normal
==========================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: normal

View File

@@ -1,6 +0,0 @@
mlx.nn.initializers.uniform
===========================
.. currentmodule:: mlx.nn.initializers
.. autofunction:: uniform

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: binary_cross_entropy
.. autofunction:: binary_cross_entropy

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: cosine_similarity_loss
.. autofunction:: cosine_similarity_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: cross_entropy
.. autofunction:: cross_entropy

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: gaussian_nll_loss
.. autofunction:: gaussian_nll_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: hinge_loss
.. autofunction:: hinge_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: huber_loss
.. autofunction:: huber_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: kl_div_loss
.. autofunction:: kl_div_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: l1_loss
.. autofunction:: l1_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: log_cosh_loss
.. autofunction:: log_cosh_loss

View File

@@ -0,0 +1,6 @@
mlx.nn.losses.margin\_ranking\_loss
===================================
.. currentmodule:: mlx.nn.losses
.. autofunction:: margin_ranking_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: mse_loss
.. autofunction:: mse_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: nll_loss
.. autofunction:: nll_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: smooth_l1_loss
.. autofunction:: smooth_l1_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn.losses
.. autoclass:: triplet_loss
.. autofunction:: triplet_loss

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: mish
.. autofunction:: mish

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: prelu
.. autofunction:: prelu

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: relu
.. autofunction:: relu

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: selu
.. autofunction:: selu

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: silu
.. autofunction:: silu

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: softshrink
.. autofunction:: softshrink

View File

@@ -3,6 +3,4 @@
.. currentmodule:: mlx.nn
.. autoclass:: step
.. autofunction:: step

View File

@@ -1,18 +0,0 @@
.. _initializers:
.. currentmodule:: mlx.nn.initializers
Initializers
--------------
.. autosummary::
:toctree: _autosummary_functions
constant
normal
uniform
identity
glorot_normal
glorot_uniform
he_normal
he_uniform

View File

@@ -18,6 +18,7 @@ Loss Functions
kl_div_loss
l1_loss
log_cosh_loss
margin_ranking_loss
mse_loss
nll_loss
smooth_l1_loss

View File

@@ -11,6 +11,7 @@ Module
:toctree: _autosummary
Module.training
Module.state
.. rubric:: Methods

View File

@@ -0,0 +1,23 @@
Optimizer
=========
.. currentmodule:: mlx.optimizers
.. autoclass:: Optimizer
.. rubric:: Attributes
.. autosummary::
:toctree: _autosummary
Optimizer.state
.. rubric:: Methods
.. autosummary::
:toctree: _autosummary
Optimizer.apply_gradients
Optimizer.init
Optimizer.update

View File

@@ -29,14 +29,16 @@ model's parameters and the **optimizer state**.
# Compute the new parameters but also the optimizer state.
mx.eval(model.parameters(), optimizer.state)
.. toctree::
optimizer
.. currentmodule:: mlx.optimizers
.. autosummary::
:toctree: _autosummary
:template: optimizers-template.rst
OptimizerState
Optimizer
SGD
RMSprop
Adagrad

View File

@@ -9,6 +9,9 @@ Transforms
:toctree: _autosummary
eval
compile
disable_compile
enable_compile
grad
value_and_grad
jvp