Instructions to use MirilAI/Miril-DroneVLM-2B-2-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MirilAI/Miril-DroneVLM-2B-2-MLX-8bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("MirilAI/Miril-DroneVLM-2B-2-MLX-8bit") config = load_config("MirilAI/Miril-DroneVLM-2B-2-MLX-8bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use MirilAI/Miril-DroneVLM-2B-2-MLX-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MirilAI/Miril-DroneVLM-2B-2-MLX-8bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MirilAI/Miril-DroneVLM-2B-2-MLX-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MirilAI/Miril-DroneVLM-2B-2-MLX-8bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MirilAI/Miril-DroneVLM-2B-2-MLX-8bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MirilAI/Miril-DroneVLM-2B-2-MLX-8bit
Run Hermes
hermes
- OpenClaw new
How to use MirilAI/Miril-DroneVLM-2B-2-MLX-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MirilAI/Miril-DroneVLM-2B-2-MLX-8bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MirilAI/Miril-DroneVLM-2B-2-MLX-8bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Miril-DroneVLM-2B-2-MLX-8bit
The balanced Apple Silicon edition of Miril-DroneVLM-2B-2
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.
Deployment Profile
- Artifact size: 5.49 GiB
- Recommended starting envelope: 8.5 GiB free unified memory
- Estimate covers model weights plus practical single-image runtime headroom; larger images, batching, long generations, and server overhead need more.
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.
Run It
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.
Export Integrity
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.
Complete Benchmark
| 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% |
Complete held-out validation
| 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% |
Cleaned held-out deployment audit
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.
Final held-out test
Strict-cleaned evidence
| 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% |
Coverage-matched evidence
| 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% |
Validation
Strict-cleaned evidence
| 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% |
Coverage-matched evidence
| 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.
Limits And Safety
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.
License
Apache License 2.0. See LICENSE and NOTICE.
- Downloads last month
- 11
8-bit