Downloads · 30 days
115
5% of all-time downloads
mlx-community/CodeLlama-7b-mlx
CodeLlama-7b-mlx is a text generation model from mlx-community. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as llama2.
Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This model is designed for general code synthesis and understanding. This is the…
Downloads · 30 days
115
5% of all-time downloads
All-time downloads
2.3K
Public
Repo size
27 GB
Likes
10
Public
Click a slice to open those files.
.npz13.5 GB · 100%
From the Hugging Face model README
Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This model is designed for general code synthesis and understanding. This is the repository for the 7B base model, in npz format suitable for use in Apple's MLX framework.
Weights have been converted to float16 from the original bfloat16 type, because numpy is not compatible with bfloat16 out of the box.
How to use with MLX.
# Install mlx, mlx-examples, huggingface-cli
pip install mlx
pip install huggingface_hub hf_transfer
git clone https://github.com/ml-explore/mlx-examples.git
# Download model
export HF_HUB_ENABLE_HF_TRANSFER=1
huggingface-cli download --local-dir CodeLlama-7b-mlx mlx-llama/CodeLlama-7b-mlx
# Run example
python mlx-examples/llama/llama.py --prompt "int main(char argc, char **argv) {" CodeLlama-7b-mlx/ CodeLlama-7b-mlx/tokenizer.model
Please, refer to the original model card for details on CodeLlama.