--- language: - en library_name: sentence-transformers pipeline_tag: text-ranking base_model: cross-encoder/ms-marco-MiniLM-L6-v2 tags: - sentence-transformers - text-ranking - text2sql - schema-linking - aap-sql --- # AAP-SQL R1 schema reranker AAP-SQL R1 是完整 AAP-SQL 設定中的 cross-encoder schema 重排器。它對 E2 取回的候選欄位評分,保留前 10 個欄位供後續提示增強使用。 AAP-SQL R1 is the cross-encoder schema reranker used by the full AAP-SQL configuration. It scores the candidates returned by E2 and retains the top 10 columns for prompt augmentation. ## Model details - Base model: `cross-encoder/ms-marco-MiniLM-L6-v2` - Training objective: `BinaryCrossEntropyLoss` - Training seed: `42` - Training data: schema-ranking 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-R1 --local-dir models/cross_encoder_schema_paper_repro ``` Direct loading: ```python from sentence_transformers import CrossEncoder model = CrossEncoder("TommyPanLab/AAP-SQL-R1") scores = model.predict([("user question", "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.