Instructions to use OpenMobile-2/OpenMobile-2-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMobile-2/OpenMobile-2-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenMobile-2/OpenMobile-2-27B") 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("OpenMobile-2/OpenMobile-2-27B") model = AutoModelForMultimodalLM.from_pretrained("OpenMobile-2/OpenMobile-2-27B", 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 OpenMobile-2/OpenMobile-2-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenMobile-2/OpenMobile-2-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenMobile-2/OpenMobile-2-27B", "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/OpenMobile-2/OpenMobile-2-27B
- SGLang
How to use OpenMobile-2/OpenMobile-2-27B 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 "OpenMobile-2/OpenMobile-2-27B" \ --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": "OpenMobile-2/OpenMobile-2-27B", "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 "OpenMobile-2/OpenMobile-2-27B" \ --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": "OpenMobile-2/OpenMobile-2-27B", "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 OpenMobile-2/OpenMobile-2-27B with Docker Model Runner:
docker model run hf.co/OpenMobile-2/OpenMobile-2-27B
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ tags:
|
|
| 13 |
|
| 14 |
# Introduction
|
| 15 |
|
| 16 |
-
OpenMobile-2-27B is a mobile GUI agent fine-tuned from [Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B). It completes Android tasks from screenshots, and can call app-native tools when the foreground app exposes them.
|
| 17 |
|
| 18 |
## Results
|
| 19 |
|
|
@@ -29,10 +29,16 @@ OpenMobile-2-27B is a mobile GUI agent fine-tuned from [Qwen3.6-27B](https://hug
|
|
| 29 |
|
| 30 |
## Deploy
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
**vLLM**
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
```bash
|
| 37 |
vllm serve OpenMobile-2/OpenMobile-2-27B \
|
| 38 |
--tensor-parallel-size 2 \
|
|
@@ -45,18 +51,6 @@ vllm serve OpenMobile-2/OpenMobile-2-27B \
|
|
| 45 |
--gdn-prefill-backend triton
|
| 46 |
```
|
| 47 |
|
| 48 |
-
**SGLang**
|
| 49 |
-
|
| 50 |
-
```bash
|
| 51 |
-
python -m sglang.launch_server \
|
| 52 |
-
--model-path OpenMobile-2/OpenMobile-2-27B \
|
| 53 |
-
--tp-size 2 \
|
| 54 |
-
--mem-fraction-static 0.8 \
|
| 55 |
-
--context-length 65536 \
|
| 56 |
-
--reasoning-parser qwen3 \
|
| 57 |
-
--tool-call-parser qwen3_coder \
|
| 58 |
-
--enable-multimodal
|
| 59 |
-
```
|
| 60 |
|
| 61 |
## Citation
|
| 62 |
|
|
|
|
| 13 |
|
| 14 |
# Introduction
|
| 15 |
|
| 16 |
+
OpenMobile-2-27B is a mobile GUI agent fine-tuned from [Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) on [OpenMobile-Data-v2](https://huggingface.co/datasets/OpenMobile-2/OpenMobile-Data-v2). It completes Android tasks from screenshots, and can call app-native tools when the foreground app exposes them.
|
| 17 |
|
| 18 |
## Results
|
| 19 |
|
|
|
|
| 29 |
|
| 30 |
## Deploy
|
| 31 |
|
| 32 |
+
The commands below use a context length of 65536 and tensor parallel 2.
|
| 33 |
|
| 34 |
**vLLM**
|
| 35 |
|
| 36 |
+
We use vLLM 0.19.1.
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
pip install vllm==0.19.1
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
```bash
|
| 43 |
vllm serve OpenMobile-2/OpenMobile-2-27B \
|
| 44 |
--tensor-parallel-size 2 \
|
|
|
|
| 51 |
--gdn-prefill-backend triton
|
| 52 |
```
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
## Citation
|
| 56 |
|