ErrOPD-Qwen3-1.7B-student-SQL

Student start (supervised fine-tuning), released with the paper ErrOPD: When Does On-Policy Distillation Transfer Teacher Errors? (Xin Li, Hao Jiang, Annan Wang, Yichi Zhang, Chau Yuen).

Code: https://github.com/LiXin97/ErrOPD · Project page: https://lixin.ai/ErrOPD · All checkpoints and datasets: ErrOPD collection

Checkpoint

Role Student start (supervised fine-tuning)
What it is Student fine-tuned (supervised) on clean Spider targets; the starting point of on-policy distillation.
Paper reference Table 2 (SQL: student start)
Task Spider 1.0 text-to-SQL: given a SQLite schema and a question, output one SQL query on a single line and nothing else
Training data sft_train.jsonl of XINLI1997/ErrOPD-Spider (1,795 Spider questions, clean)
Base model Qwen/Qwen3-1.7B
Weights bf16 safetensors, 1 file, 3.44 GB (1.72 B stored parameters).

Usage

# pip install "transformers>=4.57.0" accelerate datasets torch
import torch
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "XINLI1997/ErrOPD-Qwen3-1.7B-student-SQL"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")

# one held-out prompt (system + user turns) from the evaluation split
example = load_dataset("XINLI1997/ErrOPD-Spider", split="validation")[0]
messages = [m for m in example["messages"] if m["role"] != "assistant"]

inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
output = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

The expected output is one SQLite query on a single line (run it against the Spider database named in metadata.db_id to check it). Prompts, decoding settings and the scoring code used in the paper are in the code repository.

Notes:

  • The bundled chat template is the one used for fine-tuning, distillation rollouts and evaluation in the paper.

Training

Student fine-tuned (supervised) on clean Spider targets; the starting point of on-policy distillation. Full training configurations and scripts are in the code repository.

Evaluation

This checkpoint is reported in the paper, Table 2 (SQL: student start); see that table for its scores.

Limitations

  • Trained for one narrow structured-output task. It is not a general assistant, and outputs for other prompts are not meaningful.
  • Teachers in this release were fine-tuned to make an injected format error on purpose; distilled students may inherit it. This is what the paper measures.
  • Evaluated on a 500-question subset of Spider dev; generated SQL should be executed in a sandbox.

License

Apache-2.0, inherited from the base model Qwen/Qwen3-1.7B (see LICENSE). The training data keep their own terms (see the dataset card of XINLI1997/ErrOPD-Spider).

Citation

@article{li2026erropd,
  title   = {ErrOPD: When Does On-Policy Distillation Transfer Teacher Errors?},
  author  = {Li, Xin and Jiang, Hao and Wang, Annan and Zhang, Yichi and Yuen, Chau},
  journal = {arXiv preprint arXiv:2605.08737},
  year    = {2026}
}
Downloads last month
74
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for XINLI1997/ErrOPD-Qwen3-1.7B-student-SQL

Finetuned
Qwen/Qwen3-1.7B
Finetuned
(1325)
this model

Dataset used to train XINLI1997/ErrOPD-Qwen3-1.7B-student-SQL

Collection including XINLI1997/ErrOPD-Qwen3-1.7B-student-SQL

Paper for XINLI1997/ErrOPD-Qwen3-1.7B-student-SQL