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.
BEN3-MLX / README.md
typealias's picture
Add BEN3 MLX Q4 (105 MiB) and FP16 (222 MiB) safetensors checkpoints
fb5abdf verified
|
Raw History Blame Contribute Delete
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 (OIHW for Conv2d, IOHW for ConvTranspose2d) and transposed to MLX NHWC at load time.
  • Training-only num_batches_tracked counters are stripped; BatchNorm running_mean, running_var, weight, and bias remain in FP32.
  • Quantized linear layers follow standard MLX QuantizedLinear (weight uint32, scales float16, biases float16, 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}
}