intercode-deepseek-coder-6.7b
收藏资源简介:
该数据集是DeepSeek-Coder-6.7B-Instruct模型在InterCode环境中生成的智能体轨迹集合,用于智能体可解释性研究。模型使用贪婪解码(温度0,种子0)通过本地vLLM OpenAI端点与InterCode Gym环境交互,每步生成一个动作,最多10轮,保留每个生成token的选定概率和top-5对数概率。奖励由InterCode的执行评分器计算。环境在无Docker的情况下运行:bash使用Alpine rootfs的proot,python使用本地进程,SQL使用本地MariaDB和Spider开发集。数据集包含三个子任务:intercode-bash(200个episodes,平均奖励0.743,解决48个)、intercode-python(261个episodes,平均奖励0.379,解决88个)、intercode-sql(50个episodes,平均奖励0.542,解决26个)。python和SQL运行提前停止,仅包含已收集的episodes。数据目录结构为<env>/<run-id>/01-trajectory/,包含metadata.json、validation.json、trajectories.jsonl或trajectory-shards/。每条轨迹记录包括run_id、environment、index、query、gold、reward、success、steps、outcome、messages(完整对话历史)、generations(每步的助手文本、解析动作、token列表及对数概率、观察结果)、evaluation_info(评分细节)以及通过extend_full_seq.py添加的full_seq字段(用于MICE读取器)。
This dataset is a collection of agent trajectories generated by the DeepSeek-Coder-6.7B-Instruct model in the InterCode environment, used for research on interpretability of agents. The model uses greedy decoding (temperature 0, seed 0) to interact with the InterCode Gym environment via a local vLLM OpenAI endpoint, generating one action per step for up to 10 rounds, and retains the probabilities of selected tokens and top-5 log probabilities for each generated token. Rewards are computed by the execution scorer of InterCode. The environment runs without Docker: bash uses proot with Alpine rootfs, python uses local processes, and SQL uses local MariaDB with the Spider development set. The dataset contains three sub-tasks: intercode-bash (200 episodes, average reward 0.743, 48 solved), intercode-python (261 episodes, average reward 0.379, 88 solved), and intercode-sql (50 episodes, average reward 0.542, 26 solved). The python and SQL runs stopped early, only containing collected episodes. The data directory structure is <env>/<run-id>/01-trajectory/, containing metadata.json, validation.json, trajectories.jsonl or trajectory-shards/. Each trajectory record includes run_id, environment, index, query, gold, reward, success, steps, outcome, messages (full conversation history), generations (assistant text, parsed action, token list with log probabilities, observations per step), evaluation_info (scoring details), and a full_seq field added by extend_full_seq.py (used by the MICE reader).
数据集概述
该数据集为 DeepSeek-Coder-6.7B InterCode pass-1 agent trajectories,由 agent-interpretability 流水线的 pass-1(轨迹生成)阶段产出,记录了代码智能体在 InterCode Gym 环境中的交互轨迹。
核心内容
- 模型:deepseek-ai/deepseek-coder-6.7b-instruct,贪婪解码(温度 0,种子 0)。
- 环境:InterCode Gym,包括 bash、python、sql 三种,均以 无 Docker 方式运行。
- 运行方式:通过本地 vLLM OpenAI 端点驱动,每回合一个动作,最多 10 回合;记录每个生成 token 的选定及 top-5 log-probs。
- 奖励:使用 InterCode 自带的基于执行的评分器。
数据组成
| 环境 | run-id | 回合数 | 状态 | 平均奖励 | 解决数 |
|---|---|---|---|---|---|
| intercode-bash | 20260828T190903Z_temp0_seed0 | 200 / 200 | 完成 | 0.743 | 48 |
| intercode-python | 20260828T185616Z_temp0_seed0 | 261 / 974 | 提前停止 | 0.379 | 88 |
| intercode-sql | 20260828T204327Z_temp0_seed0 | 50 / 1034 | 提前停止 | 0.542 | 26 |
python 和 sql 的运行未完成即停止,其 metadata.json 的 status 为 stopped_early,summary 仅反映已收集的回合。分片清单已重新生成,使部分运行自洽。
文件结构
<env>/<run-id>/01-trajectory/ metadata.json 运行配置 + 汇总 validation.json 事后验证报告(如存在) trajectories.jsonl 每个 episode 一条 JSON 记录(bash) trajectory-shards/ trajectories-<start>-<end>.jsonl(python、sql,每 25 条一个分片) trajectory-shards.json 分片清单 + 哈希(python、sql)
记录字段
每条 episode 记录包含:
- 元数据:run_id、environment、index、query、gold、reward、success、steps、outcome(submitted / step_limit 等)。
- messages:完整聊天记录(system / user / assistant / observation)。
- generations[]:每回合的 assistant_text、parsed_action、tokens[](含 token、bytes、logprob、top_logprobs[])、observation、usage/finish。
- evaluation_info:评分详情(python 为逐测试结果,sql 为 agent/eval 行)。
- 富化数据(来自 add_full_seq.py):full_seq(聊天模板后的 token ids)、prompt_len、turns[],可适配 MICE 逐字节读取器。
复现方法
代码位于 priyankamary/agent-interpretability 仓库的 srujana 分支,路径为:
emil/scripts/01-trajectory/{intercode-bash,intercode-python,intercode-sql}/
需设置 INTERCODE_*_NODOCKER=1 和 MODEL_ID=deepseek-ai/deepseek-coder-6.7b-instruct。




