Training Overview

ZhSQL-R1-1.5B is a bilingual Text-to-SQL model based on Qwen2.5-Coder-1.5B, trained using supervised fine-tuning (SFT) followed by execution-reward GRPO.

Stage 1: Bilingual SFT

The model was fine-tuned for two epochs on 7,127 examples derived from the BIRD benchmark, with approximately 48% Chinese prompts.

Key settings: LoRA rank 32, maximum sequence length 3,072, effective batch size 16, and learning rate 2e-4. Loss was applied only to the SQL response.

Stage 2: RL Data Filtering

The SFT model generated eight SQL candidates per question. Examples with partial success (0 < pass_rate < 1) were retained, producing 3,692 learnable examples.

Stage 3: GRPO

GRPO used binary execution-equivalence rewards for 300 steps, with eight generations per prompt, LoRA rank 32, learning rate 5e-6, and beta 0.0.

Evaluation

Execution Accuracy (EX) results:

Model BIRD EN 500 EN 500 ZH Held-out
Base 30.77 29.60 24.80
SFT 48.31 47.20 43.00 40.45
SFT + GRPO 49.41 48.80 43.80 41.26

Results use the project’s local evaluator and are not an official BIRD leaderboard submission.

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

Model tree for Rainyyyyy/ZhSQL-R1-1.5B

Finetuned
(209)
this model

Dataset used to train Rainyyyyy/ZhSQL-R1-1.5B

Paper for Rainyyyyy/ZhSQL-R1-1.5B