Experimental β€” not recommended: basal-omni-2.0-mini-preview-MLX

GitHub Website

An MLX 8-bit port of basal-omni-2.0-mini-preview (E4B, base Gemma 4 E4B) for Apple Silicon, served with basal-serve --mode mlx. Text only: the image and audio encoders are not in this folder.

Experimental β€” not recommended. basal-omni-2.0-mini-preview reads the state two ways (in both directions) before it answers; basal's MLX mode reads it one way (left to right), so this port runs the same weights as a weaker model. Measured with the basal engine 2.8.0 on the released held-out tests, one way against two ways: PL decisions 0.843 vs 0.951, PL general 0.758 vs 0.767, PL-Real 0.953 vs 0.960, EN corpus 0.669 vs 0.692, EN panel 0.762 vs 0.811; the one-way reading gives the same answer as the released model on about 85% of decisions. The 8-bit port follows the one-way reading closely: on 4,280 test decisions it gives the same answer as the one-way bf16 reading on 98.9% of them. For the exact model, use the main repository with the basal engine (The recommended way).

Why this port is not recommended

The same weights served two ways (as released) and one way (the reading of this port). Both runs used the public basal engine 2.8.0 on one NVIDIA H100: --mode eager, bf16, one option order. The one-way run was the same engine with two-way reading turned off. The test sets are those of the main model card.

