Skip to content

Commit 8d93b91

Browse files
stefpiAwni Hannun
authored andcommitted
docs: add nn/distributed to index routines and helpers
1 parent 074cb2c commit 8d93b91

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

docs/src/python/nn.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,4 @@ In detail:
183183
nn/functions
184184
nn/losses
185185
nn/init
186+
nn/distributed

docs/src/python/nn/distributed.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _distributed:
2+
3+
Distributed
4+
-----------
5+
6+
Helper Routines
7+
^^^^^^^^^^^^^^^
8+
9+
The :code:`mlx.nn.layers.distributed` package contains helpful routines for creating sharded layers easily from existing :class:`Modules <mlx.nn.Module>`.
10+
11+
.. currentmodule:: mlx.nn.layers.distributed
12+
.. autosummary::
13+
:toctree: _autosummary
14+
15+
shard_linear
16+
shard_inplace
17+
18+
Layers
19+
^^^^^^
20+
21+
The :code:`mlx.nn` package contains helpful layers for creating distributed models with sharded parameters.
22+
23+
.. currentmodule:: mlx.nn
24+
.. autosummary::
25+
:toctree: _autosummary
26+
:template: nn-module-template.rst
27+
28+
AllToShardedLinear
29+
ShardedToAllLinear
30+
QuantizedAllToShardedLinear
31+
QuantizedShardedToAllLinear

0 commit comments

Comments
 (0)