Instructions to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-FullMix 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-FullMix 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-FullMix", 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-FullMix", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-FullMix", 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-FullMix 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-FullMix" # 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-FullMix", "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-FullMix
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-FullMix 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-FullMix" \ --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-FullMix", "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-FullMix" \ --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-FullMix", "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-FullMix with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-FullMix
LFM3-VL-2B-MobileAgent-Dev-FullMix
- Name:
LFM3-VL-2B-MobileAgent-Dev-FullMix(formerlyLFM3-VL-2B-MobileAgent-v4.5-D; see the naming guide) - Status: Development model: kept so results can be reproduced, not recommended. Use
LFM3-VL-2B-MobileAgentinstead - Initialised from: the base model
- Recipe builds on:
LFM3-VL-2B-MobileAgent - What was added: one pass over all candidate sources, 24-step history, change notes
A 2B screenshot-only Android agent from round 7 of LFM3 Mobile Agent: one full pass over MobileAgent-SFT-FullMix (173,430 rows, about twice Main's data), with a 24-step text history and "[no visible change]" notes.
Status: not promoted. It failed one check of the round's pre-registered offline gate: it says status two or more
steps before the end of AndroidControl episodes more often than Main (3.64% vs 2.74%; bar 3.24%). An exploratory
AndroidWorld run (outside the gate) is below. LFM3-VL-2B-MobileAgent remains
the evaluated model.
| 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 | 5,420 steps ร 32 rows (one pass), lr 2e-4 cosine, no gradient checkpointing; one H100, 3.4 h |
| Data | MobileAgent-SFT-FullMix @ 45331aaa: all AndroidControl rows, uncapped GUI-Odyssey and AMEX (blank intents filled from Aguvis), MemGUI-3K, ScreenQA |
| Phone format | 4-bit GGUF: LFM3-VL-2B-MobileAgent-Dev-FullMix-GGUF (Q4_K_M + vision projector) |
Input and output
| Part | Format |
|---|---|
| Image | One screenshot per step, resized to at most 880 ร 880 px of area |
| User text | Goal: โฆ / Installed apps: โฆ / Previous steps: (last 24 steps; [no visible change] after a step whose next screenshot did not change) / What is the next action? |
| Output | <think>short intent</think> followed by one compact JSON action, on a 0โ1000 grid |
Use the same history window and notes at run time (AndroidWorld harness: --history_steps 24 --nochange_notes).
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)
Offline evaluation
Transformers bf16, greedy. FullMix on its own prompt format; Main on its own (8-step) format, same evaluator.
| Metric | FullMix | Main | Gate bar |
|---|---|---|---|
| AndroidControl test, high-level step accuracy | 0.753 | 0.727 | โฅ 0.707 |
dev_answer / dev_complete |
0.882 / 0.800 | 0.890 / 0.763 | โฅ 0.840 / โฅ 0.713 |
AndroidControl: status โฅ 2 steps before the end |
3.64% | 2.74% | โค 3.24% (fail) |
| AndroidLens step accuracy at steps โฅ 10 | 0.471 | 0.367 | โฅ 0.367 |
| AndroidLens step accuracy, all steps | 0.507 | 0.414 | โ |
AndroidLens complete at the real last step |
57.6% | 12.2% | โ |
| MemGUI dev step accuracy | 0.697 | 0.421 | โ |
| Validation loss (AndroidControl val, Main's format) | 0.252 | 0.306 | โ |
- Stronger almost everywhere offline, most on long tasks and on stopping at the real end.
- But it stops early more often: on the same AndroidControl rows it says
statuswhere Main continues 114 times, the reverse 52 times (p < 0.0001). Early stopping is the main online failure of these models, so it was not run online as a confirmatory test. - Full record: results and preregistration.
Exploratory AndroidWorld run (not part of the gate)
Seed 30, 116 tasks, 4-bit GGUF on a Mac emulator (owner-requested exception after the offline gate).
| Main | FullMix | |
|---|---|---|
| Successes | 18 | 21 (paired p = 0.61) |
| False completes | 25 | 27 |
| Share of steps spent waiting | 29.1% | 16.9% |
Its successor Counterfactual targets the false completes.
Limitations
- Research model, not promoted. Do not let it act unattended on a phone with real accounts, messages or payments.
- Not run on MobileWorld; AndroidWorld only as the exploratory run above.
- English goals, one screenshot per step, memory limited to the 24-step text history.
License
LFM Open License v1.0, inherited from LiquidAI/LFM3-VL-2B (LICENSE).
- Downloads last month
- 30