codellama · First MLX build 27 Apr 2025

CodeLlama-7b-Instruct-hf

MLX Text llama2

A 6.7B parameter text generation model from codellama, with 3 MLX builds, from 4-bit to 8-bit.

Hugging Face
Parameters
6.7B
From Hugging Face
Quantisation
8-bit
CodeLlama-7b-Instruct-hf-8bit-mlx
Memory needed
11 GB
Estimate, unified memory
Download
7.2 GB
Weights, estimated
Downloads
49
This build, last 30 days
Task
Text generation
Text
MLX builds
3
On mlx-community
Devices
Mac
Apple silicon

Memory

Estimated from the size of the weights, plus a fifth for context and working memory and 2 GB for macOS and your apps. Long contexts need more.

Run it

Terminal · mlx-lm
$ pip install -U mlx-lm
$ mlx_lm.generate --model mlx-community/CodeLlama-7b-Instruct-hf-8bit-mlx --prompt "Hello"

MLX builds

3 on mlx-community
Click a column to sort. Smallest size and most downloads are highlighted.
CodeLlama-7b-Instruct-hf-4bit-mlx-2 4-bit 3.8 GB 7 GB 44
CodeLlama-7b-Instruct-hf-6bit-mlx 6-bit 5.5 GB 9 GB 32
CodeLlama-7b-Instruct-hf-8bit-mlx 8-bit 7.2 GB 11 GB 49

Sizes are estimated from Hugging Face’s parameter counts and the quantisation. Downloads are for the last 30 days.