trl-lab/qwen3.5-2b-grpo-synsql
trl-lab/qwen3.5-2b-grpo-synsql is a 2.3 billion parameter text-to-SQL agent developed by trl-lab, based on Qwen3.5-2B and trained with GRPO on the SynSQL-2.5M dataset. This model excels at converting natural language questions into SQL queries by acting as an agent that explores databases through tools, without the schema being part of its prompt. It is specifically designed for SQLite databases and is part of a family of models exploring the impact of training data on small specialized text-to-SQL agents.
Loading preview...
MSynSQL: A Specialized 2.3B Text-to-SQL Agent
MSynSQL is a 2.3 billion parameter text-to-SQL agent developed by trl-lab, built upon the Qwen3.5-2B base model and fine-tuned using GRPO on the SynSQL-2.5M dataset. This model is one of three agents from the SQaLe research paper, designed to investigate how different training corpora influence the performance of small, specialized text-to-SQL models. Unlike traditional methods, MSynSQL operates as an agent, exploring database schemas through a set of tools and testing its generated queries before submission, crucially without the database schema being directly provided in its prompt.
Key Capabilities
- Agentic Text-to-SQL Conversion: Translates natural language questions into SQL queries by interactively exploring database structures using tools like
list_tables,describe_table, andjoin_path. - Reinforcement Learning Only: Trained from a base checkpoint using GRPO, without supervised warm-starting or distillation from larger models, highlighting its ability to learn complex agentic behaviors from reward signals.
- Performance on Benchmarks: Achieves 44.3% on BIRD dev and 50.7% on the SQaLe test set, demonstrating significant improvement over the untrained base model in text-to-SQL tasks.
- Active Database Exploration: Exhibits a high rate of tool calls (29.9 per episode), indicating a proactive approach to understanding database structure and content.
Good For
- Research into Small Text-to-SQL Models: Ideal for researchers studying the impact of training data characteristics on the performance of compact, specialized text-to-SQL agents.
- Agentic SQL Generation: Suitable for applications requiring an interactive, tool-using approach to SQL query generation, where the model dynamically discovers schema information.
- SQLite Database Interaction: Optimized for natural language querying of SQLite databases, particularly in scenarios where the schema is not explicitly provided in the prompt.
Limitations
- Schema Size: Less reliable than MSQaLe on databases with many tables, as its training data (SynSQL-2.5M) features smaller schemas. It is not the best choice for very large or complex schemas.
- Tool Call Frequency: Makes more tool calls per episode, potentially leading to longer interaction sequences compared to other models.
- SQLite Specificity: Trained and evaluated exclusively on SQLite, and expects a specific agent loop for optimal performance.