smitxxiv commited on
Commit
9a1986d
·
verified ·
1 Parent(s): 51893d1

Add model card

Browse files
Files changed (1) hide show
  1. README.md +55 -0
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3-Reranker-4B
3
+ library_name: transformers
4
+ pipeline_tag: text-classification
5
+ tags:
6
+ - text-to-sql
7
+ - sql
8
+ - template-matching
9
+ - nli
10
+ - paraphrase
11
+ - reranker
12
+ - qwen3
13
+ language:
14
+ - en
15
+ license: apache-2.0
16
+ ---
17
+
18
+ # Qwen3-Reranker-4B — SQL Template Matcher
19
+
20
+ Fine-tune of [`Qwen/Qwen3-Reranker-4B`](https://huggingface.co/Qwen/Qwen3-Reranker-4B) as a cross-encoder NLI classifier over pairs of natural-language questions. Given a user's question and a candidate question (with entity values masked), it predicts whether the user question is paraphrase of candidate question.
21
+
22
+ ### Inputs
23
+
24
+ A pair of natural-language questions fed through the tokenizer as a standard cross-encoder input. Order matters — premise must be the masked candidate, hypothesis the raw user question:
25
+
26
+ ```
27
+ Premise: "Show movies released in _ sorted by popularity desc"
28
+ Hypothesis: "What are the top films from 2010 by viewer count?"
29
+ ```
30
+
31
+ Entity values in the premise are masked with a space-padded underscore `_`. All literal types (numbers, strings, dates) use the same token. Swapping the order or using a different masking convention will degrade performance.
32
+
33
+ Training used the tokenizer's default max length with `truncation=True`; BIRD question pairs are typically short (~20–40 tokens each). Very long inputs are untested.
34
+
35
+ ### Outputs
36
+
37
+ Three-class logits with this mapping:
38
+
39
+ | id | label | Meaning in this task |
40
+ |---:|---|---|
41
+ | 0 | `entailment` | the two questions are similar (correspond to the same SQL template) |
42
+ | 1 | `neutral` | unused at training time; logit is untrained |
43
+ | 2 | `contradiction` | the two questions are not similar |
44
+
45
+ Use `softmax(logits)[0]` as the match score (`p(entailment)`).
46
+
47
+ ## References
48
+
49
+ - Base model: <https://huggingface.co/Qwen/Qwen3-Reranker-4B>
50
+ - Training Data - BIRD Train Set: <https://bird-bench.github.io/>
51
+ - Source repo: <https://github.com/SSLab-CSE-IITB/tecod>
52
+
53
+ ## License
54
+
55
+ Apache 2.0