Text Ranking
Transformers
Safetensors
English
Vietnamese
qwen3
text-generation
reranker
cross-encoder
listwise-reranking
generative-reranker
cve
cybersecurity
qdrant
secAI
Instructions to use DuyTa/sec-rerank with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DuyTa/sec-rerank with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DuyTa/sec-rerank") model = AutoModelForCausalLM.from_pretrained("DuyTa/sec-rerank", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card: set license to apache-2.0; add acceptance (nghiệm thu) model info & KPIs
Browse files
README.md
CHANGED
|
@@ -18,13 +18,16 @@ tags:
|
|
| 18 |
- cybersecurity
|
| 19 |
- qdrant
|
| 20 |
- secAI
|
|
|
|
|
|
|
|
|
|
| 21 |
---
|
| 22 |
|
| 23 |
# sec-rerank
|
| 24 |
|
| 25 |
**This is a fine-tuned version of [Qwen/Qwen3-Reranker-0.6B](https://huggingface.co/Qwen/Qwen3-Reranker-0.6B)** — a **listwise generative reranker** (second-stage ranker), not an embedding model.
|
| 26 |
|
| 27 |
-
It was trained on grouped query–document examples whose **hard negatives were mined from a local Qdrant** collection (`cve_kb`) built from CVE investigation trajectories. It does not emit dense vectors; it reorders first-stage candidates (e.g. from [`DuyTa/sec-embedding`](https://huggingface.co/DuyTa/sec-embedding)).
|
| 28 |
|
| 29 |
## Training
|
| 30 |
|
|
@@ -58,6 +61,21 @@ Positives and negatives are real CVE core-chunk text from local Qdrant `cve_kb`
|
|
| 58 |
|
| 59 |
Split: 33.6k train / 4.2k validation grouped examples.
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
## Inference
|
| 62 |
|
| 63 |
Score each `(query, document)` with the native Qwen3-Reranker generative yes/no head. Use only to **rerank** a short candidate list from dense / hybrid retrieval.
|
|
@@ -74,4 +92,4 @@ Score each `(query, document)` with the native Qwen3-Reranker generative yes/no
|
|
| 74 |
|
| 75 |
## Attribution & license
|
| 76 |
|
| 77 |
-
Derived from [Qwen/Qwen3-Reranker-0.6B](https://huggingface.co/Qwen/Qwen3-Reranker-0.6B) (**Apache-2.0**)
|
|
|
|
| 18 |
- cybersecurity
|
| 19 |
- qdrant
|
| 20 |
- secAI
|
| 21 |
+
datasets:
|
| 22 |
+
- DuyTa/Cyber_F1_v2
|
| 23 |
+
- DuyTa/cve-kgrag-db
|
| 24 |
---
|
| 25 |
|
| 26 |
# sec-rerank
|
| 27 |
|
| 28 |
**This is a fine-tuned version of [Qwen/Qwen3-Reranker-0.6B](https://huggingface.co/Qwen/Qwen3-Reranker-0.6B)** — a **listwise generative reranker** (second-stage ranker), not an embedding model.
|
| 29 |
|
| 30 |
+
It was trained on grouped query–document examples whose **hard negatives were mined from a local Qdrant** collection (`cve_kb`) built from CVE investigation trajectories. It does not emit dense vectors; it reorders first-stage candidates (e.g. from [`DuyTa/sec-embedding`](https://huggingface.co/DuyTa/sec-embedding)). It is the reranker component of the **secAI** stack, paired with [`DuyTa/Cyber-F1-AWQ`](https://huggingface.co/DuyTa/Cyber-F1-AWQ).
|
| 31 |
|
| 32 |
## Training
|
| 33 |
|
|
|
|
| 61 |
|
| 62 |
Split: 33.6k train / 4.2k validation grouped examples.
|
| 63 |
|
| 64 |
+
### Training corpus
|
| 65 |
+
|
| 66 |
+
Built from **five years of authoritative cybersecurity sources**: NVD (173,473 CVEs), MITRE CWE (768 weakness types, mapped to ~92% of CVEs), CAPEC/ATT&CK (443/174 entries) and Exploit-DB (3,139 exploits, 2021–2026). Public datasets: [`DuyTa/Cyber_F1_v2`](https://huggingface.co/datasets/DuyTa/Cyber_F1_v2), [`DuyTa/cve-kgrag-db`](https://huggingface.co/datasets/DuyTa/cve-kgrag-db).
|
| 67 |
+
|
| 68 |
+
## Acceptance (nghiệm thu) — reported KPIs
|
| 69 |
+
|
| 70 |
+
Measured on **NVIDIA A100 80GB** in the full production chatflow (Hybrid Search → Rerank → LLM), on a 1,000-sample security test set (40% CVE identification/classification, 40% remediation advice, 20% real-world scenario reasoning):
|
| 71 |
+
|
| 72 |
+
| Metric | Result | Target | Pass |
|
| 73 |
+
|---|---|---|---|
|
| 74 |
+
| Ranking quality — **Precision@1** | **98.23%** | > 90% | ✅ |
|
| 75 |
+
| Throughput | **4,862 docs/s** (concurrency 128) | ≥ 180 rerank/s | ✅ |
|
| 76 |
+
|
| 77 |
+
Raw per-sample logs (`reranking-precision-at-1.jsonl`) and evaluation code are delivered with the acceptance package.
|
| 78 |
+
|
| 79 |
## Inference
|
| 80 |
|
| 81 |
Score each `(query, document)` with the native Qwen3-Reranker generative yes/no head. Use only to **rerank** a short candidate list from dense / hybrid retrieval.
|
|
|
|
| 92 |
|
| 93 |
## Attribution & license
|
| 94 |
|
| 95 |
+
Released under **Apache-2.0**. Derived from [Qwen/Qwen3-Reranker-0.6B](https://huggingface.co/Qwen/Qwen3-Reranker-0.6B) (**Apache-2.0**); credit for the base reranker belongs to the Qwen team.
|