publish pytorchmlx

This commit is contained in:
pj committed 2026-09-19 23:47:23 +05:30
1 parent cf90000071
commit fefdea2304
5 files changed
+35 -33

No files matched your search

+4 -5
View File
@@ -1,15 +1,14 @@
# torchmlx
torchmlx is a pytorch-shaped compatibility layer that uses mlx on apple silicon and pytorch elsewhere.
torchmlx is a pytorch-shaped compatibility layer that uses mlx on apple silicon and pytorch elsewhere. it is experimental and built first for educational use.
NOTE: it is experimental and built first for educational use. If you find a bug, please create an issue on the repo.
```bash
pip install pytorchmlx
```
```python
import torchmlx as torch
from torchmlx import nn, optim
model = nn.Linear(4, 2)
optimizer = optim.AdamW(model.parameters(), lr=3e-4)
```
see the [tinystories example](examples/tinystories-llm/train.py) and [compatibility details](docs/compatibility.md).