Text Generation
Transformers
Safetensors
GGUF
English
qwen2
text-to-sql
sql
bird
chain-of-thought
reasoning
qwen2.5-coder
llama.cpp
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use jk200201/qwen2.5-coder-7b-bird-cot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jk200201/qwen2.5-coder-7b-bird-cot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jk200201/qwen2.5-coder-7b-bird-cot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jk200201/qwen2.5-coder-7b-bird-cot") model = AutoModelForCausalLM.from_pretrained("jk200201/qwen2.5-coder-7b-bird-cot", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jk200201/qwen2.5-coder-7b-bird-cot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jk200201/qwen2.5-coder-7b-bird-cot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jk200201/qwen2.5-coder-7b-bird-cot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jk200201/qwen2.5-coder-7b-bird-cot
- SGLang
How to use jk200201/qwen2.5-coder-7b-bird-cot with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jk200201/qwen2.5-coder-7b-bird-cot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jk200201/qwen2.5-coder-7b-bird-cot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jk200201/qwen2.5-coder-7b-bird-cot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jk200201/qwen2.5-coder-7b-bird-cot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jk200201/qwen2.5-coder-7b-bird-cot with Docker Model Runner:
docker model run hf.co/jk200201/qwen2.5-coder-7b-bird-cot
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -38,21 +38,23 @@ model-index:
|
|
| 38 |
|
| 39 |
A 7B text-to-SQL model that reasons step by step over a database schema and then writes the SQL. It is fine-tuned from `Qwen/Qwen2.5-Coder-7B-Instruct` by distilling execution-verified chain-of-thought solutions.
|
| 40 |
|
| 41 |
-
On BIRD dev (realistic, messy schemas, the harder text-to-SQL benchmark) it reaches **52.1% greedy** result accuracy and **58.5% with self-consistency** (Best-of-N, K=8).
|
| 42 |
|
| 43 |

|
| 44 |
|
| 45 |
## Results: BIRD dev (execution result accuracy)
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|:--|--:|
|
| 49 |
-
| Base Qwen2.5-Coder-7B-Instruct | 27.0% |
|
| 50 |
-
| **This model, greedy (1 sample)** | **52.1%** |
|
| 51 |
-
| DeepSeek-V3 (single-shot) | 54.7% |
|
| 52 |
-
| Grok-4 (single-shot) | 55.4% |
|
| 53 |
-
| **This model, self-consistency (K=8)** | **58.5%** |
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
## Usage
|
| 58 |
|
|
|
|
| 38 |
|
| 39 |
A 7B text-to-SQL model that reasons step by step over a database schema and then writes the SQL. It is fine-tuned from `Qwen/Qwen2.5-Coder-7B-Instruct` by distilling execution-verified chain-of-thought solutions.
|
| 40 |
|
| 41 |
+
On BIRD dev (realistic, messy schemas, the harder text-to-SQL benchmark) it reaches **52.1% greedy** result accuracy and **58.5% with self-consistency** (Best-of-N, K=8). With self-consistency it matches DeepSeek V4-Pro (1.6T parameters) at roughly 0.4% of the size, running locally.
|
| 42 |
|
| 43 |

|
| 44 |
|
| 45 |
## Results: BIRD dev (execution result accuracy)
|
| 46 |
|
| 47 |
+
All models use a single chain-of-thought sample unless noted, so the comparison is like for like.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
| Model | Params | Result accuracy |
|
| 50 |
+
|:--|--:|--:|
|
| 51 |
+
| Base Qwen2.5-Coder-7B-Instruct | 7B | 27.0% |
|
| 52 |
+
| **This model, greedy** | **7B** | **52.1%** |
|
| 53 |
+
| **This model, self-consistency (K=8)** | **7B** | **58.5%** |
|
| 54 |
+
| DeepSeek V4-Pro | 1.6T | 58.7% |
|
| 55 |
+
| GLM 5.2 | 744B | 63.0% |
|
| 56 |
+
|
| 57 |
+
Result accuracy is the fraction of queries whose SQL executes to the same rows as the gold query (BIRD's official execution metric). The larger frontier models score higher, as expected. The point is that a 7B reaches their accuracy band at a fraction of the size and cost. The 58.5% figure uses K=8 self-consistency (roughly 8x inference).
|
| 58 |
|
| 59 |
## Usage
|
| 60 |
|