AAP-SQL-E2 / README.md
TommyPanLab's picture
Publish AAP-SQL E2 column retriever
b0b98a3 verified
|
Raw
History Blame Contribute Delete
1.81 kB
---
language:
- en
library_name: sentence-transformers
pipeline_tag: sentence-similarity
base_model: sentence-transformers/all-mpnet-base-v2
tags:
- sentence-transformers
- text2sql
- schema-linking
- aap-sql
---
# AAP-SQL E2 column retriever
AAP-SQL E2 是完整 AAP-SQL 設定中的雙編碼欄位檢索器。它先從資料庫 schema 中取回 50 個候選欄位,再交給 R1 cross-encoder 重排。
AAP-SQL E2 is the bi-encoder column retriever used by the full AAP-SQL configuration. It retrieves 50 schema-column candidates before the R1 cross-encoder reranks them.
## Model details
- Base model: `sentence-transformers/all-mpnet-base-v2`
- Training objective: `MultipleNegativesRankingLoss`
- Training seed: `42`
- Training data: column-retrieval examples derived from the BIRD training split and schema descriptions
- Expected library: `sentence-transformers>=5.1.2`
## Use with AAP-SQL
Download this repository into the path expected by the final runner:
```powershell
hf download TommyPanLab/AAP-SQL-E2 --local-dir models/column_retriever_v3_paper_earlystop
```
Direct loading:
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("TommyPanLab/AAP-SQL-E2")
embeddings = model.encode(["table.column: column description"])
```
The complete pipeline, required BIRD directory layout, and Gemini 3.1 result are documented in the [AAP-SQL publication branch](https://github.com/Tommyweige/AAP-SQL/tree/codex/final-aap-sql-experiment/AAP-SQL-Original).
## Data and license notice
The training examples were derived from the BIRD benchmark. Review the [BIRD project terms](https://bird-bench.github.io/) before using the model. No additional license has been declared for these fine-tuned weights; the upstream model and dataset terms still apply.