Image-Text-to-Text
Transformers
TensorBoard
Safetensors
English
lfm3_vl
android
gui-agent
mobile-agent
screenshot
lora
conversational
custom_code
Instructions to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", trust_remote_code=True) 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", trust_remote_code=True, 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", "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/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource 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 "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource" \ --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": "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", "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 "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource" \ --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": "experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", "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 experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource
model card (v2 results)
Browse files
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: LiquidAI/LFM3-VL-2B
|
| 4 |
+
tags: [android, gui-agent, screen-agent, phone, gguf]
|
| 5 |
+
---
|
| 6 |
+
# LFM3-VL-2B AndroidAgent v2
|
| 7 |
+
|
| 8 |
+
Screenshot-only Android phone agent: one screenshot + goal + short text history in, one JSON action out
|
| 9 |
+
(click / long_press / input_text / scroll / open_app / navigate_back / navigate_home / keyboard_enter / wait /
|
| 10 |
+
**answer** / status), coordinates 0-1000. Built to run on phones (llama.cpp GGUF, Q4_K_M).
|
| 11 |
+
|
| 12 |
+
* Merged weights + LoRA adapter: [alpharomercoma/LFM3-VL-2B-AndroidAgent-v2](https://huggingface.co/alpharomercoma/LFM3-VL-2B-AndroidAgent-v2) ·
|
| 13 |
+
Phone GGUF: [alpharomercoma/LFM3-VL-2B-AndroidAgent-v2-GGUF](https://huggingface.co/alpharomercoma/LFM3-VL-2B-AndroidAgent-v2-GGUF)
|
| 14 |
+
* Training data: [`experimentalmachines/AndroidAgent-SFT-v2`](https://huggingface.co/datasets/experimentalmachines/AndroidAgent-SFT-v2) @ `42f7f76364` (AndroidControl 55,936 +
|
| 15 |
+
GUI-Odyssey 9,979 + AMEX 7,072 + ScreenQA 5,995 rows; Codex-audited, screen-disjoint dev splits).
|
| 16 |
+
* Recipe (identical to v1, so v1 is the equal-budget control): LoRA r64/alpha128 on all language-model linear layers,
|
| 17 |
+
lr 2e-4, 1,250 steps x 32 rows, 774,400-pixel image budget, short intent in `<think>`.
|
| 18 |
+
|
| 19 |
+
| Evaluation | v1 (AndroidControl only) | **v2 (this model)** |
|
| 20 |
+
|---|---|---|
|
| 21 |
+
| AndroidControl test step SR, high-level | 0.715 | **0.716** |
|
| 22 |
+
| AndroidControl test step SR, low-level | 0.948 | 0.893 |
|
| 23 |
+
| AndroidControl terminal ('complete') | 0.792 | 0.732 |
|
| 24 |
+
| GUI-Odyssey held-out (test episodes) | 0.269 | **0.644** |
|
| 25 |
+
| AMEX held-out episodes | 0.306 | **0.735** |
|
| 26 |
+
| ScreenQA validation (answer) | 0.000 | **0.764** |
|
| 27 |
+
| AndroidWorld (116 tasks, this GGUF, 1 screenshot/step) | 15/116 (12.9%), 2.7 s/step | running |
|
| 28 |
+
| General knowledge (forced-choice) | mmstar 57.1% (+5.0 pp vs base, p=3e-07); mmlu 49.5% (+0.6 pp vs base, p=0.68) | mmstar 54.6% (+2.5 pp vs base, p=0.018); mmlu 50.9% (+2.0 pp vs base, p=0.085) |
|
| 29 |
+
|
| 30 |
+
v2's lower low-level / terminal numbers are expected: v2 drops AndroidControl's step-hint rows and keeps terminal rows
|
| 31 |
+
only from AndroidControl (unreliable source completion markers were quarantined). Offline step accuracy does not
|
| 32 |
+
transfer proportionally to closed-loop success; AndroidWorld is the deciding test.
|
| 33 |
+
|
| 34 |
+
Serving (llama.cpp): `llama-server -m LFM3-VL-2B-AndroidAgent-v2-Q4_K_M.gguf --mmproj mmproj-LFM3-VL-2B-Q8_0.gguf -c 8192 --image-max-tokens 1024
|
| 35 |
+
--reasoning-format deepseek`. Prompt/action format: `train/agent_format.py` in the lfm3-android project.
|
| 36 |
+
Derivative of LiquidAI/LFM3-VL-2B under its license (lfm1.0). The LoRA is language-model only; the vision projector file is the base model's.
|