PILOT-checkpoints / README.md
anon4papersubmission's picture
Proper model card as the repo front page
2fd2df8 verified
|
Raw
History Blame Contribute Delete
2.36 kB
---
license: mit
library_name: transformers
tags:
- biomedical
- entity-linking
- retrieval
- reranking
- lora
language:
- en
---
# PILOT checkpoints
Trained artifacts for **PILOT: Neighborhood-Aware Dual Biomedical Entity Linking**.
Code (anonymized for review): https://anonymous.4open.science/r/PILOT-92B4
PILOT links a biomedical mention, in its sentence context, to an entity in a large ontological knowledge
base, in three stages: neighborhood-aware retrieval → dual reranking → score fusion.
## Contents
| folder | what it is | size |
|---|---|---|
| `retriever/<ds>/` | SapBERT fine-tuned on that dataset's training mentions. The encoder `φ(·)` used by both the retriever and the surface-form reranker. | 499 MB |
| `reranker/<ds>/` | LoRA adapter for the contextual reranker. Load on top of the base model below. | 151 MB (4B) / 47 MB (0.6B) |
`<ds>``ncbi`, `bc5cdr`, `cometa`, `mm`, `aap_fold0``aap_fold9` (AAP is 10-fold cross-validation).
| dataset | base reranker |
|---|---|
| ncbi, bc5cdr, cometa, aap_fold0..9 | `Qwen/Qwen3-Reranker-4B` |
| mm | `Qwen/Qwen3-Reranker-0.6B` |
Adapters rather than merged models: the merge is deterministic, and 14 merged 4B checkpoints would be
~127 GB against ~2 GB of adapters.
## Results
Test R@1 (top-1 accuracy); AAP is the 10-fold mean.
| NCBI | BC5CDR | COMETA | AAP | MM-ST21pv |
|---|---|---|---|---|
| 93.44 | 95.75 | 87.98 | 91.72 | 74.93 |
## Usage
```bash
pip install -U huggingface_hub
hf download anon4papersubmission/PILOT-checkpoints --local-dir checkpoints
```
The retriever is a plain HF encoder:
```python
from transformers import AutoTokenizer, AutoModel
tok = AutoTokenizer.from_pretrained("checkpoints/retriever/ncbi")
enc = AutoModel.from_pretrained("checkpoints/retriever/ncbi") # CLS pooling, 768-d
```
The reranker is a LoRA adapter — merge it, or load it on the base model:
```bash
python -c "from swift.pipelines import export_main; export_main()" \
--adapters checkpoints/reranker/ncbi --merge_lora true \
--output_dir models/rerank/ncbi_merged --use_hf true
```
See the code repository for the full pipeline (data preparation through evaluation) and for how these
plug into stages 5 and 7.
## License
MIT for the checkpoints. The underlying benchmarks and UMLS retain their own licenses; UMLS requires a
free NLM account.