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-AndroidControlOnly 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-AndroidControlOnly 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-AndroidControlOnly", 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-AndroidControlOnly", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly", 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-AndroidControlOnly 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-AndroidControlOnly" # 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-AndroidControlOnly", "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-AndroidControlOnly
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly 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-AndroidControlOnly" \ --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-AndroidControlOnly", "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-AndroidControlOnly" \ --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-AndroidControlOnly", "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-AndroidControlOnly with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly
Rename to the MobileAgent naming scheme (formerly LFM3-VL-2B-MobileAgent-v1); card rewritten
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ library_name: transformers
|
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
datasets:
|
| 11 |
-
- experimentalmachines/MobileAgent-SFT-
|
| 12 |
tags:
|
| 13 |
- android
|
| 14 |
- gui-agent
|
|
@@ -17,7 +17,12 @@ tags:
|
|
| 17 |
- lora
|
| 18 |
---
|
| 19 |
|
| 20 |
-
# LFM3-VL-2B-MobileAgent-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
The first LFM3 Mobile Agent: [LiquidAI/LFM3-VL-2B](https://huggingface.co/LiquidAI/LFM3-VL-2B) fine-tuned on AndroidControl only to operate an Android phone from one screenshot per step.
|
| 23 |
|
|
@@ -26,15 +31,15 @@ The first LFM3 Mobile Agent: [LiquidAI/LFM3-VL-2B](https://huggingface.co/Liquid
|
|
| 26 |
| Base | LiquidAI/LFM3-VL-2B |
|
| 27 |
| Method | LoRA SFT (rank 64, alpha 128) on the language model, vision tower frozen; merged into the weights (adapter in `lora_adapter/`) |
|
| 28 |
| Training | 1,250 steps × 32 rows, lr 2e-4 (Modal GPU) |
|
| 29 |
-
| Data | [MobileAgent-SFT-
|
| 30 |
-
| Phone format | 4-bit GGUF: [LFM3-VL-2B-MobileAgent-
|
| 31 |
-
| Status | **Superseded** by
|
| 32 |
|
| 33 |
## Evaluation
|
| 34 |
|
| 35 |
One run each, temperature 0, 4-bit GGUF; exceptions count as failures.
|
| 36 |
|
| 37 |
-
| Benchmark |
|
| 38 |
|---|---|---|
|
| 39 |
| AndroidWorld held-out seeds 7 / 1234 / 2026 (348 tasks) | 32 (11 / 10 / 11) | 54 |
|
| 40 |
| AndroidWorld seed 30 (116 tasks, development) | 15 (base model: 1) | 18 |
|
|
@@ -44,11 +49,11 @@ One run each, temperature 0, 4-bit GGUF; exceptions count as failures.
|
|
| 44 |
| MMStar / MMLU (base 52.1% / 48.9%) | 57.1% / 49.5% | 52.9% / 50.4% |
|
| 45 |
| Apple M5 GPU, median seconds per step | 2.66 | 2.96 |
|
| 46 |
|
| 47 |
-
- **Strong at single actions, never answers:** AndroidControl has no answer supervision, so
|
| 48 |
and fails every question task.
|
| 49 |
- **Loops:** a third of its AndroidWorld steps are `wait` under an intent that is not about waiting, a pattern
|
| 50 |
-
copied from AndroidControl's labels (fixed later, in
|
| 51 |
-
-
|
| 52 |
|
| 53 |
## Input and output
|
| 54 |
|
|
@@ -59,7 +64,7 @@ One run each, temperature 0, 4-bit GGUF; exceptions count as failures.
|
|
| 59 |
| Output | `<think>short intent</think>` followed by one compact JSON action; coordinates are integers on a 0–1000 grid |
|
| 60 |
| Decoding | Thinking on, temperature 0 |
|
| 61 |
|
| 62 |
-
<details><summary>System prompt (
|
| 63 |
|
| 64 |
```
|
| 65 |
You are a phone-use agent operating an Android phone to complete the user's goal.
|
|
|
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
datasets:
|
| 11 |
+
- experimentalmachines/MobileAgent-SFT-AndroidControl
|
| 12 |
tags:
|
| 13 |
- android
|
| 14 |
- gui-agent
|
|
|
|
| 17 |
- lora
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly
|
| 21 |
+
|
| 22 |
+
- **Name:** `LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly` (formerly `LFM3-VL-2B-MobileAgent-v1`; see the [naming guide](https://github.com/ExperimentalMachines/lfm3-mobile-agent/blob/main/docs/naming.md))
|
| 23 |
+
- **Status:** **Development checkpoint**: kept so results can be reproduced, **not recommended**. Use [`LFM3-VL-2B-MobileAgent`](https://huggingface.co/experimentalmachines/LFM3-VL-2B-MobileAgent) instead
|
| 24 |
+
- **Built on:** the base model
|
| 25 |
+
- **What was added:** SFT on AndroidControl only (official train episodes)
|
| 26 |
|
| 27 |
The first LFM3 Mobile Agent: [LiquidAI/LFM3-VL-2B](https://huggingface.co/LiquidAI/LFM3-VL-2B) fine-tuned on AndroidControl only to operate an Android phone from one screenshot per step.
|
| 28 |
|
|
|
|
| 31 |
| Base | LiquidAI/LFM3-VL-2B |
|
| 32 |
| Method | LoRA SFT (rank 64, alpha 128) on the language model, vision tower frozen; merged into the weights (adapter in `lora_adapter/`) |
|
| 33 |
| Training | 1,250 steps × 32 rows, lr 2e-4 (Modal GPU) |
|
| 34 |
+
| Data | [MobileAgent-SFT-AndroidControl](https://huggingface.co/datasets/experimentalmachines/MobileAgent-SFT-AndroidControl): AndroidControl's official train split, 99,216 rows |
|
| 35 |
+
| Phone format | 4-bit GGUF: [LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly-GGUF](https://huggingface.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly-GGUF) |
|
| 36 |
+
| Status | **Superseded** by Main. Kept as the baseline in the held-out comparison |
|
| 37 |
|
| 38 |
## Evaluation
|
| 39 |
|
| 40 |
One run each, temperature 0, 4-bit GGUF; exceptions count as failures.
|
| 41 |
|
| 42 |
+
| Benchmark | AndroidControlOnly | Main (later) |
|
| 43 |
|---|---|---|
|
| 44 |
| AndroidWorld held-out seeds 7 / 1234 / 2026 (348 tasks) | 32 (11 / 10 / 11) | 54 |
|
| 45 |
| AndroidWorld seed 30 (116 tasks, development) | 15 (base model: 1) | 18 |
|
|
|
|
| 49 |
| MMStar / MMLU (base 52.1% / 48.9%) | 57.1% / 49.5% | 52.9% / 50.4% |
|
| 50 |
| Apple M5 GPU, median seconds per step | 2.66 | 2.96 |
|
| 51 |
|
| 52 |
+
- **Strong at single actions, never answers:** AndroidControl has no answer supervision, so AndroidControlOnly never emits `answer`
|
| 53 |
and fails every question task.
|
| 54 |
- **Loops:** a third of its AndroidWorld steps are `wait` under an intent that is not about waiting, a pattern
|
| 55 |
+
copied from AndroidControl's labels (fixed later, in WaitRelabel).
|
| 56 |
+
- Main − AndroidControlOnly on the held-out seeds: +6.3 points (95% CI +1.1 to +11.5, p = 0.02).
|
| 57 |
|
| 58 |
## Input and output
|
| 59 |
|
|
|
|
| 64 |
| Output | `<think>short intent</think>` followed by one compact JSON action; coordinates are integers on a 0–1000 grid |
|
| 65 |
| Decoding | Thinking on, temperature 0 |
|
| 66 |
|
| 67 |
+
<details><summary>System prompt (the earlier Dev models (AndroidControlOnly, MultiSource, FilledIntents) format)</summary>
|
| 68 |
|
| 69 |
```
|
| 70 |
You are a phone-use agent operating an Android phone to complete the user's goal.
|