cwolff/qwen3.5-2b-grpo-synsql
The cwolff/qwen3.5-2b-grpo-synsql model is a 2.3 billion parameter Qwen3.5-based agent specifically fine-tuned for text-to-SQL tasks. It was trained using GRPO-style reinforcement learning against real SQLite execution, enabling it to explore databases with tools and generate accurate SQL queries. This model excels at agentic text-to-SQL generation, particularly when schema information is withheld, by leveraging its tool-use capabilities.
Loading preview...
Overview
cwolff/qwen3.5-2b-grpo-synsql is a 2.3 billion parameter Qwen3.5-based model engineered as an agentic text-to-SQL generator. Unlike single-shot SQL generators, this model was trained with GRPO-style Reinforcement Learning (RL) for 1600 steps against real SQLite execution. It learns to explore databases using various tools before submitting a query, and is rewarded based on the accuracy of the query's result against the gold answer.
Key Capabilities
- Agentic Text-to-SQL Generation: Designed to interact with a database through an agent loop, using tools like
list_tables,describe_table,run_query, andsubmit_sql. - Schema Exploration: Particularly effective when the database schema is not explicitly provided in the prompt, as its training emphasizes discovering schema through tools.
- Execution-based Reward: Training uses a dense reward system based on executing generated SQL against real SQLite databases and comparing results, rather than string matching.
- Qwen3.5 Base: Built upon the
Qwen/Qwen3.5-2Bbase model, without supervised warm-start.
Performance Highlights
On the BIRD dev dataset, this model achieves 0.460 full official accuracy and 0.443 withheld official accuracy, significantly outperforming the stock Qwen3.5-2B baseline (0.290 and 0.193 respectively). The withheld scenario, where the model must discover the schema, shows the largest gain, highlighting the effectiveness of its exploration training. However, it is noted to be the weakest of three related models trained with this recipe, primarily due to its training databases having very few rows, which limited the signal for distinguishing correct queries.
When to Use This Model
- Agentic Text-to-SQL: Ideal for applications requiring an LLM to interact with a database through an agentic loop, especially when schema discovery is part of the task.
- Resource-Constrained Environments: As a 2.3B parameter model, it offers a smaller footprint and lower latency compared to much larger models, making it suitable for scenarios where VRAM or cost are critical considerations.
- SQLite Environments: Trained and evaluated exclusively on SQLite, making it best suited for similar database systems.
Limitations
- Small Model Size: As a 2B model, it may not match the performance of much larger frontier models on complex multi-join queries.
- Training Data Specificity: Its training databases were nearly empty (median 2 rows per table), which is identified as a likely cause for its performance gap compared to its siblings trained on richer datasets.
- Agent Loop Required: Underperforms significantly without an agent loop; single-turn "schema in, SQL out" prompting is out of distribution.
- Tool Call Burning: The model tends to make many tool calls, potentially leading to episode truncation if not budgeted for long episodes or capped.