![MLX Community's profile picture](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
MLX Community
AI & ML interests
None defined yet.
MLX Community
A community org for model weights compatible with mlx-examples powered by MLX.
These are pre-converted weights and ready to be used in the example scripts.
Quick start for LLMs
Install mlx-lm
:
pip install mlx-lm
You can use mlx-lm
from the command line. For example:
python -m mlx_lm.generate --model mistralai/Mistral-7B-Instruct-v0.1 --prompt "hello"
This will download a Mistral 7B model from the Hugging Face Hub and generate text using the given prompt.
For a full list of options run:
python -m mlx_lm.generate --help
To quantize a model from the command line run:
python -m mlx_lm.convert --hf-path mistralai/Mistral-7B-Instruct-v0.1 -q
For more options run:
python -m mlx_lm.convert --help
You can upload new models to Hugging Face by specifying --upload-repo
to
convert
. For example, to upload a quantized Mistral-7B model to the
MLX Hugging Face community you can do:
python -m mlx_lm.convert \
--hf-path mistralai/Mistral-7B-Instruct-v0.1 \
-q \
--upload-repo mlx-community/my-4bit-mistral
For more details on the API checkout the full README
Other Examples:
For more examples, visit the MLX Examples repo. The repo includes examples of:
Parameter efficient fine tuning with LoRA
Speech recognition with Whisper
Image generation with Stable Diffusion
and many other examples of different machine learning applications and algorithms.
Collections
10
models
629
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/Llama-2-7b-chat-mlx
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/Meta-Llama-3-8B-Instruct-4bit
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/Mixtral-8x22B-4bit
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/phi-2
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/dbrx-instruct-4bit
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/c4ai-command-r-plus-4bit
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/Llama-3-8B-Instruct-1048k-4bit
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/CodeLlama-70b-Instruct-hf-4bit-MLX
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)
mlx-community/Mixtral-8x7B-Instruct-v0.1
![](https://cdn-avatars.huggingface.co/v1/production/uploads/623c830997ddced06d78699b/3qTjC7d3YFCJTwpxd2noq.png)