Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ru
|
| 5 |
+
tags:
|
| 6 |
+
- efficientrag
|
| 7 |
+
- multi-hop-qa
|
| 8 |
+
- token-classification
|
| 9 |
+
- sequence-classification
|
| 10 |
+
- deberta-v3
|
| 11 |
+
license: mit
|
| 12 |
+
base_model: microsoft/mdeberta-v3-base
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# EfficientRAG Labeler (mdeberta-v3-base)
|
| 16 |
+
|
| 17 |
+
**Labeler** component of [EfficientRAG](https://arxiv.org/abs/2408.04259) — dual-headed DeBERTa model for multi-hop retrieval.
|
| 18 |
+
|
| 19 |
+
## What it does
|
| 20 |
+
|
| 21 |
+
Given a query and a retrieved chunk, the Labeler:
|
| 22 |
+
1. **Sequence classification**: Is this chunk relevant (`CONTINUE`) or irrelevant (`TERMINATE`)?
|
| 23 |
+
2. **Token classification**: Which tokens in the chunk are useful for answering?
|
| 24 |
+
|
| 25 |
+
## Architecture
|
| 26 |
+
|
| 27 |
+
- Base: `microsoft/mdeberta-v3-base` (86M params, multilingual)
|
| 28 |
+
- Custom dual head: `DebertaForSequenceTokenClassification`
|
| 29 |
+
- Token head: binary per-token (useful/useless)
|
| 30 |
+
- Sequence head: binary per-chunk (CONTINUE/TERMINATE)
|
| 31 |
+
|
| 32 |
+
## Training
|
| 33 |
+
|
| 34 |
+
| | |
|
| 35 |
+
|--|--|
|
| 36 |
+
| Data | 30,818 samples (HotpotQA EN + Dragon-derec RU) |
|
| 37 |
+
| Epochs | 2 |
|
| 38 |
+
| Batch size | 4 |
|
| 39 |
+
| LR | 5e-6 |
|
| 40 |
+
| Max length | 384 |
|
| 41 |
+
| Hardware | Apple M3 Pro, ~3.4 hours |
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
## Results on DRAGON benchmark
|
| 48 |
+
|
| 49 |
+
| Metric | Baseline | EfficientRAG | Delta |
|
| 50 |
+
|--------|----------|-------------|-------|
|
| 51 |
+
| MRR (multi-hop) | 0.736 | 0.798 | **+0.062** |
|
| 52 |
+
| MRR (overall) | 0.783 | 0.822 | **+0.040** |
|
| 53 |
+
| Precision | 0.187 | 0.582 | **+0.395** |
|
| 54 |
+
|
| 55 |
+
## Related
|
| 56 |
+
|
| 57 |
+
- Training data: [Necent/efficientrag-labeler-training-data](https://huggingface.co/datasets/Necent/efficientrag-labeler-training-data)
|
| 58 |
+
- Filter model: [Necent/efficientrag-filter-mdeberta-v3-base](https://huggingface.co/Necent/efficientrag-filter-mdeberta-v3-base)
|
| 59 |
+
- Paper: [EfficientRAG (arXiv:2408.04259)](https://arxiv.org/abs/2408.04259)
|