YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

DPA Research Pipeline — 从 Idea 到代码的完整记录

Decision Point Attention: Strategic Full Attention Routing for Efficient Agent Reasoning with Linear Attention

Target: NeurIPS 2026

这个 Repo 包含什么

1. conversation/ — Claude 对话完整记录

  • 4天的研究对话(3/20-3/24)
  • 从文献调研 → 20个idea → 选定DPA → 搭建项目的全过程
  • 包含: ICL+Long Doc 方向分析、Linear Attention+RAG 10个idea、Agent+ICL+Linear Attention 10个idea

2. agentlab-pipeline/ — AgentLaboratory 自动研究 Pipeline

  • decision_point_attention.yaml — 研究配置(topic、notes、参数)
  • inference_patched.py — 修改后的推理模块(接入 LLMBox 网关)
  • tools_patched.py — 修改后的工具模块(PDF下载重试)
  • ai_lab_repo_patched.py — 修改后的主程序
  • agentlab_run.log — 运行日志(Literature Review 结果、论文分析)

3. dpa-project/ — DPA 完整项目代码

src/
  models/
    router.py          — Decision Point Router (learned + fixed + supervised loss)
    dpa_model.py       — DPA 架构 (LinearAttn + FullAttn + Router + Wrapper)
    baselines.py       — Full Transformer / Pure Linear / Uniform Hybrid
  data/
    agent_trajectory.py — Agent trajectory 生成器 + decision point 标注
    datasets.py        — HotpotQA / GSM8K / ToolBench 数据加载
  eval/
    benchmark.py       — 统一评估 (simulate / train / finetune)
    metrics.py         — FLOPs / latency / KV cache / perplexity
    visualize.py       — 出版级图表生成
configs/               — 本地simulation + Merlin 8xH100 训练配置
scripts/               — 运行脚本
data/                  — 2000条标注 agent trajectories
results/               — Simulation 结果 (13 model variants)

4. figures/ — 生成的论文图表

  • accuracy_vs_flops.pdf — Quality vs Compute tradeoff
  • ratio_ablation.pdf — Decision Point Ratio 消融实验
  • trajectory_analysis.pdf — Agent Trajectory 中 decision point 分布

复现步骤

# 1. 本地运行 simulation (无需 GPU)
cd dpa-project
pip install -r requirements.txt
python src/data/agent_trajectory.py         # 生成数据
python src/eval/benchmark.py --mode simulate # 跑 simulation
python src/eval/visualize.py results/simulation_results.json  # 生成图表

# 2. 用 AgentLaboratory 自动研究 (需要 LLM API)
cd agentlab-pipeline
# 先 clone AgentLaboratory:
# git clone https://github.com/SamuelSchmidgall/AgentLaboratory.git
# 复制 patched 文件覆盖原文件, 然后:
python ai_lab_repo_patched.py --yaml-location decision_point_attention.yaml

# 3. 在 Merlin 上训练 (8xH100)
cd dpa-project && bash scripts/run_dpa.sh

Key Findings from AgentLab Literature Review

AgentLaboratory 自动分析了以下论文与 DPA 的关联:

  1. Routing Transformer (Roy et al., 2020) — Content-based sparse routing 先驱,证明 selective global attention 优于 uniform sparsity
  2. HAG (Roffo et al., 2024) — Hard gating + gradient routing 训练策略,可用于 DPA router 训练

LLMBox 网关配置 (字节内部免费)

AgentLaboratory 通过 LLMBox 网关调用 LLM, 无需 OpenAI API Key:

  • Base URL: https://llmbox.bytedance.net/v1
  • inference_patched.py 中添加了 llmbox/ 模型前缀支持
  • 修复了 LLMBox 返回 list (而非 string) 的兼容性问题
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support