mlx-examples/transformer_lm
2024-01-26 13:54:49 -08:00
..
datasets.py Add llms subdir + update README (#145) 2023-12-20 10:22:25 -08:00
jax_main.py Add llms subdir + update README (#145) 2023-12-20 10:22:25 -08:00
main.py remove simplify (#379) 2024-01-26 13:54:49 -08:00
README.md Update README.md 2023-12-06 00:30:37 -08:00
tf_main.py Add llms subdir + update README (#145) 2023-12-20 10:22:25 -08:00
torch_main.py Add llms subdir + update README (#145) 2023-12-20 10:22:25 -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.

To run the PyTorch, Jax or TensorFlow examples install the respective framework.