Fine tuning a Mistral-7b model from hf mlx, and then deploying it as a Telegram bot.
Inspired by: https://www.youtube.com/watch?v=3PIqhdRzhxE
Code hacked from here: https://github.com/ml-explore/mlx-examples/tree/main/lora
- Clone repo
- Create Python env
python -m venv mlx-env
- Activate env (bash/zsh)
source mlx-env/bin/activate
- Install requirements
pip install -r requirements.txt
Note: MLX has the following requirements. More info here.
- Using an M series chip (Apple silicon)
- Using a native Python >= 3.8
- macOS >= 13.5 (MacOS 14 recommended)