benchmark two ways (main repository) one way (this port's reading) same top answer as two ways
PL decisions (held-out test, 7,081 items) 0.951 0.843 85.5%
PL general (knowledge, exams, reading; 3,079 items) 0.767 0.758 84.5%
PL-Real (300 real Polish documents) 0.960 0.953 96.0%
EN corpus test (1,479 items) 0.692 0.669 83.3%
EN external panel (10 public English decision tasks, 3,842 items) 0.811 0.762 84.5%

The MLX port itself was measured on an Apple M4 Pro (24 GB) on every 2nd of the 8,560 held-out decisions of the main card's coverage test (4,280 decisions: PL decisions and EN corpus items). Each decision was read once, in the given option order:

reading accuracy same top answer as two ways (bf16) same top answer as one way (bf16)
two ways, basal engine, bf16 (main repository) 0.906 – 85.1%
one way, basal engine, bf16 0.810 85.1% –
one way, MLX 8-bit (this port) 0.810 85.0% 98.9%
  • The 8-bit port follows the one-way reading closely (98.9% of top answers equal to the one-way bf16 reading). The loss comes from reading one way, not from quantisation.
  • Automation: with this folder's calibration (CALIBRATION.mlx.json, fitted on this port read one way, every 2nd item of the calibration splits), 13.9% of these decisions (593) are decided automatically at the 1% error target, with no error among them (only choice questions get a certified 1% threshold), and 51.0% at the 5% target (4.53% observed error). The released model, read two ways, decides 58.3% at 1% and 87.8% at 5% when served (main card).
  • The released model's CALIBRATION.json is not in this folder: it was fitted on two-way readouts and does not hold for one-way reading.
  • Checked on an Apple M4 Pro (24 GB) with basal 2.8.0 --mode mlx (mlx 0.32.4, mlx-lm 0.32.2): the quick-start request of the main card, and the first 400 PL decisions of the test set in both option orders (800 requests, keys hidden, no errors). The top answer equals the basal engine reading one way (bf16, NVIDIA H100) in 793 of 800 requests, and the released model read two ways in 739 of 800.

The recommended way

Serve the main repository, Remek/basal-omni-2.0-mini-preview, with the basal engine, which reads it two ways. On a Mac:

# the native arm64 Python (uname -m prints arm64; x86_64 means the terminal runs under Rosetta)
uv python install cpython-3.12-macos-aarch64-none
uv venv --python cpython-3.12-macos-aarch64-none --allow-existing ~/basal-env && source ~/basal-env/bin/activate
uv pip install "basal @ https://github.com/rkinas/basal/archive/refs/tags/v2.8.0.tar.gz"
basal-serve --model Remek/basal-omni-2.0-mini-preview --name basal-omni-2.0-mini-preview --mode eager --device mps --port 8000
  • Apple Silicon: --mode eager --device mps runs PyTorch on Metal in bf16 (slower). The engine's default on a Mac (mlx) does not serve a two-way model. The weights take about 16 GB.
  • NVIDIA GPU: --mode fast (the default on Hopper with FlashAttention 3 and on Blackwell workstation GPUs) or --mode eager. Install as on the main card.
  • The answers, calibration and coverage of the main model card hold only for this two-way serving.

When two-way support comes

  • MLX (this repository): Two-way reading in basal's MLX mode is planned for a later basal release (no date yet). For the exact two-way reading on a Mac today, use basal-serve --mode eager --device mps on the main repository (slower).
  • GGUF (basal-omni-2.0-mini-preview-GGUF): Exact two-way reading in llama.cpp needs an upstream change; no date yet.
  • Until then this is a one-way port.

Use (one-way reading)

Install the basal engine with the mlx extra (Apple Silicon, Python 3.11 or newer) and serve the folder with --mode mlx:

# the native arm64 Python (uname -m prints arm64; x86_64 means the terminal runs under Rosetta)
# made earlier under Rosetta? if `grep -l x86_64 ~/basal-mlx/lib/python3*/site-packages/*.dist-info/WHEEL` lists any, use --clear once in place of --allow-existing
uv python install cpython-3.12-macos-aarch64-none
uv venv --python cpython-3.12-macos-aarch64-none --allow-existing ~/basal-mlx && source ~/basal-mlx/bin/activate
uv pip install "basal[mlx] @ https://github.com/rkinas/basal/archive/refs/tags/v2.8.0.tar.gz"
basal-serve --model Remek/basal-omni-2.0-mini-preview-MLX --mode mlx --port 8000

Then ask questions as with basal-omni-2.0-mini-preview (choice, noul, score, multi, act, tool, and the task types; up to 255 options).

  • Calibration: --mode mlx loads CALIBRATION.mlx.json, fitted on this port read one way. You can refit it on your own labelled data with basal-calibrate.
  • Memory: the weights take 8.6 GB of unified memory; long states need more on top.
  • One option order (the default): the calibration is fitted for one order.
  • LM Studio's MLX engine does not serve basal decision models; for LM Studio use the -decision files of the GGUF port.

How it was made

  • mlx-lm 0.32.2's converter (load, quantize, save; mlx 0.32.4) on the released bf16 model: MLX affine 8-bit, group size 64, for the linear layers of the decoder blocks and Gemma 4 E4B's per-layer embedding table. The token embeddings (also the output head the decision is read from, in fp32) and the norms stay bf16. mlx-lm keeps the text decoder only. The rotary and global-attention settings are written into config.json in the keys mlx-lm reads. The tokenizer files are the released model's.
  • This folder is served one way: basal's MLX mode does not serve two-way reading yet.
  • CALIBRATION.mlx.json: the released model's calibration method and splits, refitted on this port's readouts (--mode mlx, read one way, one option order, every 2nd item of each split). It holds per-type and per-bucket temperatures and certified thresholds for 1% and 5% error.

Files

  • model-00001-of-00002.safetensors, model-00002-of-00002.safetensors, model.safetensors.index.json, config.json: the MLX weights and their configuration.
  • tokenizer.json, tokenizer_config.json, chat_template.jinja, generation_config.json: as in the bf16 model (the basal server renders the prompt with them).
  • CALIBRATION.mlx.json: the calibration fitted on this port, read one way.
  • basal.json: prompt format 2 and the readout protocol, read one way.
  • SHA256SUMS: checksums of the model files.

Limitations

  • Read one way: see Why this port is not recommended. The main card's numbers do not hold for this port.
  • Preview and experimental: validate on your own documents before relying on it.
  • Text only (see above).
  • Exact arithmetic and thresholds are a weak spot of one-pass decisions: compute them in code.
  • Decisions with serious consequences for people should be reviewed by a person.

License and attribution

Apache-2.0. Converted from basal-omni-2.0-mini-preview, fine-tuned from google/gemma-4-E4B-it (Apache-2.0).

Downloads last month
59
Safetensors
Model size
7B params
Tensor type
BF16
Β·
U32
Β·
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Remek/basal-omni-2.0-mini-preview-MLX

Quantized
(2)
this model