Image Segmentation
MLX
ben3
mlx-swift
apple-silicon
ios
macos
background-removal
dinov3
4-bit precision
Run this model with HF Jobs
Run typealias/BEN3-MLX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/typealias/BEN3-MLX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/typealias/BEN3-MLX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use typealias/BEN3-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use typealias/BEN3-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download typealias/BEN3-MLX --local-dir BEN3-MLX
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
|
Download README.md from typealias/BEN3-MLX: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/typealias/BEN3-MLX/resolve/main/README.md
- Command line
-
hf download hf://typealias/BEN3-MLX/README.md
-
curl -L -o README.md https://huggingface.co/typealias/BEN3-MLX/resolve/main/README.md
2.14 kB
metadata
license: mit
base_model: PramaLLC/BEN3
base_model_relation: quantized
library_name: mlx
pipeline_tag: image-segmentation
tags:
- mlx
- mlx-swift
- apple-silicon
- ios
- macos
- ben3
- background-removal
- image-segmentation
- dinov3
- 4-bit
BEN3-MLX (Apple Silicon / iOS & macOS)
Native MLX / MLX Swift safetensors conversion and mobile 4-bit quantization of PramaLLC/BEN3 (DINOv3 ViT-B/16 encoder + DPT multi-hypothesis segmentation head).
Files & Benchmarks
| File | Quantization | Size | Mask MAE vs FP16 | IoU vs FP16 |
|---|---|---|---|---|
ben3-q4.safetensors |
4-bit MLX affine (group_size=64) on 72 DINOv3 encoder linear layers; FP16 DPT decoder; FP32 BatchNorm |
105 MiB | 0.00026 | 0.9989 |
ben3-fp16.safetensors |
FP16 weights; FP32 BatchNorm running statistics | 222 MiB | reference | reference |
Original PyTorch checkpoint ben3.pth is 464 MB FP32. ben3-q4.safetensors reduces on-disk and unified memory footprint by 4.4× for iOS and macOS deployment while preserving full FP16 Conv2d/ConvTranspose2d precision in the DPT alpha-matting head.
Weight Layout Notes
- Convolution weights are stored in standard PyTorch NCHW layout (
OIHWforConv2d,IOHWforConvTranspose2d) and transposed to MLX NHWC at load time. - Training-only
num_batches_trackedcounters are stripped; BatchNormrunning_mean,running_var,weight, andbiasremain in FP32. - Quantized linear layers follow standard MLX
QuantizedLinear(weightuint32,scalesfloat16,biasesfloat16,mode="affine",group_size=64,bits=4).
Attribution & License
Derived from PramaLLC/BEN3 under the MIT License.
@misc{meyer2026mhfnetmultihypothesisfusionnetwork,
title={MHFNet: Multi-Hypothesis Fusion Network for Dichotomous Image Segmentation},
author={Maxwell Meyer and Jack Spruyt},
year={2026},
eprint={2611.38399},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2611.38399}
}