Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/3bai233_genai-group3.json
T

1 line
7.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "3bai233/genai-group3", "files": {"code/Agent/AgentS3+BAMI/README.md": {"e5d0e5df4595689b19d28fb92edbf1bd5cd61599": {"t": 1785768899.3346431, "n": 5091, "h": "ae705c5ea82343b2", "c": "# AgentS3-BAMI\n\n## 1. 环境依赖\n\n### 硬件要求\n| 组件 | 配置 | 说明 |\n|------|------|------|\n| GPU | NVIDIA GPU(24GB+ 显存) | BAMI 和 vLLM 推理加速 |\n| 内存 | 32GB+ | 8 个 Docker 容器并行 |\n| 存储 | 100GB+ | 模型文件 + 虚拟机镜像 |\n\n### 软件要求\n| 软件 | 版本 | 说明 |\n|------|------|------|\n| Python | 3.10+ | 运行环境 |\n| Docker | 20.10+ | OSWorld 容器运行 |\n| CUDA | 11.8+ | GPU 加速 |\n| NVIDIA Driver | 525+ | GPU 驱动 |\n\n### 外部服务\n| 服务 | 端口 | GPU | 说明 |\n|------|------|-----|------|\n| vLLM Server | 8000 | GPU 6,7 | UI-TARS-1.5-7B(fallback 定位) |\n| BAMI Server | 8001 | GPU 4 | Holo2-8B + 裁剪判别模型 |\n| Docker | - | CPU | OSWorld 容器(8 并行) |\n\n### Python 依赖\n\n| 依赖包 | 用途 |\n| :--- | :--- |\n| openai>=1.0.0 | GPT-4o 规划模型调用 |\n| pyautogui>=0.9.54 | GUI 鼠标键盘控制 |\n| docker>=6.1.0 | OSWorld 容器管理 |\n| vllm>=0.4.0 | UI-TARS 推理服务 |\n| torch>=2.0.0 | 深度学习框架 |\n| pillow>=10.0.0 | 图像处理 |\n| pytesseract>=0.3.10 | OCR 文字识别 |\n| anthropic>=0.18.0 | Claude 模型支持 |\n| backoff>=2.2.0 | API 重试机制 |\n\n### 模型文件\n\n| 模型 | 路径 | 大小 |\n| :--- | :--- | :--- |\n| UI-TARS-1.5-7B | vLLM 加载 | ~14GB |\n| Holo2-8B | /data/models/Holo2-8B | ~16GB |\n| 裁剪判别模型 | /data/models/two_box_judge_qwen3_8b/checkpoints/checkpoint-2712 | ~16GB |\n\n### 数据集\n\n| 文件 | 路径 |\n| :--- | :--- |\n| OSWorld 测试集 | evaluation_examples/test_nogdrive.json |\n| Ubuntu 虚拟机镜像 | docker_vm_data/Ubuntu.qcow2 |\n| Docker 镜像 | happysixd/osworld-docker |\n\n## 2. 代码仓库\n\n```\ns3_bami/\n├── __init__.py # 包初始化文件\n├── agents/ # Agent 核心实现\n│ ├── __init__.py\n│ ├── agent_s.py # AgentS3 主代理类(规划+执行)\n│ ├── worker.py # Worker 执行代理(动作生成)\n│ ├── grounding.py # Grounding 层(BAMI + UI-TARS 调用)\n│ └── code_agent.py # 代码执行代理(Python/Bash)\n├── core/ # 核心引擎\n│ ├── __init__.py\n│ ├── engine.py # LLM 引擎(OpenAI/Anthropic/vLLM)\n│ ├── mllm.py # 多模态 Agent 封装\n│ └── module.py # 基础模块类\n├── memory/ # 记忆模块\n│ ├── __init__.py\n│ └── procedural_memory.py # Prompt 模板库(所有系统提示词)\n├── bbon/ # 行为分析模块\n│ ├── __init__.py\n│ ├── behavior_narrator.py # 行为叙述器(动作前后对比)\n│ └── comparative_judge.py # 比较评测器(多轨迹对比)\n├── utils/ # 工具函数\n│ ├── __init__.py\n│ ├── common_utils.py # 通用工具(LLM调用、代码解析)\n│ ├── formatters.py # 响应格式检查器\n│ └── local_env.py # 本地代码执行环境\n└── cli_app.py # 命令行入口(交互式/单任务)\n```\n\n## 3. 如何运行\n\n### 1. 启动 Grounding 服务\n\n#### 启动 vLLM Server(GPU 6,7)- UI-TARS fallback\nCUDA_VISIBLE_DEVICES=6,7 vllm serve UI-TARS-1.5-7B \\\n --host 127.0.0.1 \\\n --port 8000 \\\n --served-model-name ByteDance-Seed/UI-TARS-1.5-7B \\\n --max-model-len 32768 \\\n --tensor-parallel-size 2\n \n#### 启动 BAMI Server(GPU 4)- 主要定位服务\nCUDA_VISIBLE_DEVICES=4 python scripts/bami_grounding_server.py \\\n --holo2_model_path /data/models/Holo2-8B \\\n --judge_model_path /data/models/two_box_judge_qwen3_8b/checkpoints/checkpoint-2712 \\\n --port 8001\n \n### 2. 运行 AgentS3-BAMI\n\n#### 交互式模式\npython cli_app.py \\\n --provider openai \\\n --model gpt-4o \\\n --ground_provider openai \\\n --ground_url \"http://localhost:8000/v1\" \\\n --ground_api_key EMPTY \\\n --ground_model ByteDance-Seed/UI-TARS-1.5-7B \\\n --grounding_width 1920 \\\n --grounding_height 1080\n \n运行后输入任务,例如:\ntext\nQuery: Open Chrome and search for AgentS3\n\n#### 单任务模式\npython cli_app.py \\\n --provider openai \\\n --model gpt-4o \\\n --model_url \"https://www.dmxapi.cn/v1\" \\\n --model_api_key \"your-api-key\" \\\n --ground_provider openai \\\n --ground_url \"http://localhost:8000/v1\" \\\n --ground_api_key EMPTY \\\n --ground_model ByteDance-Seed/UI-TARS-1.5-7B \\\n --grounding_width 1920 \\\n --grounding_height 1080 \\\n --task \"Open Chrome and search for AgentS3\"\n \n#### 批量测试(使用监控脚本)\n##### 后台运行完整监控(推荐)\nnohup bash scripts/bash/monitor_agents3_bami.sh > logs/monitor_agents3_bami.log 2>&1 &\n\n#### 查看状态\ntail -f logs/monitor_agents3_bami.log\n\n### 3. 配置文件方式\n\n也可以通过 `args.json` 配置文件运行:\n\n```bash\npython cli_app.py --config args.json\n```\n\n`args.json` 配置示例:\n\n```json\n{\n \"path_to_vm\": \"docker_vm_data/Ubuntu.qcow2\",\n \"provider_name\": \"docker\",\n \"headless\": true,\n \"action_space\": \"pyautogui\",\n \"observation_type\": \"screenshot\",\n \"num_envs\": 8,\n \"screen_width\": 1920,\n \"screen_height\": 1080,\n \"sleep_after_execution\": 3.0,\n \"max_steps\": 50,\n \"max_trajectory_length\": 8,\n \"domain\": \"all\",\n \"test_all_meta_path\": \"evaluation_examples/test_nogdrive.json\",\n \"test_config_base_dir\": \"evaluation_examples\",\n \"result_dir\": \"results_agents3_bami\",\n \"model_provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"model_url\": \"https://www.dmxapi.cn/v1\",\n \"model_api_key\": \"sk-YGmlJCXmOcpOiHcYQCL91RwuHI6MYYvTXk8XevZaYBAFWERh\",\n \"model_temperature\": null,\n \"ground_provider\": \"openai\",\n \"ground_url\": \"http://localhost:8000/v1\",\n \"ground_api_key\": \"EMPTY\",\n \"ground_model\": \"ByteDance-Seed/UI-TARS-1.5-7B\",\n \"grounding_width\": 1920,\n \"grounding_height\": 1080,\n \"bami_server_url\": \"http://127.0.0.1:8001\"\n}\n```\n\n\n"}}, "log/Agent/baseline/agents3/results/pyautogui/screenshot/gpt-4o/args.json": {"e5d0e5df4595689b19d28fb92edbf1bd5cd61599": {"t": 1785768911.0608013, "n": 909, "h": "51d0723515c8d906", "c": "{\n \"path_to_vm\": \"docker_vm_data/Ubuntu.qcow2\",\n \"provider_name\": \"docker\",\n \"headless\": true,\n \"action_space\": \"pyautogui\",\n \"observation_type\": \"screenshot\",\n \"num_envs\": 5,\n \"screen_width\": 1920,\n \"screen_height\": 1080,\n \"sleep_after_execution\": 3.0,\n \"max_steps\": 50,\n \"max_trajectory_length\": 8,\n \"domain\": \"all\",\n \"test_all_meta_path\": \"evaluation_examples/test_nogdrive.json\",\n \"test_config_base_dir\": \"evaluation_examples\",\n \"result_dir\": \"./results_agents3\",\n \"model_provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"model_url\": \"https://www.dmxapi.cn/v1\",\n \"model_api_key\": \"<REDACTED_API_KEY>\",\n \"model_temperature\": null,\n \"ground_provider\": \"openai\",\n \"ground_url\": \"http://localhost:8000/v1\",\n \"ground_api_key\": \"EMPTY\",\n \"ground_model\": \"ByteDance-Seed/UI-TARS-1.5-7B\",\n \"grounding_width\": 1920,\n \"grounding_height\": 1080\n}"}}}}