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-MultiSource 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-MultiSource 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-MultiSource", 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-MultiSource", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource", 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-MultiSource 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-MultiSource" # 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-MultiSource", "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-MultiSource
- SGLang
How to use experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource 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-MultiSource" \ --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-MultiSource", "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-MultiSource" \ --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-MultiSource", "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-MultiSource with Docker Model Runner:
docker model run hf.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource
Rename to the MobileAgent naming scheme (formerly LFM3-VL-2B-MobileAgent-v2); 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,22 +17,27 @@ tags:
|
|
| 17 |
- lora
|
| 18 |
---
|
| 19 |
|
| 20 |
-
# LFM3-VL-2B-MobileAgent-
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
| | |
|
| 25 |
|---|---|
|
| 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 (Colab GPU) |
|
| 29 |
-
| Data | [MobileAgent-SFT-
|
| 30 |
-
| Phone format | 4-bit GGUF: [LFM3-VL-2B-MobileAgent-
|
| 31 |
| Status | **Superseded; do not use.** It collapsed on AndroidWorld (3/116) |
|
| 32 |
|
| 33 |
## Evaluation
|
| 34 |
|
| 35 |
-
| Benchmark |
|
| 36 |
|---|---|---|
|
| 37 |
| AndroidWorld seed 30 (116 tasks, development) | **3** | 15 |
|
| 38 |
| AndroidControl test, high- / low-level step accuracy | 0.716 / 0.893 | 0.715 / 0.948 |
|
|
@@ -41,9 +46,9 @@ v1's recipe on a broader mix: AndroidControl plus GUI-Odyssey, AMEX and ScreenQA
|
|
| 41 |
| MMStar / MMLU | 54.6% / 50.9% | 57.1% / 49.5% |
|
| 42 |
|
| 43 |
- **Offline gains, online collapse:** large gains on the new dev splits, but AndroidWorld fell from 15 to 3
|
| 44 |
-
(
|
| 45 |
- **Suspected cause:** 8,739 training rows had a blank intent, and 30.4% of its AndroidWorld steps had an empty
|
| 46 |
-
intent. Forcing a one-line intent at inference gave 6/116 (+3 / −0, p = 0.25).
|
| 47 |
|
| 48 |
## Input and output
|
| 49 |
|
|
@@ -54,7 +59,7 @@ v1's recipe on a broader mix: AndroidControl plus GUI-Odyssey, AMEX and ScreenQA
|
|
| 54 |
| Output | `<think>short intent</think>` followed by one compact JSON action; coordinates are integers on a 0–1000 grid |
|
| 55 |
| Decoding | Thinking on, temperature 0 |
|
| 56 |
|
| 57 |
-
<details><summary>System prompt (
|
| 58 |
|
| 59 |
```
|
| 60 |
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-MultiSource
|
| 12 |
tags:
|
| 13 |
- android
|
| 14 |
- gui-agent
|
|
|
|
| 17 |
- lora
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# LFM3-VL-2B-MobileAgent-Dev-MultiSource
|
| 21 |
|
| 22 |
+
- **Name:** `LFM3-VL-2B-MobileAgent-Dev-MultiSource` (formerly `LFM3-VL-2B-MobileAgent-v2`; 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:** [`LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly`](https://huggingface.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-AndroidControlOnly)
|
| 25 |
+
- **What was added:** + GUI-Odyssey, AMEX, ScreenQA (8,739 rows with a blank intent)
|
| 26 |
+
|
| 27 |
+
AndroidControlOnly's recipe on a broader mix: AndroidControl plus GUI-Odyssey, AMEX and ScreenQA.
|
| 28 |
|
| 29 |
| | |
|
| 30 |
|---|---|
|
| 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 (Colab GPU) |
|
| 34 |
+
| Data | [MobileAgent-SFT-MultiSource](https://huggingface.co/datasets/experimentalmachines/MobileAgent-SFT-MultiSource) @ `42f7f763`: AndroidControl 55,936 · GUI-Odyssey 9,979 · AMEX 7,072 · ScreenQA 5,995 rows |
|
| 35 |
+
| Phone format | 4-bit GGUF: [LFM3-VL-2B-MobileAgent-Dev-MultiSource-GGUF](https://huggingface.co/experimentalmachines/LFM3-VL-2B-MobileAgent-Dev-MultiSource-GGUF) |
|
| 36 |
| Status | **Superseded; do not use.** It collapsed on AndroidWorld (3/116) |
|
| 37 |
|
| 38 |
## Evaluation
|
| 39 |
|
| 40 |
+
| Benchmark | MultiSource | AndroidControlOnly |
|
| 41 |
|---|---|---|
|
| 42 |
| AndroidWorld seed 30 (116 tasks, development) | **3** | 15 |
|
| 43 |
| AndroidControl test, high- / low-level step accuracy | 0.716 / 0.893 | 0.715 / 0.948 |
|
|
|
|
| 46 |
| MMStar / MMLU | 54.6% / 50.9% | 57.1% / 49.5% |
|
| 47 |
|
| 48 |
- **Offline gains, online collapse:** large gains on the new dev splits, but AndroidWorld fell from 15 to 3
|
| 49 |
+
(AndroidControlOnly-only 11 tasks, MultiSource-only 0, p = 0.001).
|
| 50 |
- **Suspected cause:** 8,739 training rows had a blank intent, and 30.4% of its AndroidWorld steps had an empty
|
| 51 |
+
intent. Forcing a one-line intent at inference gave 6/116 (+3 / −0, p = 0.25). FilledIntents fixed the data.
|
| 52 |
|
| 53 |
## Input and output
|
| 54 |
|
|
|
|
| 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 (the earlier Dev models (AndroidControlOnly, MultiSource, FilledIntents) format)</summary>
|
| 63 |
|
| 64 |
```
|
| 65 |
You are a phone-use agent operating an Android phone to complete the user's goal.
|