Views
No views yet
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-lm1from mlx_lm import load, generate
2
3# Load the quantized model
4model, tokenizer = load("/Users/thomas/Documents/Model Weights/gpt-oss-20b-MLX-4bit")
5
6# Generate text
7prompt = "Explain quantum computing in simple terms:"
8response = generate(model, tokenizer, prompt=prompt, verbose=True, max_tokens=512)
9print(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 template1python3 -m mlx_lm convert \
2 --hf-path "/path/to/openai-gpt-oss-20b" \
3 --mlx-path "/path/to/gpt-oss-20b-MLX-4bit" \
4 --quantize \
5 --q-bits 4gpt_oss architecture which is only supported in MLX-LM v0.26.3+gpt_oss supportmlx-lm development tools