Instructions to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes 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-DPOStopMistakes 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-DPOStopMistakes", 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-DPOStopMistakes", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes", 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-DPOStopMistakes 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-DPOStopMistakes" # 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-DPOStopMistakes", "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-DPOStopMistakes
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes 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-DPOStopMistakes" \ --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-DPOStopMistakes", "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-DPOStopMistakes" \ --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-DPOStopMistakes", "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-DPOStopMistakes with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes
LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes
- Name:
LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes(formerlyLFM3-VL-2B-MobileAgent-v4.3-dpo2; see the naming guide) - Status: Development model: kept so results can be reproduced, not recommended. Use
LFM3-VL-2B-MobileAgentinstead - Initialised from:
LFM3-VL-2B-MobileAgent-Dev-OwnHistory - Recipe builds on:
LFM3-VL-2B-MobileAgent-Dev-OwnHistory - What was added: DPO on 851 balanced stop / copied-intent mistakes
Round 5 (post-hoc fix of the DPOAllMistakes model): OwnHistory trained to prefer the human step over its own mistakes. Learns from its own attempts: the contrast between its own wrong step and the right step at the same screen.
| Start | OwnHistory (merged weights) |
| Method | Step-level DPO (ฮฒ 0.1, lr 1e-5) + 1.0 ร SFT on the preferred step; new language-only LoRA r64/ฮฑ128 merged into the weights (adapter in lora_adapter/); vision tower and projector frozen |
| Data | OwnHistory decoded its own training rows greedily; where it stopped too early, missed a stop, or copied its previous intent, the pair is human step (preferred) vs its own step (rejected): 851 balanced pairs (DPOAllMistakes used all 4,163 mistakes and collapsed whole action types). No environment, teacher model or benchmark data |
| Phone format | 4-bit GGUF: LFM3-VL-2B-MobileAgent-Dev-DPOStopMistakes-GGUF |
| Status | Failed its online gate (round 5); use Main (the main model) or OwnHistory. AndroidWorld seed 30: 21/116 vs OwnHistory's 18, a +3 gain that is inside run-to-run noise (two identical OwnHistory runs differ on 9 tasks), and it did not reduce false completes (28 vs 22โ25). Kept public as a documented negative result |
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
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)
Evaluation
Pre-registered round 5 (gates fixed on 2026-11-22 before training). Offline gate passed, online gate failed.
| Offline (gate) | OwnHistory | DPOStopMistakes | Threshold |
|---|---|---|---|
| Parse rate | 1.000 | 1.000 | โฅ 0.99 |
| AndroidControl test, high-level step accuracy | 0.732 | 0.728 | โฅ 0.712 |
AndroidControl terminal complete accuracy |
0.738 | 0.785 | โฅ 0.70 |
Dev answer / dev complete |
0.868 / 0.812 | 0.875 / 0.838 | โฅ 0.848 / โ |
| AndroidWorld seed 30 (116 tasks, development) | OwnHistory | DPOStopMistakes | Threshold |
|---|---|---|---|
| Successes | 18 (replicate: 19) | 21 | net gain โฅ 9 over OwnHistory โ +3, fail |
False complete (ended "done", checker says no) |
25 (replicate: 22) | 28 | โค 15 with โฅ 16 successes โ fail |
- The offline gain at the last step did not show up online: on the AndroidWorld emulator its stopping is indistinguishable from OwnHistory's (false
complete26 vs 25 on the tasks neither run crashed, p = 1.0). - Its +3 is noise-level: paired McNemar p = 0.55; against the identical OwnHistory replicate it is +2 (p = 0.69).
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.
- Not better than OwnHistory on AndroidWorld; not evaluated on MobileWorld or sealed seeds.
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
- 19