Image-Text-to-Text
Transformers
Safetensors
English
qwen2_vl
multimodal
gui
conversational
Eval Results
text-generation-inference
Instructions to use ByteDance-Seed/UI-TARS-2B-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance-Seed/UI-TARS-2B-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ByteDance-Seed/UI-TARS-2B-SFT") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ByteDance-Seed/UI-TARS-2B-SFT") model = AutoModelForImageTextToText.from_pretrained("ByteDance-Seed/UI-TARS-2B-SFT") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ByteDance-Seed/UI-TARS-2B-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ByteDance-Seed/UI-TARS-2B-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/UI-TARS-2B-SFT", "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/ByteDance-Seed/UI-TARS-2B-SFT
- SGLang
How to use ByteDance-Seed/UI-TARS-2B-SFT 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 "ByteDance-Seed/UI-TARS-2B-SFT" \ --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": "ByteDance-Seed/UI-TARS-2B-SFT", "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 "ByteDance-Seed/UI-TARS-2B-SFT" \ --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": "ByteDance-Seed/UI-TARS-2B-SFT", "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 ByteDance-Seed/UI-TARS-2B-SFT with Docker Model Runner:
docker model run hf.co/ByteDance-Seed/UI-TARS-2B-SFT
Commit ·
bc4b4fe
1
Parent(s): 5db3313
update config and readme
Browse files- README.md +1 -0
- preprocessor_config.json +2 -2
README.md
CHANGED
|
@@ -188,6 +188,7 @@ If you find our paper and model useful in your research, feel free to give us a
|
|
| 188 |
@article{uitars2025,
|
| 189 |
author = {Yujia Qin, Yining Ye, Junjie Fang, Haoming Wang, Shihao Liang, Shizuo Tian, Junda Zhang, Jiahao Li, Yunxin Li, Shijue Huang, Wanjun Zhong, Kuanye Li, Jiale Yang, Yu Miao, Woyu Lin, Longxiang Liu, Xu Jiang, Qianli Ma, Jingyu Li, Xiaojun Xiao, Kai Cai, Chuang Li, Yaowei Zheng, Chaolin Jin, Chen Li, Xiao Zhou, Minchao Wang, Haoli Chen, Zhaojian Li, Haihua Yang, Haifeng Liu, Feng Lin, Tao Peng, Xin Liu, Guang Shi},
|
| 190 |
title = {UI-TARS: An End-to-End Framework for Autonomous GUI Agents with System-2 Reasoning and Iterative Reflection Tuning},
|
|
|
|
| 191 |
url = {https://github.com/bytedance/UI-TARS},
|
| 192 |
year = {2025}
|
| 193 |
}
|
|
|
|
| 188 |
@article{uitars2025,
|
| 189 |
author = {Yujia Qin, Yining Ye, Junjie Fang, Haoming Wang, Shihao Liang, Shizuo Tian, Junda Zhang, Jiahao Li, Yunxin Li, Shijue Huang, Wanjun Zhong, Kuanye Li, Jiale Yang, Yu Miao, Woyu Lin, Longxiang Liu, Xu Jiang, Qianli Ma, Jingyu Li, Xiaojun Xiao, Kai Cai, Chuang Li, Yaowei Zheng, Chaolin Jin, Chen Li, Xiao Zhou, Minchao Wang, Haoli Chen, Zhaojian Li, Haihua Yang, Haifeng Liu, Feng Lin, Tao Peng, Xin Liu, Guang Shi},
|
| 190 |
title = {UI-TARS: An End-to-End Framework for Autonomous GUI Agents with System-2 Reasoning and Iterative Reflection Tuning},
|
| 191 |
+
journal = {arXiv preprint arXiv:2501.12326},
|
| 192 |
url = {https://github.com/bytedance/UI-TARS},
|
| 193 |
year = {2025}
|
| 194 |
}
|
preprocessor_config.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
0.26130258,
|
| 15 |
0.27577711
|
| 16 |
],
|
| 17 |
-
"max_pixels":
|
| 18 |
"merge_size": 2,
|
| 19 |
"min_pixels": 3136,
|
| 20 |
"patch_size": 14,
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"resample": 3,
|
| 23 |
"rescale_factor": 0.00392156862745098,
|
| 24 |
"size": {
|
| 25 |
-
"max_pixels":
|
| 26 |
"min_pixels": 3136
|
| 27 |
},
|
| 28 |
"temporal_patch_size": 2
|
|
|
|
| 14 |
0.26130258,
|
| 15 |
0.27577711
|
| 16 |
],
|
| 17 |
+
"max_pixels": 2116800,
|
| 18 |
"merge_size": 2,
|
| 19 |
"min_pixels": 3136,
|
| 20 |
"patch_size": 14,
|
|
|
|
| 22 |
"resample": 3,
|
| 23 |
"rescale_factor": 0.00392156862745098,
|
| 24 |
"size": {
|
| 25 |
+
"max_pixels": 2116800,
|
| 26 |
"min_pixels": 3136
|
| 27 |
},
|
| 28 |
"temporal_patch_size": 2
|