brew install git-lfs
git clone https://github.com/ml-explore/mlx-examples
cd mlx-examples/llms/mixtral
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
cd Mixtral-8x7B-Instruct-v0.1
git lfs pull --include "consolidated.*.pt" # ~100GB
git lfs pull --include "tokenizer.model"
cd ..
pip3 install -r requirements.txt
python3 convert.py --torch-path Mixtral-8x7B-Instruct-v0.1 -q --q-bits 4
code prompt.txt # add prompt to this file, wrapped in [INST] … [/INST]
python3 mixtral.py --model-path mlx_model --max-tokens 4096 --temp 0 --prompt "$(cat prompt.txt)"
Created
January 9, 2024 22:45
-
-
Save hubgit/1a733d0acf84b3c2e2779dc2577c5235 to your computer and use it in GitHub Desktop.
Run Mixtral-8x7B-Instruct-v0.1 LLM on macOS (Apple Silicon) using MLX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment