初始化项目,由ModelHub XC社区提供模型

Model: blaze-star/qwen2.5-1.5b-sql-qlora-merged
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-10-30 11:08:18 +08:00
commit a6d185f22f
15 changed files with 152452 additions and 0 deletions

36
.gitattributes vendored Normal file
View File

@@ -0,0 +1,36 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text

214
README.md Normal file
View File

@@ -0,0 +1,214 @@
---
license: apache-2.0
base_model: Qwen/Qwen2.5-1.5B-Instruct
library_name: transformers
tags:
- text-to-sql
- sql
- qlora
- lora
- peft
- qwen2.5
datasets:
- b-mc2/sql-create-context
language:
- en
pipeline_tag: text-generation
model-index:
- name: qwen2.5-1.5b-sql-qlora-merged
results:
- task:
type: text2text-generation
name: Text-to-SQL
dataset:
name: sql-create-context
type: b-mc2/sql-create-context
split: held-out test (1000 examples)
metrics:
- type: exact_match
value: 0.748
name: Normalized exact match
- type: f1
value: 0.9732
name: SQL token F1
---
# qwen2.5-1.5b-sql-qlora-merged
Merged fp16 weights of [`Qwen/Qwen2.5-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct),
QLoRA-fine-tuned for **text-to-SQL**: given a `CREATE TABLE` schema and a natural-language
question, emit a single SQLite query.
The LoRA adapter alone is at
[`blaze-star/qwen2.5-1.5b-sql-qlora`](https://huggingface.co/blaze-star/qwen2.5-1.5b-sql-qlora).
## Results
Held-out test split, 1,000 examples never seen in training.
| Model | Exact match | Token F1 | Format compliance |
|---|---|---|---|
| Base, 0-shot (4-bit) | 49.7% | 0.925 | 26.7% |
| Base, 3-shot (4-bit) | 52.3% | 0.921 | 99.3% |
| **QLoRA fine-tuned** | **74.8%** | **0.973** | **99.9%** |
| **Delta vs 0-shot** | **+25.1 pts** | **+0.049** | **+73.2 pts** |
Fine-tuning improved exact match by **+25.1 points** (49.7% -> 74.8%), a +51% relative gain.
## Usage
The model expects the chat template with this system prompt — it was trained with it, and
accuracy drops without it.
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("blaze-star/qwen2.5-1.5b-sql-qlora-merged", dtype=torch.float16, device_map="auto")
tok = AutoTokenizer.from_pretrained("blaze-star/qwen2.5-1.5b-sql-qlora-merged")
```
```python
SYSTEM = ("You are a text-to-SQL engine. Given a SQLite schema and a question, reply with a "
"single SQL query that answers the question. Output only the SQL query: no "
"explanation, no comments, no markdown code fences.")
schema = "CREATE TABLE head (age INTEGER)"
question = "How many heads of the departments are older than 56?"
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": f"Schema:\n{schema}\n\nQuestion: {question}\n\nSQL:"},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
ids = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=96, do_sample=False)
print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))
# SELECT COUNT(*) FROM head WHERE age > 56
```
Use greedy decoding (`do_sample=False`). Sampling hurts exact match on this task.
## What the metric actually measures
Primary metric is **normalized exact match** against the dataset's reference SQL:
lowercased, whitespace collapsed, `"` unified to `'`, backticks/brackets stripped,
spacing normalized around operators and punctuation. It is strict — a semantically
equivalent query that differs in alias naming (`AS p` vs `AS T1`) or literal quoting
(`= '15'` vs `= 15`) counts as a miss.
That strictness is the point, but it must be read correctly: **the base model already
produces largely correct SQL content** (token F1 0.925 before any training).
Much of the headroom is conformance to this dataset's canonical SQL style, which is
exactly what task-specific fine-tuning buys you. To keep that claim honest this project
reports three separate baselines rather than one:
| Baseline | Exact match | Format compliance | What it controls for |
|---|---|---|---|
| 4-bit, 0-shot | 49.7% | 26.7% | matched conditions — same quantization the adapter trains on |
| 4-bit, 3-shot | 52.3% | 99.3% | isolates *output formatting* from *SQL convention* |
| fp16, 0-shot | 57.3% | 99.4% | strongest untrained configuration |
The 3-shot baseline is the important control. Three in-context examples raise format
compliance to 99.3% — the model stops wrapping output in markdown fences almost
entirely — yet exact match moves only to 52.3%. **Formatting was therefore not the
bottleneck**, and gains above that line are genuine SQL-convention learning, not
prompt-format cleanup.
Both models receive an identical prompt and identical output post-processing
(fence stripping, leading-prose removal, first-statement extraction), so neither is
advantaged by the harness. Secondary metrics: order-insensitive **token F1** over SQL
tokens (partial credit) and **format compliance** (fraction of raw generations that were
already bare SQL).
## Data and leakage control
[`b-mc2/sql-create-context`](https://huggingface.co/datasets/b-mc2/sql-create-context) — natural-language question +
`CREATE TABLE` schema -> SQLite query.
The 78,577 raw rows are deduplicated on a SHA-1 of the normalized
`(question, schema)` pair (4 exact duplicates dropped), shuffled with seed
42, and then **test is carved off first**, before val and train. Splits:
**12,000 train / 750 val / 1,000 test**.
Split disjointness is asserted at build time and recorded in
[`data/split_report.json`](https://github.com/harshb20/qwen2.5-1.5b-sql-qlora/blob/main/data/split_report.json):
```json
{"train_test_overlap": 0, "val_test_overlap": 0, "train_val_overlap": 0}
```
`prepare_data.py` raises if any of these is non-zero, so a leaking split cannot be
trained on. The test split was used only by `evaluate.py`, never by `train.py`.
## Training
| | |
|---|---|
| Base model | [`Qwen/Qwen2.5-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) |
| Method | QLoRA — frozen 4-bit NF4 base (double quant, bf16 compute) + LoRA adapters |
| LoRA | r=16, alpha=32, dropout=0.05, on `q,k,v,o,gate,up,down_proj` |
| Trainable params | 18.5M of 1.56B (1.18%) |
| Optimizer | paged AdamW 8-bit, lr 0.0002, cosine schedule, 3% warmup, grad-clip 0.3 |
| Effective batch | 32 (16 x 2 accumulation) |
| Epochs | 2 |
| Max seq len | 512 tokens (observed mean 125, max 254) |
| Loss | cross-entropy on the **SQL completion only** — prompt tokens masked to -100 |
| Hardware | 1x NVIDIA A100-SXM4-80GB |
| Wall time | 11.7 min |
| Peak VRAM (training) | 30.96 GB |
Loss is computed only on the assistant turn, so the model is never rewarded for
reproducing the schema or the question.
![loss curves](loss_curves.png)
## Quantization: latency, VRAM, and quality
Merged fp16 model re-quantized with bitsandbytes and benchmarked on the same A100.
Latency is a single request generating exactly 64 tokens (20 runs after 3 warmups);
quality is exact match on the first 300 test examples.
| Precision | Weights VRAM | Peak VRAM | Latency (bs=1, 64 tok) | Decode tok/s | Batch-16 tok/s | Exact match |
|---|---|---|---|---|---|---|
| fp16 | 3.09 GB | 3.3 GB | 1862.4 ms | 34.4 | 436.5 | 76.7% (n=300) |
| 8bit | 1.8 GB | 2.1 GB | 27963.2 ms | 2.3 | 16.7 | 75.3% (n=300) |
| 4bit | 1.16 GB | 1.54 GB | 2320.7 ms | 27.6 | 369.2 | 75.3% (n=300) |
## Limitations
- **Single-table, synthetic-ish schemas.** `sql-create-context` schemas are small
`CREATE TABLE` statements derived from WikiSQL/Spider. Performance will not transfer
directly to large multi-table production warehouses.
- **Exact match is style-sensitive.** A correct query written in a different but valid
style scores zero. Token F1 is reported alongside for this reason.
- **No execution-based evaluation.** Queries are compared as strings, not run against a
database, so semantic equivalence is undercounted.
- **4-bit inference costs accuracy.** The base model loses ~8 points of exact match
going from fp16 to 4-bit (57.3% -> 49.7%); see the quantization table for the
fine-tuned model's own fp16/8-bit/4-bit spread.
- **English only**, and the model emits SQLite dialect.
## Intended use
Converting natural-language questions into SQLite queries over small, explicitly-provided
schemas — a component inside a larger system that supplies the schema and validates or
sandboxes the generated query. **Do not execute generated SQL against a production
database without validation**; the model can emit syntactically valid queries that are
semantically wrong.
## Training code
Full, reproducible pipeline: [https://github.com/harshb20/qwen2.5-1.5b-sql-qlora](https://github.com/harshb20/qwen2.5-1.5b-sql-qlora)
## Citation
```bibtex
@misc{qwen25-1.5b-sql-qlora,
title = {QLoRA text-to-SQL fine-tune of Qwen2.5-1.5B-Instruct},
author = {harshb20},
year = {2026},
url = {https://github.com/harshb20/qwen2.5-1.5b-sql-qlora}
}
```

24
added_tokens.json Normal file
View File

@@ -0,0 +1,24 @@
{
"</tool_call>": 151658,
"<tool_call>": 151657,
"<|box_end|>": 151649,
"<|box_start|>": 151648,
"<|endoftext|>": 151643,
"<|file_sep|>": 151664,
"<|fim_middle|>": 151660,
"<|fim_pad|>": 151662,
"<|fim_prefix|>": 151659,
"<|fim_suffix|>": 151661,
"<|im_end|>": 151645,
"<|im_start|>": 151644,
"<|image_pad|>": 151655,
"<|object_ref_end|>": 151647,
"<|object_ref_start|>": 151646,
"<|quad_end|>": 151651,
"<|quad_start|>": 151650,
"<|repo_name|>": 151663,
"<|video_pad|>": 151656,
"<|vision_end|>": 151653,
"<|vision_pad|>": 151654,
"<|vision_start|>": 151652
}

54
chat_template.jinja Normal file
View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
{%- endif %}
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
{%- else %}
{%- if messages[0]['role'] == 'system' %}
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
{%- else %}
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.content }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- endif %}

58
config.json Normal file
View File

@@ -0,0 +1,58 @@
{
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"dtype": "float16",
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 1536,
"initializer_range": 0.02,
"intermediate_size": 8960,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 32768,
"max_window_layers": 21,
"model_type": "qwen2",
"num_attention_heads": 12,
"num_hidden_layers": 28,
"num_key_value_heads": 2,
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": true,
"transformers_version": "4.57.6",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 151936
}

14
generation_config.json Normal file
View File

@@ -0,0 +1,14 @@
{
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.1,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8,
"transformers_version": "4.57.6"
}

BIN
loss_curves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

151388
merges.txt Normal file

File diff suppressed because it is too large Load Diff

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf2dc2d78d6d216015274351a145957df5e1f20015e8a8301023da4afdfd95ce
size 3087466808

142
results.json Normal file
View File

@@ -0,0 +1,142 @@
{
"task": "text-to-SQL (schema + question -> SQLite query)",
"dataset": "b-mc2/sql-create-context",
"base_model": "Qwen/Qwen2.5-1.5B-Instruct",
"method": "QLoRA (4-bit NF4 frozen base + LoRA adapters)",
"primary_metric": "normalized exact match",
"splits": {
"dataset": "b-mc2/sql-create-context",
"seed": 42,
"raw_rows": 78577,
"unique_rows": 78573,
"n_train": 12000,
"n_val": 750,
"n_test": 1000,
"train_test_overlap": 0,
"val_test_overlap": 0,
"train_val_overlap": 0,
"unique_keys_per_split": [
12000,
750,
1000
]
},
"training": {
"epochs": 2,
"lr": 0.0002,
"lora_r": 16,
"lora_alpha": 32,
"effective_batch": 32,
"n_train": 12000,
"n_val": 750,
"max_len": 512,
"train_minutes": 11.7,
"peak_vram_gb": 30.96,
"base_model": "Qwen/Qwen2.5-1.5B-Instruct"
},
"baseline": {
"exact_match": 0.497,
"token_f1": 0.9245807106744601,
"format_compliance": 0.267,
"n": 1000,
"tag": "baseline_0shot",
"quant": "4bit",
"fewshot": 0,
"adapter": null,
"split": "test",
"wall_seconds": 46.4,
"peak_vram_gb": 2.12
},
"baseline_3shot": {
"exact_match": 0.523,
"token_f1": 0.9212539742018538,
"format_compliance": 0.993,
"n": 1000,
"tag": "baseline_3shot",
"quant": "4bit",
"fewshot": 3,
"adapter": null,
"split": "test",
"wall_seconds": 56.4,
"peak_vram_gb": 3.08
},
"baseline_fp16": {
"exact_match": 0.573,
"token_f1": 0.9382126511712477,
"format_compliance": 0.994,
"n": 1000,
"tag": "baseline_fp16_0shot",
"quant": "fp16",
"fewshot": 0,
"adapter": null,
"split": "test",
"wall_seconds": 47.4,
"peak_vram_gb": 4.05
},
"finetuned": {
"exact_match": 0.748,
"token_f1": 0.973163722916554,
"format_compliance": 0.999,
"n": 1000,
"tag": "finetuned",
"quant": "4bit",
"fewshot": 0,
"adapter": "outputs/adapter",
"split": "test",
"wall_seconds": 68.0,
"peak_vram_gb": 2.79
},
"delta": {
"exact_match_abs": 0.251,
"exact_match_rel": 0.505,
"token_f1_abs": 0.0486,
"format_compliance_abs": 0.732,
"improved": true
},
"quantization": [
{
"precision": "fp16",
"weights_vram_gb": 3.09,
"peak_vram_gb": 3.3,
"load_seconds": 2.2,
"latency_ms_per_request_bs1": 1862.4,
"decode_tokens_per_sec_bs1": 34.4,
"batch16_tokens_per_sec": 436.5,
"gen_tokens": 64,
"exact_match": 0.7667,
"token_f1": 0.9737,
"quality_n": 300
},
{
"precision": "8bit",
"weights_vram_gb": 1.8,
"peak_vram_gb": 2.1,
"load_seconds": 20.3,
"latency_ms_per_request_bs1": 27963.2,
"decode_tokens_per_sec_bs1": 2.3,
"batch16_tokens_per_sec": 16.7,
"gen_tokens": 64,
"exact_match": 0.7533,
"token_f1": 0.9726,
"quality_n": 300
},
{
"precision": "4bit",
"weights_vram_gb": 1.16,
"peak_vram_gb": 1.54,
"load_seconds": 5.5,
"latency_ms_per_request_bs1": 2320.7,
"decode_tokens_per_sec_bs1": 27.6,
"batch16_tokens_per_sec": 369.2,
"gen_tokens": 64,
"exact_match": 0.7533,
"token_f1": 0.9732,
"quality_n": 300
}
],
"hub": {
"adapter": "blaze-star/qwen2.5-1.5b-sql-qlora",
"merged": "blaze-star/qwen2.5-1.5b-sql-qlora-merged"
},
"code": "https://github.com/harshb20/qwen2.5-1.5b-sql-qlora"
}

277
samples.md Normal file
View File

@@ -0,0 +1,277 @@
# Base vs fine-tuned on the same 10 test inputs
First 10 rows of the held-out test split (not cherry-picked). Both models get the identical prompt and identical output post-processing.
### 1. Tell me the ships in classs for kuha class
```sql
-- schema
CREATE TABLE table_name_52 (ships_in_class VARCHAR, class VARCHAR)
```
**Gold**
```sql
SELECT ships_in_class FROM table_name_52 WHERE class = "kuha class"
```
**Base (raw output)**
```
```sql
SELECT DISTINCT ships_in_class FROM table_name_52 WHERE class = 'kuha'
```
```
-> parsed: `SELECT DISTINCT ships_in_class FROM table_name_52 WHERE class = 'kuha'` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT ships_in_class FROM table_name_52 WHERE class = "kuha"
```
-> parsed: `SELECT ships_in_class FROM table_name_52 WHERE class = "kuha"` | exact match: **no**
---
### 2. What is the Drawn has an Against smaller than 20 and Points of 15?
```sql
-- schema
CREATE TABLE table_name_46 (drawn VARCHAR, against VARCHAR, points VARCHAR)
```
**Gold**
```sql
SELECT drawn FROM table_name_46 WHERE against < 20 AND points = 15
```
**Base (raw output)**
```
```sql
SELECT drawn FROM table_name_46 WHERE against < 20 AND points = '15';
```
```
-> parsed: `SELECT drawn FROM table_name_46 WHERE against < 20 AND points = '15'` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT drawn FROM table_name_46 WHERE against < 20 AND points = "15"
```
-> parsed: `SELECT drawn FROM table_name_46 WHERE against < 20 AND points = "15"` | exact match: **no**
---
### 3. How many picks for round 12?
```sql
-- schema
CREATE TABLE table_name_5 (pick__number VARCHAR, round VARCHAR)
```
**Gold**
```sql
SELECT COUNT(pick__number) FROM table_name_5 WHERE round = 12
```
**Base (raw output)**
```
SELECT COUNT(pick__number) FROM table_name_5 WHERE round = '12'
```
-> parsed: `SELECT COUNT(pick__number) FROM table_name_5 WHERE round = '12'` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT COUNT(pick__number) FROM table_name_5 WHERE round = "round 12"
```
-> parsed: `SELECT COUNT(pick__number) FROM table_name_5 WHERE round = "round 12"` | exact match: **no**
---
### 4. wich were the events when bout 2 was zhang ( chn ) l 0-5?
```sql
-- schema
CREATE TABLE table_19398910_4 (event VARCHAR, bout_2 VARCHAR)
```
**Gold**
```sql
SELECT event FROM table_19398910_4 WHERE bout_2 = "Zhang ( CHN ) L 0-5"
```
**Base (raw output)**
```
```sql
SELECT event FROM table_19398910_4 WHERE bout_2 = 'zhang (chn) l 0-5';
```
```
-> parsed: `SELECT event FROM table_19398910_4 WHERE bout_2 = 'zhang (chn) l 0-5'` | exact match: **YES**
**Fine-tuned (raw output)**
```
SELECT event FROM table_19398910_4 WHERE bout_2 = "Zhang ( CHN ) L 0-5"
```
-> parsed: `SELECT event FROM table_19398910_4 WHERE bout_2 = "Zhang ( CHN ) L 0-5"` | exact match: **YES**
---
### 5. Find the name and hours of project that has the most number of scientists.
```sql
-- schema
CREATE TABLE assignedto (project VARCHAR); CREATE TABLE projects (name VARCHAR, hours VARCHAR, code VARCHAR)
```
**Gold**
```sql
SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY COUNT(*) DESC LIMIT 1
```
**Base (raw output)**
```
```sql
SELECT p.name, p.hours FROM projects AS p JOIN assignedto AS at ON p.code = at.code GROUP BY p.name, p.hours ORDER BY COUNT(*) DESC LIMIT 1;
```
```
-> parsed: `SELECT p.name, p.hours FROM projects AS p JOIN assignedto AS at ON p.code = at.code GROUP BY p.name, p.hours ORDER BY COUNT(*) DESC LIMIT 1` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1
```
-> parsed: `SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1` | exact match: **no**
---
### 6. What is the total number of 3rd placed teams when the host is University of Manitoba, Winnipeg, Manitoba?
```sql
-- schema
CREATE TABLE table_1906920_1 (host VARCHAR)
```
**Gold**
```sql
SELECT COUNT(3 AS rd_place) FROM table_1906920_1 WHERE host = "University of Manitoba, Winnipeg, Manitoba"
```
**Base (raw output)**
```
SELECT COUNT(*) FROM table_1906920_1 WHERE host = 'University of Manitoba' AND position = 3
```
-> parsed: `SELECT COUNT(*) FROM table_1906920_1 WHERE host = 'University of Manitoba' AND position = 3` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT COUNT(3 AS rd_placed) FROM table_1906920_1 WHERE host = "University of Manitoba, Winnipeg, Manitoba"
```
-> parsed: `SELECT COUNT(3 AS rd_placed) FROM table_1906920_1 WHERE host = "University of Manitoba, Winnipeg, Manitoba"` | exact match: **no**
---
### 7. What is the attendance for week 11?
```sql
-- schema
CREATE TABLE table_name_59 (attendance VARCHAR, week VARCHAR)
```
**Gold**
```sql
SELECT attendance FROM table_name_59 WHERE week = 11
```
**Base (raw output)**
```
SELECT attendance FROM table_name_59 WHERE week = '11'
```
-> parsed: `SELECT attendance FROM table_name_59 WHERE week = '11'` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT attendance FROM table_name_59 WHERE week = "11"
```
-> parsed: `SELECT attendance FROM table_name_59 WHERE week = "11"` | exact match: **no**
---
### 8. Name the syrian christians for kollam
```sql
-- schema
CREATE TABLE table_23214055_2 (syrian_christians VARCHAR, district VARCHAR)
```
**Gold**
```sql
SELECT syrian_christians FROM table_23214055_2 WHERE district = "Kollam"
```
**Base (raw output)**
```
```sql
SELECT syrian_christians FROM table_23214055_2 WHERE district = 'kollam'
```
```
-> parsed: `SELECT syrian_christians FROM table_23214055_2 WHERE district = 'kollam'` | exact match: **YES**
**Fine-tuned (raw output)**
```
SELECT syrian_christians FROM table_23214055_2 WHERE district = "Kollam"
```
-> parsed: `SELECT syrian_christians FROM table_23214055_2 WHERE district = "Kollam"` | exact match: **YES**
---
### 9. What is every entry for Saturday August 27 when the entry for Thursday August 25 is 23' 56.90 94.528mph?
```sql
-- schema
CREATE TABLE table_30058355_7 (sat_27_aug VARCHAR, thurs_25_aug VARCHAR)
```
**Gold**
```sql
SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph"
```
**Base (raw output)**
```
```sql
SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = '23\' 56.90 94.528mph';
```
```
-> parsed: `SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = '23\' 56.90 94.528mph'` | exact match: **no**
**Fine-tuned (raw output)**
```
SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph"
```
-> parsed: `SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph"` | exact match: **YES**
---
### 10. Which Owner has a Name / Format of 105.3 kool fm - hot adult contemporary?
```sql
-- schema
CREATE TABLE table_name_18 (owner VARCHAR, name___format VARCHAR)
```
**Gold**
```sql
SELECT owner FROM table_name_18 WHERE name___format = "105.3 kool fm - hot adult contemporary"
```
**Base (raw output)**
```
```sql
SELECT owner FROM table_name_18 WHERE name___format = '105.3 kool fm - hot adult contemporary';
```
```
-> parsed: `SELECT owner FROM table_name_18 WHERE name___format = '105.3 kool fm - hot adult contemporary'` | exact match: **YES**
**Fine-tuned (raw output)**
```
SELECT owner FROM table_name_18 WHERE name___format = "105.3 kool fm - hot adult contemporary"
```
-> parsed: `SELECT owner FROM table_name_18 WHERE name___format = "105.3 kool fm - hot adult contemporary"` | exact match: **YES**
---

31
special_tokens_map.json Normal file
View File

@@ -0,0 +1,31 @@
{
"additional_special_tokens": [
"<|im_start|>",
"<|im_end|>",
"<|object_ref_start|>",
"<|object_ref_end|>",
"<|box_start|>",
"<|box_end|>",
"<|quad_start|>",
"<|quad_end|>",
"<|vision_start|>",
"<|vision_end|>",
"<|vision_pad|>",
"<|image_pad|>",
"<|video_pad|>"
],
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
size 11421896

207
tokenizer_config.json Normal file
View File

@@ -0,0 +1,207 @@
{
"add_bos_token": false,
"add_prefix_space": false,
"added_tokens_decoder": {
"151643": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151644": {
"content": "<|im_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151645": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151646": {
"content": "<|object_ref_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151647": {
"content": "<|object_ref_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151648": {
"content": "<|box_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151649": {
"content": "<|box_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151650": {
"content": "<|quad_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151651": {
"content": "<|quad_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151652": {
"content": "<|vision_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151653": {
"content": "<|vision_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151654": {
"content": "<|vision_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151655": {
"content": "<|image_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151656": {
"content": "<|video_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151657": {
"content": "<tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151658": {
"content": "</tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151659": {
"content": "<|fim_prefix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151660": {
"content": "<|fim_middle|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151661": {
"content": "<|fim_suffix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151662": {
"content": "<|fim_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151663": {
"content": "<|repo_name|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151664": {
"content": "<|file_sep|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
}
},
"additional_special_tokens": [
"<|im_start|>",
"<|im_end|>",
"<|object_ref_start|>",
"<|object_ref_end|>",
"<|box_start|>",
"<|box_end|>",
"<|quad_start|>",
"<|quad_end|>",
"<|vision_start|>",
"<|vision_end|>",
"<|vision_pad|>",
"<|image_pad|>",
"<|video_pad|>"
],
"bos_token": null,
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"errors": "replace",
"extra_special_tokens": {},
"model_max_length": 131072,
"pad_token": "<|endoftext|>",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null
}

1
vocab.json Normal file

File diff suppressed because one or more lines are too long