Image-Text-to-Text
Transformers
Safetensors
English
gemma4
aerial-vlm
drone
uav
vision-language-model
aerial-imagery
scene-understanding
visual-question-answering
visual-grounding
robotics
edge-ai
structured-output
open-weights
miril
conversational
Instructions to use MirilAI/Miril-DroneVLM-2B-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MirilAI/Miril-DroneVLM-2B-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MirilAI/Miril-DroneVLM-2B-2") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MirilAI/Miril-DroneVLM-2B-2") model = AutoModelForMultimodalLM.from_pretrained("MirilAI/Miril-DroneVLM-2B-2", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MirilAI/Miril-DroneVLM-2B-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MirilAI/Miril-DroneVLM-2B-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MirilAI/Miril-DroneVLM-2B-2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/MirilAI/Miril-DroneVLM-2B-2
- SGLang
How to use MirilAI/Miril-DroneVLM-2B-2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MirilAI/Miril-DroneVLM-2B-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MirilAI/Miril-DroneVLM-2B-2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MirilAI/Miril-DroneVLM-2B-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MirilAI/Miril-DroneVLM-2B-2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use MirilAI/Miril-DroneVLM-2B-2 with Docker Model Runner:
docker model run hf.co/MirilAI/Miril-DroneVLM-2B-2
File size: 14,837 Bytes
774f63b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="1477" viewBox="0 0 1280 1477" role="img">
<rect width="1280" height="1477" fill="#070d12"/>
<text x="58" y="62" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="30" font-weight="700">Miril-DroneVLM-2B-2 deployment comparison</text>
<text x="58" y="96" fill="#c8d0cb" font-family="Arial, sans-serif" font-size="16" font-weight="400">Same held-out visual cases across every response route. Higher is better.</text>
<rect x="58" y="121" width="18" height="18" fill="#9aa6ad"/>
<text x="85" y="136" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="15" font-weight="700">Merged BF16</text>
<rect x="288" y="121" width="18" height="18" fill="#4af082"/>
<text x="315" y="136" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="15" font-weight="700">CUDA bnb8</text>
<rect x="518" y="121" width="18" height="18" fill="#5ac8fa"/>
<text x="545" y="136" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="15" font-weight="700">CUDA bnb4</text>
<rect x="748" y="121" width="18" height="18" fill="#ffd166"/>
<text x="775" y="136" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="15" font-weight="700">MLX 8-bit</text>
<rect x="978" y="121" width="18" height="18" fill="#ff8a65"/>
<text x="1005" y="136" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="15" font-weight="700">MLX 4-bit</text>
<text x="58" y="208" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Valid JSON</text>
<text x="58" y="231" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Strict bare JSON objects</text>
<rect x="360" y="184" width="760" height="16" fill="#17232a"/>
<rect x="360" y="184" width="760.0" height="16" fill="#9aa6ad"/>
<text x="1138" y="198" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">100.0%</text>
<rect x="360" y="209" width="760" height="16" fill="#17232a"/>
<rect x="360" y="209" width="753.5" height="16" fill="#4af082"/>
<text x="1138" y="223" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">99.1%</text>
<rect x="360" y="234" width="760" height="16" fill="#17232a"/>
<rect x="360" y="234" width="735.1" height="16" fill="#5ac8fa"/>
<text x="1138" y="248" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">96.7%</text>
<rect x="360" y="259" width="760" height="16" fill="#17232a"/>
<rect x="360" y="259" width="760.0" height="16" fill="#ffd166"/>
<text x="1138" y="273" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">100.0%</text>
<rect x="360" y="284" width="760" height="16" fill="#17232a"/>
<rect x="360" y="284" width="759.7" height="16" fill="#ff8a65"/>
<text x="1138" y="298" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">100.0%</text>
<text x="58" y="351" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Schema valid</text>
<text x="58" y="374" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Exact keys and allowed values</text>
<rect x="360" y="327" width="760" height="16" fill="#17232a"/>
<rect x="360" y="327" width="730.3" height="16" fill="#9aa6ad"/>
<text x="1138" y="341" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">96.1%</text>
<rect x="360" y="352" width="760" height="16" fill="#17232a"/>
<rect x="360" y="352" width="711.1" height="16" fill="#4af082"/>
<text x="1138" y="366" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">93.6%</text>
<rect x="360" y="377" width="760" height="16" fill="#17232a"/>
<rect x="360" y="377" width="700.0" height="16" fill="#5ac8fa"/>
<text x="1138" y="391" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">92.1%</text>
<rect x="360" y="402" width="760" height="16" fill="#17232a"/>
<rect x="360" y="402" width="719.1" height="16" fill="#ffd166"/>
<text x="1138" y="416" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">94.6%</text>
<rect x="360" y="427" width="760" height="16" fill="#17232a"/>
<rect x="360" y="427" width="424.4" height="16" fill="#ff8a65"/>
<text x="1138" y="441" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">55.8%</text>
<text x="58" y="494" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Route accuracy</text>
<text x="58" y="517" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Correct type plus intent or action</text>
<rect x="360" y="470" width="760" height="16" fill="#17232a"/>
<rect x="360" y="470" width="720.4" height="16" fill="#9aa6ad"/>
<text x="1138" y="484" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">94.8%</text>
<rect x="360" y="495" width="760" height="16" fill="#17232a"/>
<rect x="360" y="495" width="696.3" height="16" fill="#4af082"/>
<text x="1138" y="509" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">91.6%</text>
<rect x="360" y="520" width="760" height="16" fill="#17232a"/>
<rect x="360" y="520" width="692.8" height="16" fill="#5ac8fa"/>
<text x="1138" y="534" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">91.2%</text>
<rect x="360" y="545" width="760" height="16" fill="#17232a"/>
<rect x="360" y="545" width="709.5" height="16" fill="#ffd166"/>
<text x="1138" y="559" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">93.4%</text>
<rect x="360" y="570" width="760" height="16" fill="#17232a"/>
<rect x="360" y="570" width="432.4" height="16" fill="#ff8a65"/>
<text x="1138" y="584" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">56.9%</text>
<text x="58" y="637" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Caption / answer F1</text>
<text x="58" y="660" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Reference content overlap</text>
<rect x="360" y="613" width="760" height="16" fill="#17232a"/>
<rect x="360" y="613" width="290.7" height="16" fill="#9aa6ad"/>
<text x="1138" y="627" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">38.2%</text>
<rect x="360" y="638" width="760" height="16" fill="#17232a"/>
<rect x="360" y="638" width="149.1" height="16" fill="#4af082"/>
<text x="1138" y="652" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">19.6%</text>
<rect x="360" y="663" width="760" height="16" fill="#17232a"/>
<rect x="360" y="663" width="282.4" height="16" fill="#5ac8fa"/>
<text x="1138" y="677" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">37.2%</text>
<rect x="360" y="688" width="760" height="16" fill="#17232a"/>
<rect x="360" y="688" width="283.1" height="16" fill="#ffd166"/>
<text x="1138" y="702" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">37.3%</text>
<rect x="360" y="713" width="760" height="16" fill="#17232a"/>
<rect x="360" y="713" width="266.7" height="16" fill="#ff8a65"/>
<text x="1138" y="727" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">35.1%</text>
<text x="58" y="780" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Spatial status</text>
<text x="58" y="803" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Target, coarse, absent, or ambiguous</text>
<rect x="360" y="756" width="760" height="16" fill="#17232a"/>
<rect x="360" y="756" width="601.8" height="16" fill="#9aa6ad"/>
<text x="1138" y="770" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">79.2%</text>
<rect x="360" y="781" width="760" height="16" fill="#17232a"/>
<rect x="360" y="781" width="482.0" height="16" fill="#4af082"/>
<text x="1138" y="795" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">63.4%</text>
<rect x="360" y="806" width="760" height="16" fill="#17232a"/>
<rect x="360" y="806" width="529.4" height="16" fill="#5ac8fa"/>
<text x="1138" y="820" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">69.7%</text>
<rect x="360" y="831" width="760" height="16" fill="#17232a"/>
<rect x="360" y="831" width="591.9" height="16" fill="#ffd166"/>
<text x="1138" y="845" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">77.9%</text>
<rect x="360" y="856" width="760" height="16" fill="#17232a"/>
<rect x="360" y="856" width="587.2" height="16" fill="#ff8a65"/>
<text x="1138" y="870" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">77.3%</text>
<text x="58" y="923" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Precise target retained</text>
<text x="58" y="946" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Valid precise target when reference is precise</text>
<rect x="360" y="899" width="760" height="16" fill="#17232a"/>
<rect x="360" y="899" width="381.9" height="16" fill="#9aa6ad"/>
<text x="1138" y="913" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">50.2%</text>
<rect x="360" y="924" width="760" height="16" fill="#17232a"/>
<rect x="360" y="924" width="322.6" height="16" fill="#4af082"/>
<text x="1138" y="938" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">42.4%</text>
<rect x="360" y="949" width="760" height="16" fill="#17232a"/>
<rect x="360" y="949" width="403.4" height="16" fill="#5ac8fa"/>
<text x="1138" y="963" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">53.1%</text>
<rect x="360" y="974" width="760" height="16" fill="#17232a"/>
<rect x="360" y="974" width="389.5" height="16" fill="#ffd166"/>
<text x="1138" y="988" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">51.2%</text>
<rect x="360" y="999" width="760" height="16" fill="#17232a"/>
<rect x="360" y="999" width="356.6" height="16" fill="#ff8a65"/>
<text x="1138" y="1013" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">46.9%</text>
<text x="58" y="1066" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Point within 100</text>
<text x="58" y="1089" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Distance on the 0-1000 coordinate plane</text>
<rect x="360" y="1042" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1042" width="254.2" height="16" fill="#9aa6ad"/>
<text x="1138" y="1056" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">33.4%</text>
<rect x="360" y="1067" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1067" width="61.0" height="16" fill="#4af082"/>
<text x="1138" y="1081" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">8.0%</text>
<rect x="360" y="1092" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1092" width="226.1" height="16" fill="#5ac8fa"/>
<text x="1138" y="1106" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">29.7%</text>
<rect x="360" y="1117" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1117" width="235.6" height="16" fill="#ffd166"/>
<text x="1138" y="1131" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">31.0%</text>
<rect x="360" y="1142" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1142" width="190.9" height="16" fill="#ff8a65"/>
<text x="1138" y="1156" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">25.1%</text>
<text x="58" y="1209" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">Coarse direction exact</text>
<text x="58" y="1232" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">Correct 3x3 directional cell</text>
<rect x="360" y="1185" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1185" width="266.2" height="16" fill="#9aa6ad"/>
<text x="1138" y="1199" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">35.0%</text>
<rect x="360" y="1210" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1210" width="71.0" height="16" fill="#4af082"/>
<text x="1138" y="1224" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">9.3%</text>
<rect x="360" y="1235" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1235" width="229.2" height="16" fill="#5ac8fa"/>
<text x="1138" y="1249" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">30.2%</text>
<rect x="360" y="1260" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1260" width="243.9" height="16" fill="#ffd166"/>
<text x="1138" y="1274" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">32.1%</text>
<rect x="360" y="1285" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1285" width="209.4" height="16" fill="#ff8a65"/>
<text x="1138" y="1299" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">27.6%</text>
<text x="58" y="1352" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="17" font-weight="700">No-target discipline</text>
<text x="58" y="1375" fill="#9ba7a1" font-family="Arial, sans-serif" font-size="12" font-weight="400">No coordinates when no target applies</text>
<rect x="360" y="1328" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1328" width="709.7" height="16" fill="#9aa6ad"/>
<text x="1138" y="1342" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">93.4%</text>
<rect x="360" y="1353" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1353" width="680.9" height="16" fill="#4af082"/>
<text x="1138" y="1367" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">89.6%</text>
<rect x="360" y="1378" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1378" width="665.4" height="16" fill="#5ac8fa"/>
<text x="1138" y="1392" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">87.5%</text>
<rect x="360" y="1403" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1403" width="704.1" height="16" fill="#ffd166"/>
<text x="1138" y="1417" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">92.6%</text>
<rect x="360" y="1428" width="760" height="16" fill="#17232a"/>
<rect x="360" y="1428" width="696.1" height="16" fill="#ff8a65"/>
<text x="1138" y="1442" fill="#f4f7f5" font-family="Arial, sans-serif" font-size="14" font-weight="700">91.6%</text>
</svg>
|