Ollama app icon

MLX Test Models

Create GPT-OSS, Apertus (1.0, 1.1 Mini, 1.5 Omni), and Gemma 4 models locally from their Hugging Face safetensors for supported Ollama MLX preview builds.

Before you start

Use the latest signed preview DMG unless you are reproducing an older release. GPT-OSS and Apertus 1.0 are available in every listed MLX preview build. Gemma 4 and Apertus 1.5 Omni require v0.31.2 or newer. Apertus 1.1 Mini requires v0.32.6 or newer.

Capability chips summarize the validated behavior of each recipe. Support and answer quality can differ for larger or more heavily quantized variants. Accept each model repository's license on Hugging Face, install the hf CLI, and authenticate before downloading gated weights.

Known Apertus Mini limitation: the currently published and locally imported v1.1 Mini artifacts can produce nonsensical chat responses and may disregard supplied conversation information. This affects all 0.5B, 1.5B, and 4B BF16/NVFP4 variants. Do not use them for conversational workloads while the cause is investigated.

1. Prepare the model tools

Run these commands from the directory where you keep local model snapshots and Modelfiles.

brew install hf
hf auth login
mkdir -p models

A Python installation of the CLI also works: python3 -m pip install -U "huggingface_hub[cli]".

2. Import the model

Choose a locally imported model recipe or a published model family below. Local recipes download a Hugging Face snapshot, create a Modelfile, then import it into Ollama. Published models can be pulled directly.

GPT-OSS 20B

Text Reasoning Tools
Hugging Face

GPT-OSS needs its full Harmony template for reasoning levels, tools, and correct message formatting. Use the prepared portable Modelfile, which retains that full template and points at the local HF snapshot.

Download

hf download openai/gpt-oss-20b \
  --local-dir ./models/gpt-oss-20b-hf

Get the complete Modelfile

Download Modelfile.gptoss-20b and save it in the source checkout beside the models directory. Its first line is:

FROM ./models/gpt-oss-20b-hf

Alternatively, export the official definition with ollama show --modelfile gpt-oss:20b and replace only its active FROM line with the line above.

Import in the recommended compact format

ollama create --experimental -q mxfp4 \
  gptoss-mlx:20b-mxfp4 -f ./Modelfile.gptoss-20b

Gemma 4 E4B

Text Tools Image Audio
Hugging Face

E4B is the recommended smaller Gemma 4 test model. Its MLX path accepts JPEG, PNG, WebP, WAV, and MP3 input and supports tool calls.

Download

hf download google/gemma-4-E4B-it \
  --local-dir ./models/gemma-4-E4B-it

Create Modelfile.gemma4-e4b

FROM ./models/gemma-4-E4B-it
TEMPLATE {{ .Prompt }}
RENDERER gemma4
PARSER gemma4
PARAMETER temperature 1
PARAMETER top_k 64
PARAMETER top_p 0.95

Import and quantize

ollama create --experimental -q nvfp4 \
  gemma4:e4b-mlx -f ./Modelfile.gemma4-e4b

Apertus 1.5 Omni 8B

Text Tools Image Audio
Hugging Face

Apertus 1.5 Omni adds native image and audio tokenizers to the Apertus runtime. Tool calls require thinking to be disabled. Review and accept its license and acceptable-use policy first.

Download

hf download swiss-ai/Apertus-v1.5-8B \
  --local-dir ./models/Apertus-v1.5-8B

Create Modelfile.apertus-1.5-8b

FROM ./models/Apertus-v1.5-8B
TEMPLATE {{ .Prompt }}
RENDERER apertus1p5
PARSER apertus
PARAMETER temperature 0.8
PARAMETER top_p 0.9
PARAMETER stop "</s>"
PARAMETER stop "<|assistant_end|>"
PARAMETER stop "<|tools_suffix|>"

Import and quantize

ollama create --experimental -q nvfp4 \
  apertus-1.5:8b-mlx -f ./Modelfile.apertus-1.5-8b

Apertus 1.1 Mini

Text Known issue

Available in 0.5B, 1.5B, and 4B sizes, but not recommended for conversational use: all current BF16 and NVFP4 variants can produce nonsensical chat responses or disregard supplied conversation information. Select a source below only for investigation or reproduction.

Reproduce the 4B BF16 import from its Hugging Face model card for investigation. Use the equivalent 0.5B or 1.5B Instruct source when reproducing those sizes.

Download the release-tested source revision

hf download swiss-ai/Apertus-v1.1-4B-Instruct \
  --revision 0d004ae50a03fda815ff7a091a89ab0baec94f3d \
  --local-dir ./models/Apertus-v1.1-4B-Instruct

Create Modelfile.apertus-1.1-4b

FROM ./models/Apertus-v1.1-4B-Instruct
PARAMETER temperature 0.8
PARAMETER top_p 0.9
PARAMETER stop "</s>"
PARAMETER stop "<SPECIAL_68>"
PARAMETER stop "<SPECIAL_72>"
TEMPLATE {{ .Prompt }}
RENDERER apertus1p1
PARSER apertus1p1

Import

ollama create --experimental -q nvfp4 \
  apertus-mini-mlx:4b-nvfp4 -f ./Modelfile.apertus-1.1-4b

Apertus 1.0 8B

Text

Apertus 1.0 is the text-generation path supported by the older Apertus MLX previews. It uses the apertus renderer, not the newer apertus1p5 renderer. Tool calling is not advertised for this model path because it was never validated reliably.

Build locally from the Hugging Face model card.

Download the release-tested revision

hf download swiss-ai/Apertus-8B-Instruct-2509 \
  --revision 50761a511195fde9d958f62f3b6344329d4bd191 \
  --local-dir ./models/Apertus-8B-50761a5

Create Modelfile.apertus-1.0-8b

FROM ./models/Apertus-8B-50761a5
TEMPLATE {{ .Prompt }}
RENDERER apertus
PARSER apertus
PARAMETER temperature 0.8
PARAMETER top_p 0.9
PARAMETER stop "</s>"
PARAMETER stop "<|assistant_end|>"
PARAMETER stop "<|tools_suffix|>"

Import and quantize

ollama create --experimental -q nvfp4 \
  apertus-mlx:8b-nvfp4 -f ./Modelfile.apertus-1.0-8b

3. Run and test the models

Start the selected preview server in one terminal:

ollama serve

Then use another terminal for text, image, or audio prompts:

ollama run gptoss-mlx:20b-mxfp4 "Reply with exactly OK"
ollama run apertus-mlx:8b-nvfp4 "Hello"
ollama run gemma4:e4b-mlx "Hello"
ollama run gemma4:e4b-mlx "Describe ./photo.webp"
ollama run gemma4:e4b-mlx "Summarize ./recording.mp3"
ollama run apertus-1.5:8b-mlx "Compare ./photo.png and ./recording.wav"

File paths are resolved locally and may be combined in one prompt in the order the model should receive them. Keep audio clips at 30 seconds or shorter for these preview builds.

Other checkpoints and troubleshooting