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)
model-00001-of-00003.safetensors 4.9 GiBmodel-00002-of-00003.safetensors 4.9 GiBmodel-00003-of-00003.safetensors 1.2 GiBopenai/gpt-oss-20b