Run this model with HF Jobs

Run SirSahOl/LocateAnything-3B-mlx-4bit 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/SirSahOl/LocateAnything-3B-mlx-4bit. 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/SirSahOl/LocateAnything-3B-mlx-4bit 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/SirSahOl/LocateAnything-3B-mlx-4bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

LocateAnything-3B-mlx-4bit

4-bit MLX conversion of nvidia/LocateAnything-3B optimized for Apple Silicon native GPU inference.

Converted by: SirSahOl
Source Model: nvidia/LocateAnything-3B
Framework: MLX by Apple
Quantization: 4-bit (Average 4.50 bits per weight)
Format: safetensors
License: other


Model Details

  • Architecture: LocateAnythingForConditionalGeneration

  • Parameters: 3B

  • Context Length: 32,768 tokens

  • Format: MLX (Apple Silicon native GPU format)

  • Quantization: 4-bit (Average 4.50 bits per weight)

  • Active VRAM Footprint: ~2.0 GB (Minimum recommended: 8 GB Unified Memory)

  • Mixed Precision Strategy: Language backbone: 4-bit affine; Vision encoder: BF16 unquantized (maintains sub-pixel coordinate alignment for visual grounding)

  • Coordinate Output Format: Normalized [ymin, xmin, ymax, xmax] in [0, 1000] range


Quick Start

Installation

pip install mlx-vlm

Usage

CLI

# Generate visual grounding completion
python -m mlx_vlm.generate --model SirSahOl/LocateAnything-3B-mlx-4bit --image screenshot.png --prompt "locate: submit button"

Python API (LocateAnything / Visual Grounding)

from mlx_vlm import load, generate
from mlx_vlm.utils import load_image

# Load model natively onto Apple Silicon GPU (Metal)
model, processor = load("SirSahOl/LocateAnything-3B-mlx-4bit")

prompt = "locate: submit button"
image_path = "screenshot.png"

# Format messages using the Qwen/LocateAnything vision template
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": prompt}
        ]
    }
]
formatted_prompt = processor.apply_chat_template(messages, add_generation_prompt=True)

# Generate bounding box coordinates [ymin, xmin, ymax, xmax] normalized 0-1000
result = generate(model, processor, prompt=formatted_prompt, image=image_path, verbose=False)
print("Detected bounding box:", result.text)

Performance Benchmarks

Measured Benchmarks (Apple M1)

Metric 4-bit
Tokens/sec 25.0
TTFT 150.0 ms
Peak Memory 1439.4 MB

Benchmarked on Apple M1 with 8GB unified memory. Average over 5 runs with 20 max tokens.


Multi-Quantization Comparison

Evaluate your hardware budget and choose the optimal precision:

Variant Disk Size VRAM Footprint Target Apple Silicon Hardware Key Advantage
4-bit MLX (This Repository) ~2.0 GB ~2.0 GB M1 / M2 / M3 / M4 (8GB+) Maximum generation speed and lowest RAM overhead.
8-bit MLX ~3.6 GB ~3.6 GB M1 / M2 / M3 / M4 Pro/Max (16GB+) Balanced accuracy and generation speed; near-lossless reasoning.
16-bit MLX ~6.8 GB ~6.8 GB M2 / M3 / M4 Max/Ultra (32GB+) Full unquantized precision; reference evaluation quality.

Who Should Use This?

Your Hardware Recommended Quantization
M1/M2/M3/M4 (8GB – 16GB) 4-bit β€” Best balance of speed, low memory, and multitasking capability
M1/M2/M3/M4 Pro/Max (18GB – 36GB) 8-bit β€” Higher quality reasoning with comfortable memory headroom
M1/M2/M3/M4 Max/Ultra (36GB – 192GB) 16-bit β€” Unquantized full precision, zero quality degradation

General guidance:

  • Use 4-bit if you want to run this model alongside IDEs, browsers, and background development tools.
  • Use 8-bit if you have 16GB+ unified memory and require superior reasoning and code accuracy.
  • Use 16-bit for research, benchmarking, evaluation, or high-end workstation deployments.

Other Quantization Variants


LM Studio & Local Inference Setup Guide

To prevent runaway loops and ensure correct conversational turn-taking, configure custom stop tokens in your local inference runtime:

  1. <|im_start|>
  2. <|im_end|>
  3. <|endoftext|>

Prompt Template Formatting

  • System Prefix: <|im_start|>system\n
  • System Suffix: <|im_end|>\n
  • User Prefix: <|im_start|>user\n
  • Assistant Suffix: <|im_end|>\n<|im_start|>assistant\n

Ollama Quickstart

FROM SirSahOl/LocateAnything-3B-mlx-4bit
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"
PARAMETER temperature 0.7
ollama create locateanything-3b-mlx-4bit -f Modelfile
ollama run locateanything-3b-mlx-4bit

Conversion Details

Property Value
Source Model nvidia/LocateAnything-3B
Quantization 4-bit
mlx-lm Version N/A
Conversion Time 14.27s
Output Size 2.4 GB
Date 2026-10-14T09:20:31.824464+00:00

Reproduction

To reproduce this conversion:

pip install mlx-lm==latest
python3 -m mlx_vlm convert --hf-path nvidia/LocateAnything-3B --mlx-path output/LocateAnything-3B-mlx-4bit --trust-remote-code -q --q-bits 4 --q-group-size 64

Limitations & Known Issues

  • 4-bit group-wise quantization introduces minor precision loss compared to unquantized weights; for deep mathematical derivations or precision-critical reasoning, test the 8-bit or 16-bit variants.
  • High context sequences (>32K tokens) require sufficient unified memory headroom; ensure unified memory is not overcommitted.
  • This is a weight-only MLX conversion designed specifically for Apple Silicon GPUs (M1/M2/M3/M4 series).

License

This model conversion inherits the license of the source model: other.

See the original model card for full license details.


Changelog

Version Date Changes
v1.0 2026-10-14 Initial conversion

Converted with MLX Foundry β€” a professional pipeline for converting models to Apple MLX format.

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

4-bit

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

Model tree for SirSahOl/LocateAnything-3B-mlx-4bit

Base model

Qwen/Qwen2.5-3B
Quantized
(29)
this model

Space using SirSahOl/LocateAnything-3B-mlx-4bit 1

Collection including SirSahOl/LocateAnything-3B-mlx-4bit