spider2-snow-temperature-sweep
收藏资源简介:
该数据集包含在Spider 2.0-Snow文本转SQL基准测试上,使用Qwen3模型(1.7B、4B、8B参数规模)在思维和非思维两种推理模式下,以温度0.6进行无约束采样生成的语言模型输出。数据集旨在分析采样行为(温度、推理模式、模型大小)在困难的企业级文本转SQL任务上的影响。数据集包含两个配置:rollouts配置提供了每个生成的详细信息,包括模型ID、推理模式标志、温度、实例ID、样本索引、原始模型输出(思维模式包含`<think>...</think>`块)、从输出中解析出的SQL、完成原因、令牌数量等,每个(模型、模式、实例)组合有100个样本;schemas配置提供了每个实例的元数据,包括实例ID、数据库ID、自然语言问题、提示中使用的链接模式DDL文本、链接的表列表等。数据集覆盖了基准测试中547个实例中的544个(前3个实例用作少样本示例池)。生成采用vLLM进行纯温度采样(top_p=1.0),提示中包含系统提示、自适应减少的最多3个少样本示例以及通过BM25问题→表链接选择的模式(非完整数据库模式)。执行正确性评估(eval)字段当前为空,将在后续版本中通过执行预测SQL与Snowflake仓库中的黄金结果进行比较来填充。
This dataset contains language model outputs generated using the Qwen3 model (with 1.7B, 4B, and 8B parameter scales) on the Spider 2.0-Snow text-to-SQL benchmark, under both thought and non-thought reasoning modes, with a temperature of 0.6 for unconstrained sampling. The dataset aims to analyze the impact of sampling behaviors (temperature, reasoning mode, model size) on challenging enterprise-level text-to-SQL tasks. It includes two configurations: the rollouts configuration provides detailed information for each generation, including model ID, reasoning mode flag, temperature, instance ID, sample index, raw model output (with `<think>...</think>` blocks for thought mode), parsed SQL from the output, completion reason, token count, etc., with 100 samples per (model, mode, instance) combination; the schemas configuration provides metadata for each instance, including instance ID, database ID, natural language question, linked schema DDL text used in the prompt, linked table list, etc. The dataset covers 544 out of 547 instances in the benchmark (the first 3 instances are used as a few-shot example pool). Generation is performed using vLLM for pure temperature sampling (top_p=1.0), with prompts including a system prompt, adaptively reduced up to 3 few-shot examples, and a schema selected via BM25 question→table linking (not the full database schema). The execution correctness evaluation (eval) field is currently empty and will be populated in future versions by comparing predicted SQL execution with gold results from the Snowflake repository.
数据集概述
Spider 2.0-Snow Temperature-Sweep Rollouts (Qwen3, thinking vs. non-thinking) 是一个用于分析语言模型在文本到SQL(text-to-SQL)任务上采样行为的数据集,基于 Spider 2.0-Snow 基准测试(https://github.com/xlang-ai/Spider2),使用 Qwen3 模型(https://huggingface.co/Qwen)的生成结果。数据集中只包含模型输出,执行正确性(eval)将在后续的独立评分中添加。
配置与数据划分
数据集包含两个配置(config):
1. rollouts — 每次生成一行
- 数据规模: 训练集共 323,600 个样本,约 2.39 GB。
- 特征列:
model: 模型标识符,包括Qwen/Qwen3-1.7B、Qwen/Qwen3-4B、Qwen/Qwen3-8B。thinking: 布尔值,指示是否启用了 Qwen3 的思考模式(enable_thinking)。temp: 采样温度(当前版本为 0.6)。instance_id: Spider 2.0-Snow 实例ID(如sf_bq001)。sample: 每个 (模型, 思考模式, 温度, 实例) 组合下的采样索引(0 到 N-1)。text: 原始模型输出(思考模式下包含<think>…</think>块)。extracted_sql: 从模型输出中解析出的 SQL(去除了推理过程和代码块标记)。finish: vLLM 结束原因(stop或length)。n_tokens: 生成的 token 总数(使用 Qwen3 分词器)。n_reasoning_tokens:<think>块内的 token 数(非思考模式下为 0)。n_answer_tokens:</think>之后的 token 数(即答案/SQL部分)。thinking_closed: 是否出现了</think>标记(表示推理完成,未截断)。has_sql: 是否提取到了非空 SQL。n_shots: 提示中的 few-shot 示例数量(0-3,自适应减少以适应上下文)。passed: 执行正确(匹配金标准结果),布尔值,评分前为null。score: 执行评分(浮点数),评分前为null。valid: 预测 SQL 执行无错误(布尔值),评分前为null。
- 采样数量: 对于每个 (模型, 模式, 实例) 组合,温度 0.6 下,非思考模式采样 100 个,思考模式采样 100 个(分两批:20 + 80)。
2. schemas — 每个实例一行
- 数据规模: 训练集共 547 个样本,约 6.7 MB。
- 特征列:
instance_id: Spider 2.0-Snow 实例ID。db: 数据库ID(如GA360)。question: 自然语言问题。linked_schema: 提示中使用的 DDL 文本(通过 BM25 算法选择的表)。linked_tables: 所选表名的列表。n_linked_tables: 链接的表数量(top-k)。external_knowledge: 提示中附带的辅助文档(如果有)。
生成方法
- 模型: Qwen3-1.7B / 4B / 8B,每种模型都有思考和非思考两种模式。
- 采样: 使用 vLLM,纯温度采样(
top_p=1.0,无 top-k),温度 0.6,最大 token 数:非思考模式为 1024,思考模式为 8192。不使用约束解码。 - 提示: 系统提示 + 最多 3 个 few-shot 示例(自适应减少以适应上下文)+ 问题。提示中的模式通过 BM25 问题→表格链接 选择(top-10 表),而非整个数据库。
- 上下文: Qwen3 原生上下文长度为 40,960 token,链接后的提示无需使用 rope scaling。
评分(eval)
Spider 2.0-Snow 不提供金标准 SQL;正确性通过将预测结果在托管的 Snowflake 数据仓库上执行并与发布的结果表比较来衡量。当前 eval 字段为 null,将在未来版本中填充 pass@1 执行准确率。
覆盖范围
每个配置下生成了 544 个实例(共 547 个实例,前 3 个实例用作 few-shot 池)。少数模式很宽的实例(sf_bq407、sf_bq154、sf_bq157)即使经过链接也超出了上下文预算,因此在某些配置中被省略。
加载方式
python from datasets import load_dataset rollouts = load_dataset("vxef/spider2-snow-temperature-sweep", "rollouts") schemas = load_dataset("vxef/spider2-snow-temperature-sweep", "schemas")




