当前位置: 首页 > ai >正文

UI-TARS本地部署

UI-TARS本地部署

UI-TARS本地部署

  • UI-TARS 论文(arXiv)

  • UI-TARS 官方仓库:包含部署指南、模型下载链接及示例代码。

  • UI-TARS-Desktop 客户端:支持本地桌面应用的交互控制。

  • 模型部署框架:vLLM本地部署

1.下载项目源码

git clone https://github.com/bytedance/UI-TARS.git

2.下载模型checkpoint

# 使用huggingface镜像源
export HF_ENDPOINT=https://hf-mirror.com
# 以2B模型为例(太穷了7B没显存)
huggingface-cli download --resume-download ByteDance-Seed/UI-TARS-2B-SFT --local-dir ./UI-TARS-2B-SFT

3.本地模型部署

  • 启动 API 服务
#python -m vllm.entrypoints.openai.api_server --served-model-name ui-tars --model <模型路径>
python -m vllm.entrypoints.openai.api_server --served-model-name ui-tars --model /mnt/n/model/GUI-model/UI-TARS-2B-SFT
# --trust-remote-code
python -m vllm.entrypoints.openai.api_server --served-model-name ui-tars --model /mnt/n/model/GUI-model/UI-TARS-2B-SFT --trust-remote-code
  • 若报错:
# 报错1
AttributeError: module 'pynvml' has no attribute 'nvmlDeviceGetCudaComputeCapability'
# 解决1pip install --force-reinstall --ignore-installed nvidia-ml-py# 报错2:ValueError: size must contain 'shortest_edge' and 'longest_edge' keys.
# 解决2:
https://www.modelscope.cn/models/bytedance-research/UI-TARS-7B-DPO/feedback/issueDetail/27680
preprocessor_config.json增加:"size": {"max_pixels": 2116800,"min_pixels": 3136,"shortest_edge": 3136,"longest_edge": 2116800},"temporal_patch_size": 2,"shortest_edge": 3136,"longest_edge": 2116800

4. 客户端调用示例

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="empty")
response = client.chat.completions.create(model="ui-tars",messages=[{"role": "user", "content": "搜索今日天气"}]
)print(response.choices[0].message.content)

5. 安装UI.TARS-0.1.2.Setup.exe

配置 UI-TARS 客户端
打开 UI-TARS:启动 UI-TARS Windows 客户端。
进入模型配置界面:在客户端中找到模型配置相关的功能区域,通常在设置或者模型管理模块。
添加模型配置:
模型名称:为模型设置一个便于识别的名称,例如 local-vlm-model
API 基础 URL:输入 vLLM 服务的基础 URL,默认情况下为 http://localhost:8000/v1
认证信息:若服务需要认证,需填写相应的认证信息;若无需认证,可留空。

http://www.xdnf.cn/news/6949.html

相关文章:

  • 【C++】map和set的使用
  • 为什么需要加密机服务?
  • 牛客网NC21989:牛牛学取余
  • 信奥赛CSP动态规划入门-最小硬币问题
  • mac下载mysql
  • k8s备份namespace
  • 系统安全及应用
  • H2数据库源码学习+debug, 数据库 sql、数据库引擎、数据库存储从此不再神秘
  • 组态王|如何创建组态王工程?
  • 宝塔面板屏蔽垃圾搜索引擎蜘蛛和扫描工具的办法
  • Docker 容器技术原理及实践:从入门到部署实战
  • 基于LLM合成高质量情感数据,提升情感分类能力!!
  • Java、ssm(AI) 2025/5/17
  • JavaScript:PC端特效-从mouseenter和mouseover的区别到动画函数
  • 202537 |《代码整洁之道》笔记
  • Linux进程异常退出排查指南
  • C++ 手撕shared_ptr
  • 基于朴素贝叶斯与 LSTM 的假新闻检测模型对比分析
  • Linux容器技术详解
  • TransmittableThreadLocal使用场景
  • 编译原理实验五:LR语法分析器的控制程序
  • 类方法_静态方法_实例方法
  • RAG流程介绍
  • [Windows] 自动关机辅助工具 Shutdown Timer Classic 1.2.3
  • 反向海淘爆发期:独立站系统如何打造跨境代购新基建?​
  • BrepGen中的几何特征组装与文件保存详解 deepwiki occwl OCC包装库
  • 如何用AI优化简历:自动读取与精华浓缩
  • Python训练营打卡 Day28
  • 【SpringBoot】MyBatisPlus(MP | 分页查询操作
  • 通过向量化数据结合大模型解释进行物料智能辨别