Skip to content

Manina-4B-HD-1.0 (open weights)

Manina-4B-HD-1.0 (manina-ai/Manina-4B-HD-1.0) is our open-weight 4-billion-parameter visual grounding model built on Qwen/Qwen3.5-4B for localizing UI elements in a single forward pass at a 1,280-token visual budget.

Instead of generating coordinate digits token by token, a lightweight spatial readout head (manina_locator) predicts target presence, normalized bounding box [x1, y1, x2, y2], tap point (x, y), and localization confidence directly over the visual grid, with zero multi-turn zoom-in cropping.

  • Python: 3.10+
  • GPU memory: ~9 GB VRAM in bfloat16 (CUDA), or Apple Silicon unified memory (mps) / CPU in float32
  • Dependencies: standard torch, transformers (with Qwen3_5ForConditionalGeneration), safetensors, and Pillow; no custom CUDA kernels required
Terminal window
pip install torch transformers safetensors pillow huggingface_hub

Download manina_hd.py from the model repository into your working directory.

from PIL import Image
from manina_hd import ManinaHDLocator
locator = ManinaHDLocator.from_pretrained("manina-ai/Manina-4B-HD-1.0")
image = Image.open("screenshot.png")
pred = locator.locate(image, "Settings app icon")
w, h = image.size
px, py = round(pred.point[0] * w), round(pred.point[1] * h)
print(f"Tap pixel: ({px}, {py}) | box={pred.box} | present={pred.present_prob:.3f} | conf={pred.confidence:.3f}")
Parameter Type Default Description
model_name_or_path str "manina-ai/Manina-4B-HD-1.0" Hugging Face Hub repo ID or local directory containing config.json, model-*.safetensors, and locator.safetensors.
device str | None None "cuda", "mps", or "cpu". Auto-detected when None.
dtype torch.dtype | None None Defaults to torch.bfloat16 on CUDA and torch.float32 on MPS/CPU.
device_map str | None None Optional Hugging Face Accelerate device_map (for example "auto").

locator.locate(image, instruction, max_visual_tokens=1280, decode="support_kl")

Section titled “locator.locate(image, instruction, max_visual_tokens=1280, decode="support_kl")”
Parameter Type Default Description
image str | PathLike | PIL.Image required Path to a PNG / JPEG / WebP screenshot or an open PIL.Image.
instruction str required Natural-language description of the single UI element to locate.
max_visual_tokens int 1280 Maximum merged visual token budget (32×32 px per visual token).
decode str "support_kl" Candidate selection mode. Enum values: "support_kl", "support_kl_iou", "argmax", "all".

Coordinates returned by ManinaHDLocator are normalized floats in [0.0, 1.0] relative to image width and height (multiply by (width, height) for pixel coordinates):

{
"point": [0.8974, 0.0557],
"box": [0.8651, 0.0382, 0.9297, 0.0732],
"present_prob": 0.9961,
"iou_prob": 0.9449,
"confidence": 0.9412
}
Field Type Description
point (float, float) Normalized (x, y) centre of box in [0.0, 1.0].
box (float, float, float, float) Normalized [x1, y1, x2, y2] bounding box clamped to [0.0, 1.0].
present_prob float 0 to 1: score indicating whether the target appears on screen.
iou_prob float 0 to 1: predicted IoU quality of the selected candidate box.
confidence float present_prob * iou_prob (0 to 1).

All reported numbers use deterministic, single-pass greedy inference (max_visual_tokens=1280, no zoom-in cropping, no test-time ensembles):

Terminal window
python eval_screenspot_v2.py \
--model manina-ai/Manina-4B-HD-1.0 \
--dataset /path/to/OS-Copilot-ScreenSpot-v2 \
--max-visual-tokens 1280 \
--decode support_kl \
--predictions-out screenspot_v2_predictions.jsonl
Model Params Visual Tokens Mobile Text (290) Mobile Icon (211) Mobile Total (501) Desktop (334) Web (437) All (1,272)
Qwen/Qwen3.5-4B (matched budget) 4B 1,280 99.31% (288) 89.57% (189) 95.21% (477) 93.41% (312) 90.39% (395) 93.08% (1,184)
Qwen/Qwen3.5-4B (high budget) 4B 4,000 99.31% (288) 88.15% (186) 94.61% (474) 94.01% (314) 91.53% (400) 93.40% (1,188)
Manina-4B-HD-1.0 (support_kl) 4B 1,280 99.31% (288) 93.36% (197) 96.81% (485) 94.91% (317) 90.62% (396) 94.18% (1,198)
Manina-4B-HD-1.0 (support_kl_iou) 4B 1,280 99.31% (288) 92.89% (196) 96.61% (484) 95.21% (318) 91.08% (398) 94.34% (1,200)
Feature Manina-4B-HD-1.0 Manina-4B-Lite-1.0
Primary role High-resolution offline grounding & academic benchmarking Low-latency live phone control & hosted production API
Capabilities Locate only: static bounding box + tap point + presence/IoU confidence Locate and Act: bounding box + tap point plus full action prediction (TAP, swipes, TYPE, KEY, BACK, HOME, OPEN, WAIT, DONE), plan-step tracking, and calibrated op_prob handback
Visual budget & speed 1,280 visual tokens (~300 ms warm on Hugging Face ZeroGPU) 640 visual tokens (~72-83 ms P50 /v1/locate · ~113 ms P50 /v1/act on our production stack)
Coordinates Normalized [0.0, 1.0] floats Integer pixels of your uploaded image
License Manina Research License 1.0 (non-commercial research only) Commercial pay-as-you-go API ($0.30 / 1,000 calls, $1 free credit) (API keys →)