Skip to content

mlx implementations of various transformers, speedups, training

License

Notifications You must be signed in to change notification settings

jbarrow/mlx-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍏🤖 mlx-playground

Run fast transformer decoders on your Macbooks' GPU! Working towards a fast reimplementation of GPT-2 and Llama-like models in mlx.

The aim is that the only dependencies are:

  • mlx
  • sentencepiece
  • tqdm
  • numpy

With an optional dev dependency of:

  • transformers for downloading and converting weights

Accomplishments

Remaining Goals

This project will be considered complete once these goals are achieved.

  • finetune BERT
  • GPT-2 reimplementation and loading in MLX
  • speculative decoding
  • learning rate scheduling

Installation

poetry install --no-root

Phi-2

To download and convert the model:

python phi2/convert.py

That will fill in weights/phi-2.npz.

🚧 (Not yet done) To run the model:

python phi2/generate.py

Acknowledgements

Some great resources:

About

mlx implementations of various transformers, speedups, training

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages