Instructions to use experimentalmachines/LFM3-VL-2B-MobileAgent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use experimentalmachines/LFM3-VL-2B-MobileAgent 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", 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", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent", 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 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" # 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", "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
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent 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" \ --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", "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" \ --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", "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 with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent
LFM3-VL-2B-MobileAgent
- Name:
LFM3-VL-2B-MobileAgent(formerlyLFM3-VL-2B-MobileAgent-v4; see the naming guide) - Status: Main model: the recommended model, the one evaluated on the held-out AndroidWorld seeds
- Initialised from: the base model
- Recipe builds on:
LFM3-VL-2B-MobileAgent-Dev-FilledIntents - What was added: the FilledIntents data in the final prompt (answer-vs-complete rules, installed-app list) + navigate-then-answer episodes + shorter ScreenQA answers
The main LFM3 Mobile Agent: LiquidAI/LFM3-VL-2B fine-tuned to operate an Android phone from one screenshot per step. The version evaluated on the held-out AndroidWorld seeds.
| Base | LiquidAI/LFM3-VL-2B @ 23387be |
| Method | LoRA SFT (rank 64, alpha 128) on the language model, vision tower frozen; merged into the weights (adapter in lora_adapter/) |
| Training | 1,250 steps × 32 rows, lr 2e-4 (0.43 epoch of 92,229 rows), one A100 |
| Data | MobileAgent-SFT @ 3375539: FilledIntents rows in the v4 prompt + 2,386 navigate-then-answer episodes + shorter ScreenQA answers |
| Phone format | 4-bit GGUF: LFM3-VL-2B-MobileAgent-GGUF (1.30 GB with its vision projector) |
| Status | Main model. Later versions (the Dev models from WaitRelabel to ContinuedSFT) showed no reliable gain over it |
What changed from FilledIntents
| Change | Why |
|---|---|
Prompt states when to answer vs complete, and lists the installed apps |
the earlier Dev models (AndroidControlOnly, MultiSource, FilledIntents) navigated to the answer, then declared complete; they also invented app names |
| 2,386 navigate-then-answer episodes (questions and answers by Qwen3-VL-8B-Instruct, each confirmed by a second call and a strict typed check) | No public agent dataset teaches answering in the agent format |
| Shorter ScreenQA answers | FilledIntents answered in full sentences |
No AndroidWorld tasks, variants, trajectories or checkers were used in training.
Evaluation
Same harness for every model: one screenshot per step, 4-bit GGUF via llama.cpp (MAI-UI at 8-bit: its 4-bit output degenerates), same step budget, temperature 0; exceptions count as failures. The AndroidWorld comparison was preregistered.
| Benchmark | Main | GUI-Owl-1.5-2B | MAI-UI-2B |
|---|---|---|---|
| AndroidWorld held-out seeds 7 / 1234 / 2026 (348 tasks) | 54 (18 / 17 / 19) | 47 | not run |
| AndroidWorld seed 30 (116 tasks, development) | 18 | 23 | 32 |
| MobileWorld (105 English GUI-only tasks) | 6 | 22 | 11 |
| Phone CPU (Snapdragon 8 Elite Extreme Gen 6), seconds per step as evaluated (MAI-UI 8-bit; GUI-Owl and MAI-UI use larger images; Main's figure is its equal-1,024-token-ceiling run; at the same ceiling GUI-Owl takes ~198 and MAI-UI ~183) | ~39 | ~1,100 | ~1,063 |
| Apple M5 GPU, median model seconds per step (MAI-UI 8-bit) | 2.96 | 7.00 | 9.35 |
- Main vs GUI-Owl on the held-out seeds: +2.0 points, 95% CI [−4.5, +8.6], p = 0.60. Non-inferior at the preregistered −6.9-point margin; superiority is not shown.
- The lead comes from templates whose goal text cannot change with the seed. On the 78 templates whose goal text does change, Main and GUI-Owl are level (32 vs 33).
- MobileWorld: GUI-Owl is clearly better (p = 3 × 10⁻⁵).
- Offline: AndroidControl test high- / low-level step accuracy 0.728 / 0.908; strict answer match on 136 held-out questions 0.868, with 0 false answers on 80 action-goal controls; MMStar / MMLU 52.9% / 50.4% (no significant change from the base model).
- Answers 6 of the 25 question tasks on seed 30 (the earlier Dev models (AndroidControlOnly, MultiSource, FilledIntents): 0).
Input and output
| Part | Format |
|---|---|
| Image | One screenshot per step, resized to at most 880 × 880 px of area (about 720 image tokens) |
| User text | Goal: … / Installed apps: … / Previous steps: (last 8 steps as n. <intent> -> <action JSON>, or None) / What is the next action? |
| Output | <think>short intent</think> followed by one compact JSON action; coordinates are integers on a 0–1000 grid |
| Decoding | Thinking on, temperature 0 |
System prompt (Main format)
You are a phone-use agent operating an Android phone to complete the user's goal.
Each turn you see the goal, the installed apps, your previous steps, and the current screenshot. Reply with ONE next action as JSON.
Coordinates are integers normalized to 0-1000 (x from left, y from top) of the screenshot.
Actions:
{"action_type":"click","point_2d":[x,y]}
{"action_type":"long_press","point_2d":[x,y]}
{"action_type":"input_text","text":"..."} (types into the focused field)
{"action_type":"scroll","direction":"up|down|left|right"} (down = reveal content below)
{"action_type":"open_app","app_name":"..."} (app_name must be one of the installed apps)
{"action_type":"navigate_back"}
{"action_type":"navigate_home"}
{"action_type":"keyboard_enter"}
{"action_type":"wait"}
{"action_type":"answer","text":"..."} (if the goal asks a question: the final reply, as short as possible and in the requested format; ends the task)
{"action_type":"status","goal_status":"complete|infeasible"} (finish a goal that asks for no information; never use it instead of answering a question)
Limitations
- Research model. Do not let it act unattended on a phone with real accounts, messages or payments.
- English goals, one screenshot per step, no memory beyond the 8-step text history.
- Trained only on recorded demonstrations; it has never interacted with a live phone during training.
Project
Code, data builders, benchmark harnesses and every result with its source: experimentalmachines/lfm3-mobile-agent (see models and results).
License
LFM Open License v1.0, inherited from LiquidAI/LFM3-VL-2B (LICENSE).
- Downloads last month
- 21
Model tree for experimentalmachines/LFM3-VL-2B-MobileAgent
Base model
LiquidAI/LFM3-1.7B-Base