Qwen3-Reranker-4B โ SQL Template Matcher
Fine-tune of 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.
Inputs
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:
Premise: "Show movies released in _ sorted by popularity desc"
Hypothesis: "What are the top films from 2010 by viewer count?"
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.
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.
Outputs
Three-class logits with this mapping:
| id | label | Meaning in this task |
|---|---|---|
| 0 | entailment |
the two questions are similar (correspond to the same SQL template) |
| 1 | neutral |
unused at training time; logit is untrained |
| 2 | contradiction |
the two questions are not similar |
Use softmax(logits)[0] as the match score (p(entailment)).
References
- Base model: https://huggingface.co/Qwen/Qwen3-Reranker-4B
- Training Data - BIRD Train Set: https://bird-bench.github.io/
- Source repo: https://github.com/SSLab-CSE-IITB/tecod
License
Apache 2.0
- Downloads last month
- 16