Instructions to use dusterbloom/Bonsai-27B-dSpark-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use dusterbloom/Bonsai-27B-dSpark-MLX-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("dusterbloom/Bonsai-27B-dSpark-MLX-4bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use dusterbloom/Bonsai-27B-dSpark-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "dusterbloom/Bonsai-27B-dSpark-MLX-4bit" --prompt "Once upon a time"
Could this be done for the ternary 2B version
Appreciate your contribution. Could this be done for the 2B version, it does not seem compatible on first try.
2026-07-15 15:06:41,927 - omlx.engine_pool - INFO - [-] - Loading model: Ternary-Bonsai-27B-mlx-2bit
2026-07-15 15:06:41,927 - omlx.engine_pool - INFO - [-] - DFlash enabled for Ternary-Bonsai-27B-mlx-2bit, draft=/Users/jpargac/.omlx/models/peppi314/Bonsai-27B-dSpark-MLX-4bit
2026-07-15 15:06:42,862 - omlx.engine_pool - WARNING - [-] - DFlash start failed for Ternary-Bonsai-27B-mlx-2bit: DFlashDraftModelArgs.init() missing 3 required positional arguments: 'max_position_embeddings', 'tie_word_embeddings', and 'num_target_layers'. Falling back to vlm engine.
2026-07-15 15:06:42,862 - omlx.patches.dflash_lifecycle - INFO - [-] - dflash class patches restored on 2 class(es)
2026-07-15 15:06:42,862 - omlx.engine.dflash - INFO - [-] - DFlashEngine stopped
Or if you could give some guidance on how to do this, I would be interested to learn more.
It should be possible. Still I think your problem is caused by how omlx deals with the drafter. See the errors. You might try to get it work on the 1bit just to make sure. I am still testing the 1bit with this drafter and still trying to figure out if spec-decode on my mac is worth the pain but it does not work out of the box. I also might try on 2bit but later. no guarantee when.
True. Could test that first of course. Good call. Thank you