Downloads · 30 days
223
10% of all-time downloads
halley-ai/gpt-oss-20b-MLX-4bit-gs32
gpt-oss-20b-MLX-4bit-gs32 is a text generation model from halley-ai. 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.
Summary. This is a 4-bit (Q4) MLX quantization of gpt-oss-20B (sparse Mixture-of-Experts, MPx4). Group size is 32. Built for Apple Silicon with Metal acceleration.
Downloads · 30 days
223
10% of all-time downloads
All-time downloads
2.1K
Public
Parameters
20.9B
13.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors13.1 GB · 100%
How the weights are stored.
U3220.9B · 100%
From the Hugging Face model README
Summary. This is a 4-bit (Q4) MLX quantization of gpt-oss-20B (sparse Mixture-of-Experts, MPx4). Group size is 32.
Built for Apple Silicon with Metal acceleration.
openai/gpt-oss-20b (Apache-2.0)q_group_size=32 (some tensors remain FP16 for stability)config.json; tokenizer files included for drop-in useRuns on: Apple Silicon (M1 or newer) with macOS ≥ 13.5 via MLX (Metal).
Not supported: Intel macOS / Linux / Windows (use a GGUF build + llama.cpp instead).
RAM guidance: 24 GB+ required for Q4 gs=32 (does not work on Mac with only 16 GB).
pip install mlx-lm transformers
# Python API (uses tokenizer bundled with this repo)
from mlx_lm import load, generate
model, tokenizer = load("halley-ai/gpt-oss-20b-MLX-4bit-gs32")
print(generate(
model, tokenizer,
prompt="Explain the Chudnovsky algorithm to compute π.",
max_tokens=256, max_kv_size=512
))
# CLI
python -m mlx_lm generate --model halley-ai/gpt-oss-20b-MLX-4bit-gs32 \
--prompt "Explain the Chudnovsky algorithm to compute pi." \
--max-kv-size 512 --max-tokens 256
LM Studio / CLI (MLX, Q4 gs=32) ≈2k-token responses:
Throughput varies with Mac model, context, and sampler settings.
Perplexity (PPL) streaming evaluation on WikiText-2; window=stride=4096, ~100k tokens, EOS inserted between docs.
<table> <thead> <tr><th>Variant</th><th>PPL (ctx=4096)</th></tr> </thead> <tbody> <tr><td>MLX 8-bit (reference)</td><td>10.75</td></tr> <tr><td>MLX 6-bit (gs=32)</td><td>10.46 (−2.7% vs 8-bit/gs64)</td></tr> <tr><td>MLX 5-bit (gs=32)</td><td>11.11 (+3.3% vs 8-bit/gs64, +6.2% vs 6-bit/gs32)</strong></td></tr> <tr><td><strong>MLX 4-bit (gs=32)</strong></td><td><strong>13.70 (+27.4% vs 8-bit/gs64, +31.0% vs 6-bit/gs32)</strong></td></tr> </tbody> </table>Interpretation
python -m mlx_lm convert \
--hf-path openai/gpt-oss-20b \
--mlx-path gpt-oss-20b-mlx-q4-gs32 \
--q-bits 4 --q-group-size 32 -q
Outputs may be factually wrong or unsafe. Don’t use for medical, legal, or financial decisions without human review. MoE models can be sensitive to prompt wording; prefer explicit instructions and structure.