mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-25 01:41:19 +08:00

* Add grad checkpointing and PE in the transformer example * Remove other frameworks from LM example * Remove the other frameworks from MNIST example * Improve the transformer LM example * Fix black and change LR
13 lines
316 B
Markdown
13 lines
316 B
Markdown
# Transformer LM
|
|
|
|
This is an example of a decoder-only Transformer LM. The only dependency is
|
|
MLX.
|
|
|
|
Run the example on the GPU with:
|
|
|
|
```
|
|
python main.py --gpu
|
|
```
|
|
|
|
By default the dataset is the [PTB corpus](https://paperswithcode.com/dataset/penn-treebank). Choose a different dataset with the `--dataset` option.
|