许可证:apache-2.0
数据集:
- OS-Copilot/OS-Atlas-data
语言:
- 英语
基础模型:
- bytedance-research/UI-TARS-7B-DPO
任务标签:图像文本到文本
库名称:transformers
标签:
- 多模态
- 图形用户界面
模型描述
Fintor-GUI-S2 s 是一个基于 UI-TARS-7B-DPO 微调的 GUI 基础模型。
评估结果
我们使用 Screenspot 在两个基准测试上评估了我们的模型:Screenspot Pro 和 Screenspot v2。
我们还提供了用于这些基准测试的评估脚本。下表比较了我们的模型与基础模型的性能。
模型 |
大小 |
Screenspot Pro |
Screenspot v2 |
UI-TARS-7B-DPO |
7B |
27.0 |
83.0 |
我们的模型 |
|
|
|
Ui-Tars-7B-Instruct-Finetuned-Os-Atlas |
7B |
33.0 |
91.8 |
注意 - 基础模型的得分略低于论文中提到的分数,因为用于评估的提示未公开。我们在评估基础和微调模型时使用了默认提示。
训练过程
该模型使用 OS-Copilot 数据集进行微调:OS-Copilot。

该模型使用 SFT 和 LoRA 进行训练。
评估脚本:
评估脚本可在此处获取:Screenspot_Ui-Tars
快速开始
from transformers import Qwen2VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
model = Qwen2VLForConditionalGeneration.from_pretrained(
"Fintor/Ui-Tars-7B-Instruct-Finetuned-Os-Atlas",
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
device_map="auto",
)
processor = AutoProcessor.from_pretrained("Fintor/Ui-Tars-7B-Instruct-Finetuned-Os-Atlas")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "path/to/image.jpeg",
},
{"type": "text", "text": "描述这张图片。"},
],
}
]
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)
引用