riit3sh/qwen2.5-coder-3b-instruct-spider-sft-grpo

TEXT GENERATIONPricing:Input $0.32 / Cached $0.064 / Output $1.6Concurrent Unit Cost:1Model Size:3.1BQuant:BF16Context Size:32kTool Calling:SupportedPublished:Aug 21, 2026License:apache-2.0Architecture:Transformer0.0K Open Weights Featherless Exclusive Cold

The riit3sh/qwen2.5-coder-3b-instruct-spider-sft-grpo is a 3.1 billion parameter Qwen2.5-Coder-3B-Instruct model fine-tuned by riit3sh for Text-to-SQL generation. It utilizes a two-stage approach, including Supervised Fine-Tuning (SFT) and Group Relative Policy Optimization (GRPO) on the Spider dataset. This model excels at converting natural language questions into executable SQL queries, achieving 33.4% execution accuracy on the Spider development set.

Loading preview...

Model Overview

This model, riit3sh/qwen2.5-coder-3b-instruct-spider-sft-grpo, is a 3.1 billion parameter Qwen2.5-Coder-3B-Instruct variant specifically optimized for Text-to-SQL generation. Developed by riit3sh, it employs a unique two-stage fine-tuning pipeline on the Spider dataset, which includes Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL) using Group Relative Policy Optimization (GRPO).

Key Capabilities & Differentiators

  • Execution-Guided Reinforcement Learning: The model's primary differentiator is its GRPO stage, which uses a custom reward function that scores 1.0 only if the generated SQL query produces an exact execution result match against the gold query on real SQLite databases. This forces the model to generate highly accurate and executable SQL.
  • Enhanced Text-to-SQL Performance: Through this RL approach, the model achieves a 33.4% execution accuracy and 31.7% exact match on the Spider development set, significantly improving over the base model's zero-shot performance of 0.9% execution accuracy.
  • Optimized Training Pipeline: The training leverages Unsloth for SFT with LoRA and TRL for GRPO, ensuring efficient fine-tuning.

Ideal Use Cases

This model is particularly well-suited for applications requiring precise and executable SQL generation from natural language. It's an excellent choice for:

  • Database Query Interfaces: Building intelligent assistants that can translate user questions into database queries.
  • Data Analysis Tools: Automating the generation of SQL for reporting and analytical tasks.
  • Educational Platforms: Assisting users in learning SQL by providing correct query examples based on natural language input.