Run this model with HF Jobs
Run Xylolabs/Llama-3.1-8B-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:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Xylolabs/Llama-3.1-8B-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.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Xylolabs/Llama-3.1-8B-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.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Xylolabs/Llama-3.1-8B-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.
Instructions to use Xylolabs/Llama-3.1-8B-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Xylolabs/Llama-3.1-8B-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/Llama-3.1-8B-MLX-8bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use Xylolabs/Llama-3.1-8B-MLX-8bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Xylolabs/Llama-3.1-8B-MLX-8bit" --prompt "Once upon a time"
- Atomic Chat
Llama-3.1-8B MLX 8-bit
Built with Llama. Base (non-instruction-tuned) weights from meta-llama/Llama-3.1-8B for mlx-lm.
Precision: 8-bit affine (group size 64) with bfloat16 scales, biases, and norms.
How to run
pip install mlx-lm==0.32.2
mlx_lm.generate --model Xylolabs/Llama-3.1-8B-MLX-8bit --prompt "The capital of Australia is"
Accuracy
Measured against same-model BF16 (meta-llama/Llama-3.1-8B@d04e592b; WikiText-2: 80 chunks of 512; held-out text: 40 chunks of 512; BOS token 128000 per chunk). Full CSV: accuracy-by-size.csv.
| Quant | Size | WikiText-2 KL | top-1 | Held-out KL | top-1 |
|---|---|---|---|---|---|
| MLX 8-bit | 8.53 GB | 0.001399 | 98.06% | 0.001207 | 98.20% |
| MLX 4-bit | 4.64 GB | 0.037686 | 90.66% | 0.025261 | 91.38% |
| GGUF Q4_K_M (reference) | 4.92 GB | 0.029846 | 92.16% | 0.026917 | 91.72% |
Other quantizations
License and notices
Llama 3.1 Community License (LICENSE) and Acceptable Use Policy (USE_POLICY.md). We converted the weights to MLX and quantized them; see NOTICE.
Updates
- 2026-12-02: First release (MLX 8-bit).
- Downloads last month
- 39
8-bit
Model tree for Xylolabs/Llama-3.1-8B-MLX-8bit
Base model
meta-llama/Llama-3.1-8B
