Downloads · 30 days
1.1K
6% of all-time downloads
InferenceIllusionist/gpt-oss-20b-MLX-4bit
gpt-oss-20b-MLX-4bit is a machine learning model from InferenceIllusionist. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as apache-2.0.
This is a 4-bit quantized version of the OpenAI GPT OSS 20B model, optimized for Apple Silicon using the MLX framework. The model was successfully converted from the original gptoss architecture to MLX format using th…
Downloads · 30 days
1.1K
6% of all-time downloads
All-time downloads
19.3K
Public
Parameters
20.9B
11.8 GB on disk
Likes
20
Public
Click a slice to open those files.
.safetensors11.8 GB · 100%
How the weights are stored.
U3220.9B · 100%
From the Hugging Face model README
This is a 4-bit quantized version of the OpenAI GPT OSS 20B model, optimized for Apple Silicon using the MLX framework. The model was successfully converted from the original gpt_oss architecture to MLX format using the development version of mlx-lm (v0.26.3).
[!TIP] Tip: For best results with tool calling and reasoning, update your LMStudio to the latest version (0.3.22)
pip install mlx-lm
from mlx_lm import load, generate
# Load the quantized model
model, tokenizer = load("/Users/thomas/Documents/Model Weights/gpt-oss-20b-MLX-4bit")
# Generate text
prompt = "Explain quantum computing in simple terms:"
response = generate(model, tokenizer, prompt=prompt, verbose=True, max_tokens=512)
print(response)
gpt_oss (GPT Open Source)GptOssForCausalLM| Parameter | Value |
|---|---|
| Hidden Size | 2,880 |
| Intermediate Size | 2,880 |
| Number of Layers | 24 |
| Attention Heads | 64 |
| Key-Value Heads | 8 |
| Head Dimension | 64 |
| Vocabulary Size | 201,088 |
gpt-oss-20b-MLX-4bit/
├── config.json # Model configuration
├── model-00001-of-00003.safetensors # Model weights (part 1)
├── model-00002-of-00003.safetensors # Model weights (part 2)
├── model-00003-of-00003.safetensors # Model weights (part 3)
├── model.safetensors.index.json # Model sharding index
├── tokenizer.json # Tokenizer configuration
├── tokenizer_config.json # Tokenizer settings
├── special_tokens_map.json # Special tokens mapping
├── generation_config.json # Generation parameters
└── chat_template.jinja # Chat template
The model uses an alternating attention pattern across its 24 layers:
This model was successfully converted using:
python3 -m mlx_lm convert \
--hf-path "/path/to/openai-gpt-oss-20b" \
--mlx-path "/path/to/gpt-oss-20b-MLX-4bit" \
--quantize \
--q-bits 4
gpt_oss architecture which is only supported in MLX-LM v0.26.3+gpt_oss supportPlease refer to the original OpenAI GPT OSS 20B model license terms.
mlx-lm development toolsModel Size: 11GB
Quantization: 4-bit (4.504 bits/weight)
Created: August 6, 2025
MLX-LM Version: 0.26.3 (development)