mlx-examples/transformer_lm
Volodymyr Kyrylov 7979b84a9e
transformer_lm: add --dataset enwik8 (#838)
* transformer_lm: add --dataset enwik8

* nits

---------

Co-authored-by: Awni Hannun <awni@apple.com>
2024-06-26 11:59:01 -07:00
..
datasets.py transformer_lm: add --dataset enwik8 (#838) 2024-06-26 11:59:01 -07:00
main.py transformer_lm: add --dataset enwik8 (#838) 2024-06-26 11:59:01 -07:00
README.md Add grad checkpointing and PE in the transformer example (#387) 2024-02-01 13:04:03 -08:00
requirements.txt Update a few examples to use compile (#420) 2024-02-08 13:00:41 -08:00

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. Choose a different dataset with the --dataset option.