Image-to-Text
Transformers
Safetensors
lana_radgen
feature-extraction
medical-ai
radiology
chest-xray
report-generation
segmentation
anatomical-attention
custom_code
Instructions to use manu02/LAnA-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use manu02/LAnA-v4 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="manu02/LAnA-v4", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("manu02/LAnA-v4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload benchmarked LANA model
Browse filesFiles changed (3)
- README.md+35-53
- model.safetensors+1-1
- run_summary.json+15-132
97 unmodified lines98991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391406 unmodified lines1471481491501511521531541551561571581591601619 unmodified lines17117217317417517617717817918018118218318418518618718818919019119219319497 unmodified linesFrontal-only evaluation using `PA/AP` studies only.These comparison tables are refreshed across the full LAnA collection whenever any collection model is evaluated.### Cross-Model Comparison: All Frontal Test Studies| Metric | LAnA-MIMIC-CHEXPERT | LAnA-MIMIC | LAnA | LAnA-v2 | LAnA-v3 | LAnA-v4 (Model still training) || --- | --- | --- | --- | --- | --- | --- || Run status | `Completed` | `Completed` | `Completed` | `Completed` | `Completed` | `Model still training` || Number of studies | `3041` | `3041` | `3041` | `3041` | `3041` | `3041` || ROUGE-L | `0.1513` | `0.1653` | `0.1686` | `0.1670` | `0.1745` | `0.1676` || BLEU-1 | `0.1707` | `0.1916` | `0.2091` | `0.2174` | `0.2346` | `0.2247` || BLEU-4 | `0.0357` | `0.0386` | `0.0417` | `0.0417` | `0.0484` | `0.0439` || METEOR | `0.2079` | `0.2202` | `0.2298` | `0.2063` | `0.2129` | `0.2005` || RadGraph F1 | `0.0918` | `0.0921` | `0.1024` | `0.1057` | `0.0939` | `0.0792` || RadGraph entity F1 | `0.1399` | `0.1459` | `0.1587` | `0.1569` | `0.1441` | `0.1443` || RadGraph relation F1 | `0.1246` | `0.1322` | `0.1443` | `0.1474` | `0.1280` | `0.1299` || CheXpert F1 14-micro | `0.1829` | `0.1565` | `0.2116` | `0.1401` | `0.3116` | `0.2228` || CheXpert F1 5-micro | `0.2183` | `0.1530` | `0.2512` | `0.2506` | `0.2486` | `0.0549` || CheXpert F1 14-macro | `0.1095` | `0.0713` | `0.1095` | `0.0401` | `0.1363` | `0.0736` || CheXpert F1 5-macro | `0.1634` | `0.1007` | `0.1644` | `0.1004` | `0.1686` | `0.0342` |### Cross-Model Comparison: Findings-Only Frontal Test Studies| Metric | LAnA-MIMIC-CHEXPERT | LAnA-MIMIC | LAnA | LAnA-v2 | LAnA-v3 | LAnA-v4 (Model still training) || --- | --- | --- | --- | --- | --- | --- || Run status | `Completed` | `Completed` | `Completed` | `Completed` | `Completed` | `Model still training` || Number of studies | `2210` | `2210` | `2210` | `2210` | `2210` | `2210` || ROUGE-L | `0.1576` | `0.1720` | `0.1771` | `0.1771` | `0.1848` | `0.1752` || BLEU-1 | `0.1754` | `0.2003` | `0.2177` | `0.2263` | `0.2480` | `0.2343` || BLEU-4 | `0.0405` | `0.0449` | `0.0484` | `0.0487` | `0.0573` | `0.0508` || METEOR | `0.2207` | `0.2347` | `0.2466` | `0.2240` | `0.2310` | `0.2138` || RadGraph F1 | `0.1010` | `0.1000` | `0.1119` | `0.1181` | `0.1046` | `0.0900` || RadGraph entity F1 | `0.1517` | `0.1577` | `0.1713` | `0.1739` | `0.1584` | `0.1567` || RadGraph relation F1 | `0.1347` | `0.1413` | `0.1549` | `0.1628` | `0.1405` | `0.1410` || CheXpert F1 14-micro | `0.1651` | `0.1442` | `0.1907` | `0.1365` | `0.2921` | `0.2229` || CheXpert F1 5-micro | `0.2152` | `0.1716` | `0.2415` | `0.2455` | `0.2394` | `0.0566` || CheXpert F1 14-macro | `0.1047` | `0.0700` | `0.1039` | `0.0381` | `0.1326` | `0.0724` || CheXpert F1 5-macro | `0.1611` | `0.1112` | `0.1578` | `0.0952` | `0.1636` | `0.0351` |## Data6 unmodified lines- Medical report metrics implemented in the repository include RadGraph F1 and CheXpert F1 (`14-micro`, `5-micro`, `14-macro`, `5-macro`).## Experiment Model Descriptions- `LAnA-MIMIC-CHEXPERT`: This variant was trained on a combined dataset of `CheXpert` and `MIMIC-CXR` using LoRA fine-tuning with the `AdamW` optimizer.- `LAnA-MIMIC`: This model was trained on the `MIMIC-CXR (findings-only)` dataset using LoRA fine-tuning with the `AdamW` optimizer.- `LAnA`: This model was trained on the `MIMIC-CXR (findings-only)` dataset using full-model optimization with `AdamW` instead of LoRA.- `LAnA-v2`: This version keeps the same training setup as `LAnA`, but increases the effective global batch size from `16` to `128`.- `LAnA-v3`: This version keeps the same training setup as `LAnA`, including the effective global batch size of `16`, but changes how EOS is handled so training and generation follow the same behavior. The model no longer uses the EOS token during training, and generation remained greedy without stopping when an EOS token was produced. In the previous setup, decoding was also greedy, stopped at EOS, and used a maximum of `128` new tokens.- `LAnA-v4`: This version keeps the same decoding behavior as `LAnA-v3`, but increases the effective global batch size from `16` to `128`.## Training Snapshot- Run: `LAnA-v4`9 unmodified lines- Scheduler: `cosine`- Warmup steps: `165`- Weight decay: `0.01`- Steps completed: `3075`- Planned total steps: `3297`- Images seen: `394249`- Total training time: `7.5001` hours- Hardware: `NVIDIA GeForce RTX 5070`- Final train loss: `1.1786`- Validation loss: `1.6553`## Status- Project status: `Training in progress`- Release status: `Research preview checkpoint`- Current checkpoint status: `Not final`- Training completion toward planned run: `93.49%` (`3` / `3` epochs)- Current published metrics are intermediate and will change as training continues.## Notes- Set `HF_TOKEN` with permission to access the DINOv3 repositories required by this model before downloading or running inference.- `segmenters/` contains the lung and heart segmentation checkpoints used to build anatomical attention masks.- `evaluations/mimic_test_metrics.json` contains the latest saved MIMIC test metrics.97 unmodified lines98991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301316 unmodified lines1381391401411421439 unmodified lines15315415515615715815916016116216316416516616716816917017117217317417517697 unmodified linesFrontal-only evaluation using `PA/AP` studies only.### Current Checkpoint Results| Metric | Value || --- | --- || Number of studies | TBD || RadGraph F1 | TBD || RadGraph entity F1 | TBD || RadGraph relation F1 | TBD || CheXpert F1 14-micro | TBD || CheXpert F1 5-micro | TBD || CheXpert F1 14-macro | TBD || CheXpert F1 5-macro | TBD |### Final Completed Training ResultsThe final table will be populated when the planned training run is completed. Until then, final-report metrics remain `TBD`.| Metric | Value || --- | --- || Number of studies | TBD || RadGraph F1 | TBD || RadGraph entity F1 | TBD || RadGraph relation F1 | TBD || CheXpert F1 14-micro | TBD || CheXpert F1 5-micro | TBD || CheXpert F1 14-macro | TBD || CheXpert F1 5-macro | TBD |## Data6 unmodified lines- Medical report metrics implemented in the repository include RadGraph F1 and CheXpert F1 (`14-micro`, `5-micro`, `14-macro`, `5-macro`).## Training Snapshot- Run: `LAnA-v4`9 unmodified lines- Scheduler: `cosine`- Warmup steps: `165`- Weight decay: `0.01`- Steps completed: `3289`- Planned total steps: `3297`- Images seen: `421707`- Total training time: `8.0982` hours- Hardware: `NVIDIA GeForce RTX 5070`- Final train loss: `1.9641`- Validation loss: `1.6446`## Status- Project status: `Training in progress`- Release status: `Research preview checkpoint`- Current checkpoint status: `Not final`- Training completion toward planned run: `100.00%` (`3` / `3` epochs)- Current published metrics are intermediate and will change as training continues.## Notes- Set `HF_TOKEN` with permission to access the DINOv3 repositories required by this model before downloading or running inference.- `segmenters/` contains the lung and heart segmentation checkpoints used to build anatomical attention masks.- `evaluations/mimic_test_metrics.json` contains the latest saved MIMIC test metrics.
123version https://git-lfs.github.com/spec/v1oid sha256:ed2b21d21d27a25ef8f3d4e7cc0145fc7266a768bb4397366166f39007f3e563size 1152546464123version https://git-lfs.github.com/spec/v1oid sha256:cd099dd6604efe4ed12b2aea6b1a0e80cf53a4e0c139bc4a13d77e4a19d915aesize 1152546464
12345678910111213141516171818 unmodified lines373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165{"method": "full_adamw","run_name": "LAnA-v4","steps": 3075,"epochs_completed": 2,"epoch_index": 2,"target_epochs": 3,"progress_epochs": 2.8046653245025572,"training_completion_percent": 93.48884415008524,"elapsed_seconds": 27000.266715600002,"images_seen": 394249,"train_loss_last": 1.1785972118377686,"train_loss_mean": 2.037826863495392,"val_loss": 1.6553147077560424,"images_per_second": 14.601670574321176,"trainable_params": 125522688,"vision_model_name": "facebook/dinov3-vits16-pretrain-lvd1689m","text_model_name": "gpt2",18 unmodified lines"seed": 42,"resume_supported": true,"checkpoint_every_n_steps": 1000,"cumulative_loss_sum": 803411.2031061947,"cumulative_loss_count": 394249,"completed": false,"target_duration_seconds": 3600,"target_duration_mode": "per_invocation","repo_id": "manu02/LAnA-v4","train_datasets": "MIMIC-CXR (findings-only)","validation_datasets": "MIMIC-CXR (findings-only)","repo_url": "https://huggingface.co/manu02/LAnA-v4","latest_evaluation": {"split": "test","subset": "all frontal studies","dataset": "mimic-cxr","view_filter": "frontal-only (PA/AP)","num_examples": 3041,"bleu_1": 0.22466909304042493,"bleu_4": 0.043919975602752334,"meteor": 0.20049977335710334,"rouge_l": 0.16756058992939854,"chexpert_f1_14_micro": 0.22279554040357505,"chexpert_f1_5_micro": 0.05494209534069486,"chexpert_f1_14_macro": 0.07355641991775376,"chexpert_f1_5_macro": 0.034170854271356785,"chexpert_f1_micro": 0.22279554040357505,"chexpert_f1_macro": 0.07355641991775376,"chexpert_per_label_f1": {"Enlarged Cardiomediastinum": 0.0,"Cardiomegaly": 0.1708542713567839,"Lung Opacity": 0.0,"Lung Lesion": 0.0,"Edema": 0.0,"Consolidation": 0.0,"Pneumonia": 0.0,"Atelectasis": 0.0,"Pneumothorax": 0.0,"Pleural Effusion": 0.0,"Pleural Other": 0.0,"Fracture": 0.0,"Support Devices": 0.5644329896907216,"No Finding": 0.29450261780104714},"radgraph_f1": 0.0791523357254355,"radgraph_f1_entity": 0.1443115199444943,"radgraph_f1_relation": 0.12993022073120553,"radgraph_available": true,"radgraph_error": null},"latest_evaluations": {"all_test": {"split": "test","subset": "all frontal studies","dataset": "mimic-cxr","view_filter": "frontal-only (PA/AP)","num_examples": 3041,"bleu_1": 0.22466909304042493,"bleu_4": 0.043919975602752334,"meteor": 0.20049977335710334,"rouge_l": 0.16756058992939854,"chexpert_f1_14_micro": 0.22279554040357505,"chexpert_f1_5_micro": 0.05494209534069486,"chexpert_f1_14_macro": 0.07355641991775376,"chexpert_f1_5_macro": 0.034170854271356785,"chexpert_f1_micro": 0.22279554040357505,"chexpert_f1_macro": 0.07355641991775376,"chexpert_per_label_f1": {"Enlarged Cardiomediastinum": 0.0,"Cardiomegaly": 0.1708542713567839,"Lung Opacity": 0.0,"Lung Lesion": 0.0,"Edema": 0.0,"Consolidation": 0.0,"Pneumonia": 0.0,"Atelectasis": 0.0,"Pneumothorax": 0.0,"Pleural Effusion": 0.0,"Pleural Other": 0.0,"Fracture": 0.0,"Support Devices": 0.5644329896907216,"No Finding": 0.29450261780104714},"radgraph_f1": 0.0791523357254355,"radgraph_f1_entity": 0.1443115199444943,"radgraph_f1_relation": 0.12993022073120553,"radgraph_available": true,"radgraph_error": null},"findings_only_test": {"split": "test","subset": "findings-only frontal studies","dataset": "mimic-cxr","view_filter": "frontal-only (PA/AP), structured Findings section only","num_examples": 2210,"bleu_1": 0.23428333207003713,"bleu_4": 0.05076939437931996,"meteor": 0.21379406362615114,"rouge_l": 0.17515008816614538,"chexpert_f1_14_micro": 0.22289738986327856,"chexpert_f1_5_micro": 0.056563951034191644,"chexpert_f1_14_macro": 0.07235490647135043,"chexpert_f1_5_macro": 0.03507853403141361,"chexpert_f1_micro": 0.22289738986327856,"chexpert_f1_macro": 0.07235490647135043,"chexpert_per_label_f1": {"Enlarged Cardiomediastinum": 0.0,"Cardiomegaly": 0.17539267015706805,"Lung Opacity": 0.0,"Lung Lesion": 0.0,"Edema": 0.0,"Consolidation": 0.0,"Pneumonia": 0.0,"Atelectasis": 0.0,"Pneumothorax": 0.0,"Pleural Effusion": 0.0,"Pleural Other": 0.0,"Fracture": 0.0,"Support Devices": 0.48633093525179855,"No Finding": 0.35124508519003933},"radgraph_f1": 0.09000123209087225,"radgraph_f1_entity": 0.15665513076129836,"radgraph_f1_relation": 0.14101742529549965,"radgraph_available": true,"radgraph_error": null}}}12345678910111213141516171818 unmodified lines373839404142434445464748{"method": "full_adamw","run_name": "LAnA-v4","steps": 3289,"epochs_completed": 3,"epoch_index": 3,"target_epochs": 3,"progress_epochs": 4.0,"training_completion_percent": 100.0,"elapsed_seconds": 29153.5889147,"images_seen": 421707,"train_loss_last": 1.9640858173370361,"train_loss_mean": 2.007043061655561,"val_loss": 1.6445714235305786,"images_per_second": 14.465011537134089,"trainable_params": 125522688,"vision_model_name": "facebook/dinov3-vits16-pretrain-lvd1689m","text_model_name": "gpt2",18 unmodified lines"seed": 42,"resume_supported": true,"checkpoint_every_n_steps": 1000,"cumulative_loss_sum": 846384.1084015816,"cumulative_loss_count": 421707,"completed": true,"target_duration_seconds": 3600,"target_duration_mode": "per_invocation","repo_id": "manu02/LAnA-v4","train_datasets": "MIMIC-CXR (findings-only)","validation_datasets": "MIMIC-CXR (findings-only)"}
README.md+35-53
model.safetensors+1-1
run_summary.json+15-132