Microsoft · First MLX build 16 Dec 2024
phi-4
MLX
Text mit
A 15B parameter text generation model from Microsoft, with 6 MLX builds, from 2-bit to bf16.
- Parameters
- 15B From Hugging Face
- Quantisation
- 4-bit phi-4-4bit
- Memory needed
- 12 GB Estimate, unified memory
- Download
- 8.2 GB Weights, estimated
- Downloads
- 1.4K This build, last 30 days
- Task
- Text generation Text
- MLX builds
- 6 On mlx-community
- Devices
- Mac Apple silicon
Memory
Will it fit?Needs about 12 GB at 4-bit
8 GB
16 GB
24 GB
32 GB
64 GB
128 GB
Fits with headroomTight, close other appsWon’t fit
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/phi-4-4bit --prompt "Hello"
MLX builds
6 on mlx-community| phi-4-2bit | 2-bit | 4.6 GB | 8 GB | 73 |
|---|---|---|---|---|
| phi-4-3bit | 3-bit | 6.4 GB | 10 GB | 135 |
| phi-4-4bit | 4-bit | 8.2 GB | 12 GB | 1.4K |
| phi-4-6bit | 6-bit | 11.9 GB | 16 GB | 182 |
| phi-4-8bit | 8-bit | 15.6 GB | 20 GB | 790 |
| phi-4-bf16 | bf16 | 29.3 GB | 35 GB | 142 |
Sizes are estimated from Hugging Face’s parameter counts and the quantisation. Downloads are for the last 30 days.