Drones can talk.
This repository contains the 8-bit MLX-VLM deployment variant of Miril-DroneVLM-2B-2, Miril.ai's open-weight aerial VLM. Give it an overhead image and an ordinary question such as “What am I looking at?”, “Any people?”, “Choose a place for this parcel,” or “Track the white car.” It returns typed JSON that identifies how the answer should be interpreted.
This is the same four-route model interface as the merged checkpoint, converted for Apple Silicon. See the primary model card for the caption, answer, location, and pointing responses, fixed system contract, precise-point and coarse-direction rules, runnable validation code, WALDO lineage, limitations, and safety requirements.
Methods and citation: Miril-DroneVLM-2B-2: Turning Aerial Detector Labels into a Structured Vision-Language Interface.
Use this variant when you want lower Apple unified-memory use while retaining more weight precision than the 4-bit path. The deployment profile reports measured artifact size, a recommended memory envelope, and full same-case quality deltas.
python -m pip install mlx-vlm huggingface_hub pillow
hf download MirilAI/Miril-DroneVLM-2B-2 mlx_inference.py inference.py router_contract.py --local-dir miril-drone-runtime
python miril-drone-runtime/mlx_inference.py \
--model-id MirilAI/Miril-DroneVLM-2B-2-MLX-8bit \
--image drone_frame.jpg \
--prompt "What am I looking at?"
The helper applies the same fixed system prompt and strict response validator as the CUDA path. Invalid or contradictory coordinates are never returned as dispatch-safe points.
Gemma 4 E2B uses shared key/value layers. The included
shared-KV export audit verifies the expected
tensor-owner layout for this exact MLX artifact; the absence of separate
k_proj, v_proj, and k_norm tensors on sharing layers is intentional.
| Metric | Merged BF16 | MLX 8-bit |
|---|---|---|
| Valid JSON | 100.0% | 100.0% |
| Schema valid | 96.1% | 94.6% |
| Route accuracy | 94.8% | 93.4% |
| Caption / answer F1 | 38.2% | 37.3% |
| Spatial status | 79.2% | 77.9% |
| Precise target retained | 50.2% | 51.2% |
| Point within 100 | 33.4% | 31.0% |
| Coarse direction exact | 35.0% | 32.1% |
| No-target discipline | 93.4% | 92.6% |
| Metric | Merged BF16 | MLX 8-bit |
|---|---|---|
| Valid JSON | 99.9% | 100.0% |
| Schema valid | 99.9% | 100.0% |
| Route accuracy | 99.9% | 100.0% |
| Caption / answer F1 | 38.6% | 37.8% |
| Spatial status | 86.1% | 85.3% |
| Precise target retained | 71.7% | 71.2% |
| Point within 100 | 38.3% | 33.6% |
| Coarse direction exact | 34.4% | 33.0% |
| No-target discipline | 96.3% | 95.6% |
After training, a stricter held-out audit removed pointing rows whose targets fall below the model-visible size threshold, then ran every release artifact on the complete revised validation and test splits. Strict-cleaned rows use only accepted evidence. Coverage-matched rows add evidence-preserving questions on the same held-out images to restore the earlier route and pointing action/status mix; they do not recreate the earlier object-class histogram.
| Metric | Merged BF16 - Strict cleaned test | MLX 8-bit - Strict cleaned test |
|---|---|---|
| Valid JSON | 99.8% | 100.0% |
| Schema valid | 99.8% | 100.0% |
| Route accuracy | 99.8% | 100.0% |
| Reference text F1 | 60.9% | 60.0% |
| Spatial status | 88.0% | 86.1% |
| Coordinate quality | 89.7% | 88.4% |
| Precise target retained | 65.2% | 64.8% |
| Point within 100 | 42.6% | 39.5% |
| No-target discipline | 96.5% | 95.1% |
| Metric | Merged BF16 - Coverage-matched test | MLX 8-bit - Coverage-matched test |
|---|---|---|
| Valid JSON | 99.9% | 100.0% |
| Schema valid | 99.9% | 100.0% |
| Route accuracy | 99.9% | 100.0% |
| Reference text F1 | 64.3% | 63.4% |
| Spatial status | 84.2% | 82.5% |
| Coordinate quality | 84.9% | 83.6% |
| Precise target retained | 63.5% | 62.8% |
| Point within 100 | 42.8% | 39.2% |
| No-target discipline | 96.4% | 95.2% |
| Metric | Merged BF16 - Strict cleaned validation | MLX 8-bit - Strict cleaned validation |
|---|---|---|
| Valid JSON | 99.9% | 100.0% |
| Schema valid | 99.9% | 100.0% |
| Route accuracy | 99.9% | 100.0% |
| Reference text F1 | 59.9% | 59.0% |
| Spatial status | 89.6% | 88.5% |
| Coordinate quality | 89.8% | 88.9% |
| Precise target retained | 65.8% | 65.8% |
| Point within 100 | 39.3% | 35.0% |
| No-target discipline | 96.7% | 96.1% |
| Metric | Merged BF16 - Coverage-matched validation | MLX 8-bit - Coverage-matched validation |
|---|---|---|
| Valid JSON | 99.9% | 100.0% |
| Schema valid | 99.9% | 100.0% |
| Route accuracy | 99.9% | 100.0% |
| Reference text F1 | 62.6% | 61.8% |
| Spatial status | 84.5% | 83.5% |
| Coordinate quality | 84.5% | 83.4% |
| Precise target retained | 60.5% | 60.7% |
| Point within 100 | 38.4% | 33.9% |
| No-target discipline | 96.1% | 95.5% |
Validation supports comparison and model selection; test is the final held-out report. These automated scores measure contract and reference agreement, not flight safety.
Spoken-query results on the primary model card apply to the merged BF16 checkpoint. This deployment variant has not inherited that claim without a separate matched audio evaluation.
The merged and deployment variants use identical cases within each evaluation. Automated scores are regression signals, not safety certification.
The tables below compare MLX and CUDA artifacts on identical complete held-out validation and test cases. Partial runs are excluded. Automated scores are regression signals, not safety certification.
This is a research perception model, not a flight controller or certified safety system. Follow the complete limitations and operational guidance on the primary model card.
Apache License 2.0. See LICENSE and NOTICE.
model-00001-of-00002.safetensors 5.0 GiBmodel-00002-of-00002.safetensors 478 MiB