---
title: Arctic-Text2SQL-R1-7B
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/Arctic-Text2SQL-R1-7B"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/Arctic-Text2SQL-R1-7B.md"
repository: AI-ModelScope/Arctic-Text2SQL-R1-7B
last_updated: 2025-05-29
license: apache-2.0
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
base_model:
  - Qwen/Qwen2.5-Coder-7B-Instruct
base_model_relation: finetune
parameters: 7.6B
tensor_type:
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 447
stars: 1
---

# Arctic-Text2SQL-R1-7B

> Arctic-Text2SQL-R1-7B - AI-ModelScope 在 ModelScope 开源的模型。Overview Arctic-Text2SQL-R1-7B is a 7-billion-parameter Text-to-SQL model fine-tuned using Group Relative Policy Optimization (GRPO) with a simple execution-based reward signal. It converts natural…

AI-ModelScope/Arctic-Text2SQL-R1-7B 是 ModelScope 魔搭社区上的 7.6B 参数机器学习模型，采用 apache-2.0 许可，基于 Qwen/Qwen2.5-Coder-7B-Instruct 构建，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: AI-ModelScope/Arctic-Text2SQL-R1-7B
- **License**: apache-2.0
- **Parameters**: 7.6B
- **Base model**: Qwen/Qwen2.5-Coder-7B-Instruct
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 447
- **Stars**: 1
- **Last updated**: 2025-05-29

Source: https://www.modelscope.cn/models/AI-ModelScope/Arctic-Text2SQL-R1-7B

---

## Overview
Arctic-Text2SQL-R1-7B is a 7-billion-parameter Text-to-SQL model fine-tuned using Group Relative Policy Optimization (GRPO) with a simple execution-based reward signal. It converts natural language questions into executable SQL queries.

Read more in our paper: [Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL](https://arxiv.org/abs/2505.20315).

## Key Features

- **Lightweight RL formulation**: Uses only execution correctness and syntax validity as rewards.
- **State-of-the-art performance**: Achieves 68.9% execution accuracy on BIRD-dev and 68.5% on BIRD-test, with an average of 57.2% across six benchmarks (BIRD, Spider, Spider2.0, Spider-DK, EHRSQL, ScienceBenchmark)
- **Efficiency**: Outperforms many 70B+ models with only 7B parameters.

## Intended Use

This model is designed for:

- Interactive natural language interfaces to relational databases.
- Data analytics tools enabling non-technical users to query databases.

### Not intended for:
- Generation of non-SQL text or free-form natural language tasks.
- Production systems without validation, especially in safety-critical domains.

| Benchmark        | Dev/Test Accuracy |
| ---------------- | ----------------- |
| BIRD-dev         | 68.9%             |
| BIRD-test        | 68.5%             |
| Spider-test      | 88.8%             |
| Spider2.0-DK     | 15.6%             |
| EHRSQL           | 36.7%             |
| ScienceBenchmark | 51.8%             |
| **Average**      | **57.2%**         |


## Ethical Considerations
- Avoid using for private or sensitive data without proper oversight.
- Validate generated SQL to prevent data leakage or unauthorized access.
