💡 建议配合 学习模式 使用本工具 学术合规

DeepResearcher 由上海交通大学 GAIR-NLP 实验室开源,定位"基于强化学习训练的深度研究 Agent"。完整训练流程依赖 GPU + flash-attn 编译(耗时长),本清单走评估优先路径:跳过编译,使用 CPU 版 torch + DashScope 推理,5–10 分钟内完成环境就绪。

Python 版本钦定 3.10,超出会触发 numpy/torch 兼容性错误。在 15 份工具中属于"评估友好但训练昂贵"档位。

RL 驱动的深度研究范式

基于强化学习训练的多步检索与推理 Agent,在复杂研究问题上表现优于传统 Prompt Engineering 方案。

评估优先路径

提供 CPU + DashScope 的轻量评估路径,跳过 flash-attn 编译与 GPU 依赖,5–10 分钟即可完成环境搭建。

Python 3.10 精准兼容

针对 numpy/torch 生态钦定 Python 3.10,避免常见的版本兆容坑,稳定性有保障。

上交 GAIR-NLP 出品

由上海交通大学 GAIR-NLP 实验室开源,学术背景扣实,适合作为深度研究 Agent 的参考实现。

注意 — 评估路径降级:完整训练需要 GPU + flash-attn,本清单仅做评估冒烟(CPU torch + DashScope 推理)。

① 前置条件检查

python3.10 --version   # 必须 3.10 git --version df -h .                # ≥ 6 GB

② 人类必填项

DASHSCOPE_API_KEY 通义千问 创建

③ .env 模板

OPENAI_API_KEY=${DASHSCOPE_API_KEY} OPENAI_API_BASE=https://dashscope.aliyuncs.com/compatible-mode/v1 LLM_MODEL=qwen-plus HF_ENDPOINT=https://hf-mirror.com WANDB_MODE=disabled LANGCHAIN_TRACING_V2=false

④ 按序执行(CPU 评估路径)

git clone https://github.com/GAIR-NLP/DeepResearcher.git && cd DeepResearcher python3.10 -m venv .venv && source .venv/bin/activate # 关键:装 CPU 版 torch(避免 1GB+ CUDA 包超时) pip install torch --index-url https://mirrors.aliyun.com/pytorch-wheels/cpu pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt --no-deps  # 跳过冲突 set -a; source .env; set +a
⑤ 常见故障排查
flash-attn 编译失败评估路径不需要,pip uninstall flash-attn
torch 包超时必走 CPU wheel:--index-url https://mirrors.aliyun.com/pytorch-wheels/cpu
numpy/torch 兼容钦定 Python 3.10;其它版本会报错

AI·RESEARCH·HUB — DeepResearcher — RL 深度研究 Agent