Text Generation
Transformers
Safetensors
French
llama_longbel
biomedical-entity-linking
entity-linking
entity-disambiguation
named-entity-linking
biomedical
healthcare
umls
quaero
emea
constrained-decoding
causal-lm
llm
conversational
custom_code
Eval Results (legacy)
Instructions to use AnonymousARR42/LongBEL_8B_QUAERO_EMEA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnonymousARR42/LongBEL_8B_QUAERO_EMEA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AnonymousARR42/LongBEL_8B_QUAERO_EMEA", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AnonymousARR42/LongBEL_8B_QUAERO_EMEA", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AnonymousARR42/LongBEL_8B_QUAERO_EMEA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AnonymousARR42/LongBEL_8B_QUAERO_EMEA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AnonymousARR42/LongBEL_8B_QUAERO_EMEA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AnonymousARR42/LongBEL_8B_QUAERO_EMEA
- SGLang
How to use AnonymousARR42/LongBEL_8B_QUAERO_EMEA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AnonymousARR42/LongBEL_8B_QUAERO_EMEA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AnonymousARR42/LongBEL_8B_QUAERO_EMEA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AnonymousARR42/LongBEL_8B_QUAERO_EMEA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AnonymousARR42/LongBEL_8B_QUAERO_EMEA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AnonymousARR42/LongBEL_8B_QUAERO_EMEA with Docker Model Runner:
docker model run hf.co/AnonymousARR42/LongBEL_8B_QUAERO_EMEA
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -16,6 +16,7 @@ tags:
|
|
| 16 |
- healthcare
|
| 17 |
- umls
|
| 18 |
- quaero
|
|
|
|
| 19 |
- text-generation
|
| 20 |
- constrained-decoding
|
| 21 |
- causal-lm
|
|
@@ -172,114 +173,134 @@ for i in range(0, len(predictions), num_beams):
|
|
| 172 |
**Example Output:**
|
| 173 |
|
| 174 |
```text
|
| 175 |
-
## Mention 1:
|
| 176 |
- Beam 1:
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
|
| 181 |
- Beam 2:
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
|
| 186 |
- Beam 3:
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
|
| 191 |
- Beam 4:
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
|
| 196 |
- Beam 5:
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
|
| 201 |
-
## Mention 2:
|
| 202 |
- Beam 1:
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
|
| 207 |
- Beam 2:
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
|
| 212 |
- Beam 3:
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
|
| 217 |
- Beam 4:
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
|
| 222 |
- Beam 5:
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
|
| 227 |
-
## Mention 3:
|
| 228 |
- Beam 1:
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
|
| 233 |
- Beam 2:
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
|
| 238 |
- Beam 3:
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
|
| 243 |
- Beam 4:
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
|
| 248 |
- Beam 5:
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
|
| 253 |
## Mention 4: PET
|
| 254 |
- Beam 1:
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
|
| 259 |
- Beam 2:
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
|
| 264 |
- Beam 3:
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
|
| 269 |
- Beam 4:
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
|
| 274 |
- Beam 5:
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
```
|
| 279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
## Evaluation
|
| 281 |
|
| 282 |
-
Entity linking performance is reported using Recall@1 with bootstrap confidence intervals. The best result is shown in **bold**, and the second-best result is <u>underlined</u>.
|
| 283 |
|
| 284 |
| Model | MM-ST21PV<br>(English) | QUAERO-EMEA<br>(French) | SympTEMIST<br>(Spanish) | DisTEMIST<br>(Spanish) | MedProcNER<br>(Spanish) |
|
| 285 |
| :--- | :---: | :---: | :---: | :---: | :---: |
|
|
@@ -297,7 +318,7 @@ Entity linking performance is reported using Recall@1 with bootstrap confidence
|
|
| 297 |
| **Global-Context BEL: LongBEL** ||||| |
|
| 298 |
| LongBEL-1B | 77.6 ± 0.9 | 74.5 ± 3.7 | 59.8 ± 2.5 | 61.9 ± 2.4 | 66.6 ± 2.1 |
|
| 299 |
| LongBEL-1B + Ensemble | 78.6 ± 0.8 | <u>77.2 ± 3.0</u> | 61.8 ± 2.5 | <u>64.3 ± 2.2</u> | <u>69.0 ± 2.0</u> |
|
| 300 |
-
| **LongBEL-8B** | <u>79.3 ± 0.8</u> | 75.4 ± 3.4 | <u>62.0 ± 2.6</u> | 63.6 ± 2.1 | <u>69.0 ± 2.1</u> |
|
| 301 |
| LongBEL-8B + Ensemble | **80.0 ± 0.8** | **77.6 ± 3.0** | **63.3 ± 2.5** | **65.8 ± 2.2** | **71.0 ± 2.0** |
|
| 302 |
|
| 303 |
The score reported for this checkpoint is the **single LongBEL-8B model**. The ensemble result requires fusing several LongBEL input configurations and is not produced by this checkpoint alone.
|
|
@@ -327,17 +348,4 @@ This model is intended for research use. It should not be used for clinical deci
|
|
| 327 |
|
| 328 |
Code and evaluation scripts are available in this [GitHub repository](https://anonymous.4open.science/r/LongBEL-31AD).
|
| 329 |
|
| 330 |
-
Trained model checkpoints and processed datasets are available in the anonymous Hugging Face collection associated with LongBEL.
|
| 331 |
-
|
| 332 |
-
<!-- ## Citation
|
| 333 |
-
|
| 334 |
-
If you use this model, please cite the LongBEL paper.
|
| 335 |
-
|
| 336 |
-
```bibtex
|
| 337 |
-
@inproceedings{longbel2026,
|
| 338 |
-
title = {LongBEL: Long-Context and Document-Consistent Biomedical Entity Linking},
|
| 339 |
-
author = {Anonymous},
|
| 340 |
-
booktitle = {Anonymous submission},
|
| 341 |
-
year = {2026}
|
| 342 |
-
}
|
| 343 |
-
``` -->
|
|
|
|
| 16 |
- healthcare
|
| 17 |
- umls
|
| 18 |
- quaero
|
| 19 |
+
- emea
|
| 20 |
- text-generation
|
| 21 |
- constrained-decoding
|
| 22 |
- causal-lm
|
|
|
|
| 173 |
**Example Output:**
|
| 174 |
|
| 175 |
```text
|
| 176 |
+
## Mention 1: femme enceinte
|
| 177 |
- Beam 1:
|
| 178 |
+
Predicted concept name: Femmes enceintes
|
| 179 |
+
Predicted code: C0033011
|
| 180 |
+
Beam score: 1.000
|
| 181 |
|
| 182 |
- Beam 2:
|
| 183 |
+
Predicted concept name: Femmes (mariage)
|
| 184 |
+
Predicted code: C0242665
|
| 185 |
+
Beam score: 0.000
|
| 186 |
|
| 187 |
- Beam 3:
|
| 188 |
+
Predicted concept name: Femmes en postpartum
|
| 189 |
+
Predicted code: C0032804
|
| 190 |
+
Beam score: 0.000
|
| 191 |
|
| 192 |
- Beam 4:
|
| 193 |
+
Predicted concept name: Femmes en post-partum
|
| 194 |
+
Predicted code: C0032804
|
| 195 |
+
Beam score: 0.000
|
| 196 |
|
| 197 |
- Beam 5:
|
| 198 |
+
Predicted concept name: Females
|
| 199 |
+
Predicted code: C0086287
|
| 200 |
+
Beam score: 0.000
|
| 201 |
|
| 202 |
+
## Mention 2: hypertension sévère
|
| 203 |
- Beam 1:
|
| 204 |
+
Predicted concept name: Hypotension, non précisée
|
| 205 |
+
Predicted code: C0020649
|
| 206 |
+
Beam score: 0.029
|
| 207 |
|
| 208 |
- Beam 2:
|
| 209 |
+
Predicted concept name: Pression sanguine augmentée
|
| 210 |
+
Predicted code: C0497247
|
| 211 |
+
Beam score: 0.007
|
| 212 |
|
| 213 |
- Beam 3:
|
| 214 |
+
Predicted concept name: Hypertension; encephalopathy
|
| 215 |
+
Predicted code: C1396475
|
| 216 |
+
Beam score: 0.001
|
| 217 |
|
| 218 |
- Beam 4:
|
| 219 |
+
Predicted concept name: Hypertension;in pregnancy
|
| 220 |
+
Predicted code: C0565599
|
| 221 |
+
Beam score: 0.001
|
| 222 |
|
| 223 |
- Beam 5:
|
| 224 |
+
Predicted concept name: Pression sanguine non mesurable
|
| 225 |
+
Predicted code: C0858911
|
| 226 |
+
Beam score: 0.000
|
| 227 |
|
| 228 |
+
## Mention 3: protéinurie
|
| 229 |
- Beam 1:
|
| 230 |
+
Predicted concept name: Protéinurie
|
| 231 |
+
Predicted code: C0033687
|
| 232 |
+
Beam score: 1.000
|
| 233 |
|
| 234 |
- Beam 2:
|
| 235 |
+
Predicted concept name: Protéinurie - aggravée
|
| 236 |
+
Predicted code: C0856146
|
| 237 |
+
Beam score: 0.002
|
| 238 |
|
| 239 |
- Beam 3:
|
| 240 |
+
Predicted concept name: Protéine urinaire positive
|
| 241 |
+
Predicted code: C0033687
|
| 242 |
+
Beam score: 0.000
|
| 243 |
|
| 244 |
- Beam 4:
|
| 245 |
+
Predicted concept name: Protéine urinaire de Bence Jones présente
|
| 246 |
+
Predicted code: C0854075
|
| 247 |
+
Beam score: 0.000
|
| 248 |
|
| 249 |
- Beam 5:
|
| 250 |
+
Predicted concept name: Protéine urinaire de Bence Jones absente
|
| 251 |
+
Predicted code: C0855589
|
| 252 |
+
Beam score: 0.000
|
| 253 |
|
| 254 |
## Mention 4: PET
|
| 255 |
- Beam 1:
|
| 256 |
+
Predicted concept name: Petechial hemorrhage
|
| 257 |
+
Predicted code: C0031256
|
| 258 |
+
Beam score: 0.073
|
| 259 |
|
| 260 |
- Beam 2:
|
| 261 |
+
Predicted concept name: Petechial; hemorrhage
|
| 262 |
+
Predicted code: C0031256
|
| 263 |
+
Beam score: 0.022
|
| 264 |
|
| 265 |
- Beam 3:
|
| 266 |
+
Predicted concept name: Petechia
|
| 267 |
+
Predicted code: C0031256
|
| 268 |
+
Beam score: 0.008
|
| 269 |
|
| 270 |
- Beam 4:
|
| 271 |
+
Predicted concept name: PET - Pre-eclamptic toxaemia
|
| 272 |
+
Predicted code: C0032914
|
| 273 |
+
Beam score: 0.001
|
| 274 |
|
| 275 |
- Beam 5:
|
| 276 |
+
Predicted concept name: Petechial hemorrhages
|
| 277 |
+
Predicted code: C0031256
|
| 278 |
+
Beam score: 0.000
|
| 279 |
```
|
| 280 |
|
| 281 |
+
### Saliency map example
|
| 282 |
+
|
| 283 |
+
The model can also return token-level saliency maps during inference.
|
| 284 |
+
|
| 285 |
+
```python
|
| 286 |
+
predictions, saliency_maps = model.sample(
|
| 287 |
+
bigbio_pages=bigbio_pages,
|
| 288 |
+
num_beams=num_beams,
|
| 289 |
+
with_saliency_maps=True,
|
| 290 |
+
)
|
| 291 |
+
|
| 292 |
+
model.display_saliency_map(saliency_maps[3])
|
| 293 |
+
````
|
| 294 |
+
|
| 295 |
+
Example saliency map for the mention `PET`:
|
| 296 |
+
|
| 297 |
+
<p align="center">
|
| 298 |
+
<img src="saliency_map.png" alt="Saliency map for PET prediction" width="900">
|
| 299 |
+
</p>
|
| 300 |
+
|
| 301 |
## Evaluation
|
| 302 |
|
| 303 |
+
Entity linking performance is reported using Recall@1 with bootstrap confidence intervals. The best result is shown in **bold**, and the second-best result is <u>underlined</u> and ⭐ marks the main LongBEL-8B model.
|
| 304 |
|
| 305 |
| Model | MM-ST21PV<br>(English) | QUAERO-EMEA<br>(French) | SympTEMIST<br>(Spanish) | DisTEMIST<br>(Spanish) | MedProcNER<br>(Spanish) |
|
| 306 |
| :--- | :---: | :---: | :---: | :---: | :---: |
|
|
|
|
| 318 |
| **Global-Context BEL: LongBEL** ||||| |
|
| 319 |
| LongBEL-1B | 77.6 ± 0.9 | 74.5 ± 3.7 | 59.8 ± 2.5 | 61.9 ± 2.4 | 66.6 ± 2.1 |
|
| 320 |
| LongBEL-1B + Ensemble | 78.6 ± 0.8 | <u>77.2 ± 3.0</u> | 61.8 ± 2.5 | <u>64.3 ± 2.2</u> | <u>69.0 ± 2.0</u> |
|
| 321 |
+
| **⭐ LongBEL-8B** | <u>79.3 ± 0.8</u> | 75.4 ± 3.4 | <u>62.0 ± 2.6</u> | 63.6 ± 2.1 | <u>69.0 ± 2.1</u> |
|
| 322 |
| LongBEL-8B + Ensemble | **80.0 ± 0.8** | **77.6 ± 3.0** | **63.3 ± 2.5** | **65.8 ± 2.2** | **71.0 ± 2.0** |
|
| 323 |
|
| 324 |
The score reported for this checkpoint is the **single LongBEL-8B model**. The ensemble result requires fusing several LongBEL input configurations and is not produced by this checkpoint alone.
|
|
|
|
| 348 |
|
| 349 |
Code and evaluation scripts are available in this [GitHub repository](https://anonymous.4open.science/r/LongBEL-31AD).
|
| 350 |
|
| 351 |
+
Trained model checkpoints and processed datasets are available in the anonymous Hugging Face collection associated with LongBEL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|