MLX quants
Collection
191 items • Updated
Run Xylolabs/granite-3.3-8b-base-MLX-8bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/Xylolabs/granite-3.3-8b-base-MLX-8bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/Xylolabs/granite-3.3-8b-base-MLX-8bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to evaluate https://huggingface.co/Xylolabs/granite-3.3-8b-base-MLX-8bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
How to use Xylolabs/granite-3.3-8b-base-MLX-8bit with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("Xylolabs/granite-3.3-8b-base-MLX-8bit")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use Xylolabs/granite-3.3-8b-base-MLX-8bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Xylolabs/granite-3.3-8b-base-MLX-8bit" --prompt "Once upon a time"
Apple Silicon MLX 8bit quantization of ibm-granite/granite-3.3-8b-base (cfb7adb4), paired with Xylolabs/granite-3.3-8b-base-MLX-4bit.
mlx_lm.generate --model Xylolabs/granite-3.3-8b-base-MLX-8bit --prompt "Hello"
Mean KL divergence and top-1 token agreement against the BF16 reference on WikiText-2 and held-out prose.
| Quant | Size | WikiText-2 KL | WikiText-2 top-1 | Held-out KL | Held-out top-1 |
|---|---|---|---|---|---|
| MLX 8-bit (8-bit affine g=64, BF16 norms/scales/biases) | 8.68 GB | 0.000957 | 98.05% | 0.001078 | 97.97% |
| MLX 4-bit OBS (4-bit/6-bit/8-bit mixed affine g=64, BF16 norms/scales/biases) | 5.99 GB | 0.023402 | 92.66% | 0.019255 | 92.45% |
| Hardware | Unified memory | Fit | Context |
|---|---|---|---|
| MacBook Air / Mac mini | 16 GB | granite-3.3-8b-base-MLX-8bit |
8K |
| MacBook Pro / Mac mini | 24 GB | granite-3.3-8b-base-MLX-8bit |
32K |
| MacBook Pro | 36 GB | granite-3.3-8b-base-MLX-8bit |
32K |
| MacBook Pro / Mac mini | 48 GB | granite-3.3-8b-base-MLX-8bit |
32K |
| MacBook Pro / Mac Studio | 64 GB | granite-3.3-8b-base-MLX-8bit |
32K |
| Mac Studio | 128 GB | granite-3.3-8b-base-MLX-8bit |
32K |
| Mac Studio Ultra | 256 GB | granite-3.3-8b-base-MLX-8bit |
32K |
8-bit
Base model
ibm-granite/granite-3.3-8b-base