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-MemGUIChangeNotes 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-MemGUIChangeNotes 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-MemGUIChangeNotes", 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-MemGUIChangeNotes", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MemGUIChangeNotes", 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-MemGUIChangeNotes 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-MemGUIChangeNotes" # 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-MemGUIChangeNotes", "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-MemGUIChangeNotes
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MemGUIChangeNotes 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-MemGUIChangeNotes" \ --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-MemGUIChangeNotes", "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-MemGUIChangeNotes" \ --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-MemGUIChangeNotes", "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-MemGUIChangeNotes with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MemGUIChangeNotes
model card (round 6, not promoted)
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: lfm1.0
|
| 4 |
+
license_link: LICENSE
|
| 5 |
+
base_model: LiquidAI/LFM3-VL-2B
|
| 6 |
+
pipeline_tag: image-text-to-text
|
| 7 |
+
library_name: transformers
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
+
tags:
|
| 11 |
+
- android
|
| 12 |
+
- gui-agent
|
| 13 |
+
- mobile-agent
|
| 14 |
+
- screenshot
|
| 15 |
+
- lora
|
| 16 |
+
---
|
| 17 |
+
# LFM3-VL-2B-MobileAgent-v4.4-B
|
| 18 |
+
|
| 19 |
+
A 2B screenshot-only Android agent from round 6 of [LFM3 Mobile Agent](https://github.com/experimentalmachines/lfm3-mobile-agent): A's data and recipe, plus a " [no visible change]" note on history steps whose next screenshot did not change (the run-time rule of the project's AndroidWorld agent). Use the same notes at run time.
|
| 20 |
+
|
| 21 |
+
**Status: not promoted.** It failed the round's pre-registered offline gate on one check (late-step early stops on
|
| 22 |
+
AndroidControl) and was not run online. [LFM3-VL-2B-MobileAgent-v4](https://huggingface.co/experimentalmachines/LFM3-VL-2B-MobileAgent-v4)
|
| 23 |
+
remains the evaluated model.
|
| 24 |
+
|
| 25 |
+
| | |
|
| 26 |
+
|---|---|
|
| 27 |
+
| Base | LiquidAI/LFM3-VL-2B @ `23387be` |
|
| 28 |
+
| Method | LoRA SFT (rank 64, alpha 128) on the language model, vision tower frozen; merged into the weights (adapter in `lora_adapter/`) |
|
| 29 |
+
| Training | 1,250 steps × 32 rows, lr 2e-4 cosine, one A100: v4's recipe |
|
| 30 |
+
| Data | [MobileAgent-SFT-v4](https://huggingface.co/datasets/experimentalmachines/MobileAgent-SFT-v4) @ `3375539` + [MobileAgent-SFT-v4.4](https://huggingface.co/datasets/experimentalmachines/MobileAgent-SFT-v4.4) @ `2b481ae3` (MemGUI-3K rows, filtered: no AndroidWorld, MobileWorld or AndroidLab apps) |
|
| 31 |
+
| Phone format | None published |
|
| 32 |
+
|
| 33 |
+
## Input and output
|
| 34 |
+
|
| 35 |
+
The same as v4:
|
| 36 |
+
|
| 37 |
+
| Part | Format |
|
| 38 |
+
|---|---|
|
| 39 |
+
| Image | One screenshot per step, resized to at most 880 × 880 px of area |
|
| 40 |
+
| User text | `Goal: …` / `Installed apps: …` / `Previous steps:` (last 8 steps) / `What is the next action?` |
|
| 41 |
+
| Output | `<think>short intent</think>` followed by one compact JSON action, on a 0–1000 grid |
|
| 42 |
+
|
| 43 |
+
<details><summary>System prompt</summary>
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
You are a phone-use agent operating an Android phone to complete the user's goal.
|
| 47 |
+
Each turn you see the goal, the installed apps, your previous steps, and the current screenshot. Reply with ONE next action as JSON.
|
| 48 |
+
Coordinates are integers normalized to 0-1000 (x from left, y from top) of the screenshot.
|
| 49 |
+
Actions:
|
| 50 |
+
{"action_type":"click","point_2d":[x,y]}
|
| 51 |
+
{"action_type":"long_press","point_2d":[x,y]}
|
| 52 |
+
{"action_type":"input_text","text":"..."} (types into the focused field)
|
| 53 |
+
{"action_type":"scroll","direction":"up|down|left|right"} (down = reveal content below)
|
| 54 |
+
{"action_type":"open_app","app_name":"..."} (app_name must be one of the installed apps)
|
| 55 |
+
{"action_type":"navigate_back"}
|
| 56 |
+
{"action_type":"navigate_home"}
|
| 57 |
+
{"action_type":"keyboard_enter"}
|
| 58 |
+
{"action_type":"wait"}
|
| 59 |
+
{"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)
|
| 60 |
+
{"action_type":"status","goal_status":"complete|infeasible"} (finish a goal that asks for no information; never use it instead of answering a question)
|
| 61 |
+
```
|
| 62 |
+
</details>
|
| 63 |
+
|
| 64 |
+
## Offline evaluation
|
| 65 |
+
|
| 66 |
+
- **Setup:** Transformers bf16, greedy, the same pre-rendered splits for v4 and the candidates.
|
| 67 |
+
- **AndroidLens English** (172 long episodes, evaluation only) is a static test with ground-truth history.
|
| 68 |
+
|
| 69 |
+
| Metric | v4.4-B | v4 | Gate bar |
|
| 70 |
+
|---|---|---|---|
|
| 71 |
+
| AndroidControl test, high-level step accuracy | 0.728 | 0.727 | ≥ 0.707 |
|
| 72 |
+
| `dev_answer` / `dev_complete` | 0.890 / 0.713 | 0.890 / 0.763 | ≥ 0.840 / ≥ 0.713 |
|
| 73 |
+
| AndroidControl steps ≥ 4: predicted `status` | 8.75% | 9.0% | ≤ 6.0% |
|
| 74 |
+
| AndroidLens step accuracy at steps ≥ 10 | 0.402 | 0.367 | ≥ 0.347 |
|
| 75 |
+
| AndroidLens step accuracy, all steps | 0.441 | 0.414 | — |
|
| 76 |
+
| AndroidLens `complete` at the real last step | 29.1% | 12.2% | — |
|
| 77 |
+
| MemGUI dev step accuracy | 0.654 | 0.421 | — |
|
| 78 |
+
|
| 79 |
+
- **What improved:** long-task accuracy and stopping at the real end of long tasks.
|
| 80 |
+
- **What did not:** early stops on AndroidControl's late steps, which the round targeted. About half of those are one
|
| 81 |
+
step before the end, where the human demonstrations add a final scroll or wait.
|
| 82 |
+
- **Full record:** [results](https://github.com/experimentalmachines/lfm3-mobile-agent/blob/main/docs/results.md) and
|
| 83 |
+
[preregistration](https://github.com/experimentalmachines/lfm3-mobile-agent/blob/main/docs/PREREG_v44.md).
|
| 84 |
+
|
| 85 |
+
## Limitations
|
| 86 |
+
|
| 87 |
+
- Research model, not promoted. Do not let it act unattended on a phone with real accounts, messages or payments.
|
| 88 |
+
- Not run on AndroidWorld or MobileWorld.
|
| 89 |
+
- English goals, one screenshot per step, no memory beyond the 8-step text history.
|
| 90 |
+
|
| 91 |
+
## License
|
| 92 |
+
|
| 93 |
+
LFM Open License v1.0, inherited from [LiquidAI/LFM3-VL-2B](https://huggingface.co/LiquidAI/LFM3-VL-2B) ([LICENSE](LICENSE)).
|