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
Upload eval/lfm3_v2_dev_amex.metrics.json with huggingface_hub
Browse files
eval/lfm3_v2_dev_amex.metrics.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"n_steps": 468,
|
| 3 |
+
"n_episodes": 121,
|
| 4 |
+
"parse_rate": 1.0,
|
| 5 |
+
"type_match": 0.9337606837606838,
|
| 6 |
+
"step_sr": 0.7350427350427351,
|
| 7 |
+
"episode_sr": 0.33884297520661155,
|
| 8 |
+
"per_type": {
|
| 9 |
+
"click": {
|
| 10 |
+
"n": 332,
|
| 11 |
+
"type_match": 0.9578313253012049,
|
| 12 |
+
"step_sr": 0.6897590361445783
|
| 13 |
+
},
|
| 14 |
+
"input_text": {
|
| 15 |
+
"n": 29,
|
| 16 |
+
"type_match": 1.0,
|
| 17 |
+
"step_sr": 1.0
|
| 18 |
+
},
|
| 19 |
+
"navigate_back": {
|
| 20 |
+
"n": 6,
|
| 21 |
+
"type_match": 0.0,
|
| 22 |
+
"step_sr": 0.0
|
| 23 |
+
},
|
| 24 |
+
"navigate_home": {
|
| 25 |
+
"n": 1,
|
| 26 |
+
"type_match": 0.0,
|
| 27 |
+
"step_sr": 0.0
|
| 28 |
+
},
|
| 29 |
+
"scroll": {
|
| 30 |
+
"n": 100,
|
| 31 |
+
"type_match": 0.9,
|
| 32 |
+
"step_sr": 0.86
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
"answer_mean_f1": null,
|
| 36 |
+
"integrity": {
|
| 37 |
+
"complete": true,
|
| 38 |
+
"n_rows": 468,
|
| 39 |
+
"expected": 468,
|
| 40 |
+
"model": "/content/runs/lfm3vl2b-v2mix-lora/merged"
|
| 41 |
+
}
|
| 42 |
+
}
|