Downloads · 30 days
421
31% of all-time downloads
badmadrad/Mistral-Small-3.1-DRAFT-0.5B-MLX-4bit
Mistral-Small-3.1-DRAFT-0.5B-MLX-4bit is a text generation model from badmadrad. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
A 4-bit quantized MLX conversion of alamios/Mistral-Small-3.1-DRAFT-0.5B, optimized for speculative decoding on Apple Silicon.
Downloads · 30 days
421
31% of all-time downloads
All-time downloads
1.4K
Public
Parameters
593M
351 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors334 MB · 95%
How the weights are stored.
U32593M · 100%
From the Hugging Face model README
A 4-bit quantized MLX conversion of alamios/Mistral-Small-3.1-DRAFT-0.5B, optimized for speculative decoding on Apple Silicon.
This is a draft model (0.5B parameters) designed for speculative decoding with larger Mistral-family target models:
mistralai/Devstral-Small-2-24B-Instruct-2512)Speculative decoding uses this small, fast model to propose candidate tokens, which the larger target model verifies in a single forward pass. The output distribution is mathematically identical to standard decoding — you get the same quality, just faster.
| Property | Value |
|---|---|
| Parameters | 0.5B |
| Architecture | Qwen2ForCausalLM (backbone) |
| Tokenizer | Mistral Tekken (131,072 tokens) |
| Quantization | 4-bit (affine, group_size=64) |
| Disk Size | ~335 MB |
| Memory Usage | ~300 MB |
| Context Length | 32,768 tokens |
import mlx.core as mx
from mlx_lm import load
from mlx_lm.generate import speculative_generate_step
# Load target model (24B)
model, tokenizer = load("mlx-community/mistralai_Devstral-Small-2-24B-Instruct-2512-MLX-4Bit")
# Load draft model (0.5B)
draft_model, _ = load("badmadrad/Mistral-Small-3.1-DRAFT-0.5B-MLX-4bit")
# Tokenize prompt
prompt = mx.array(tokenizer.encode("Write a Python hello world"))
# Generate with speculative decoding
for token, logprobs, from_draft in speculative_generate_step(
prompt, model, draft_model,
num_draft_tokens=3,
max_tokens=256,
):
print(tokenizer.decode([token.item()]), end="", flush=True)
# Set as draft model
alm config set draft_model badmadrad/Mistral-Small-3.1-DRAFT-0.5B-MLX-4bit
alm config set num_draft_tokens 3
# Restart server to load draft model
alm restart
Expected speedup with speculative decoding depends on acceptance rate (how often the draft model's predictions match the target):
| Scenario | Expected Speedup |
|---|---|
| Code generation | 1.5-2.5x |
| Natural language | 2-3x |
| Repetitive/predictable text | 2.5-3.5x |
Memory overhead is minimal (~300 MB) compared to the 14 GB target model.
mlx-lm v0.30.6mlx_lm.convert --hf-path alamios/Mistral-Small-3.1-DRAFT-0.5B --mlx-path . -q --q-bits 4Apache 2.0 — same as the base model.