moudy93/radiology-summarization-t5-lora
Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
Model Details
Model Description
<!-- Provide a longer summary of what this model is. -->
- Developed by: MAHAMAT YOUSSOUF
- Funded by [optional]: Self-funded / Personal project
- Shared by [optional]: [More Information Needed]
- Model type: Transformer-based Text-to-Text model (T5-base fine-tuned for summarization)
- Language(s) (NLP): English
- License: Apache 2.0
- Finetuned from model [optional]: t5-base
Model Sources [optional]
<!-- Provide the basic links for the model. -->
- Repository: https://huggingface.co/moudy93/radiology-summarization-t5-lora
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> Summarization of radiology reports (e.g., converting long findings into concise clinical summaries)
Assisting healthcare NLP pipelines for report abstraction
Educational use for NLP model fine-tuning demonstrations
Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> Integration into clinical decision support systems (non-diagnostic support only)
Use in Retrieval-Augmented Generation (RAG) pipelines for medical QA
Preprocessing step for structured medical data extraction
Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
The model inherits biases from the training dataset (radiology reports may reflect demographic or institutional bias)
Limited generalization outside radiology domain
May generate hallucinated or incomplete summaries
Not suitable for real-world clinical decision-making without expert oversight
Performance depends heavily on input formatting and report style
Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. -Validate outputs with domain experts before use in healthcare contexts
-Avoid using outputs as standalone medical advice
-Monitor for hallucinations and factual inconsistencies
-Fine-tune further if adapting to different medical datasets
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import T5Tokenizer, T5ForConditionalGeneration
model_name = "https://huggingface.co/moudy93/radiology-summarization-t5-lora"
tokenizer = T5Tokenizer.frompretrained(modelname) model = T5ForConditionalGeneration.frompretrained(modelname)
input_text = "summarize: The lungs are clear. No focal consolidation, pleural effusion, or pneumothorax."
inputs = tokenizer(inputtext, returntensors="pt", truncation=True) outputs = model.generate(**inputs, max_length=64)
summary = tokenizer.decode(outputs[0], skipspecialtokens=True) print(summary)
Training Details
Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
"NLMCXR_reports" / "ecgen-radiology" Training Data
Dataset: Radiology report dataset (NLMCXR_reports/ecgen-radiology dataset)
Size: ~3995 samples
Input: Full radiology findings
Target: Corresponding summaries/impressions
Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
Preprocessing [optional]
Removed XML/HTML tags and special characters
Normalized whitespace and lowercased text
Added task prefix: "summarize:"
Tokenization using T5 tokenizer with truncation and padding
Training Hyperparameters
- Training regime: [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
Evaluation
<!-- This section describes the evaluation protocols and provides the results. --> Testing Data, Factors & Metrics
Testing Data
Held-out validation/test split from the same dataset 10%
Factors
-Input length variability
-Clinical terminology complexity
-Report structure differences
Metrics
ROUGE-1
ROUGE-2
ROUGE-L
Results
ROUGE-1: ~0.56
ROUGE-2: 0.46
ROUGE-L: 0.56
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
Results
[More Information Needed]
Summary
-The model performs well on structured radiology reports
-Struggles with rare conditions or highly unstructured text
-Generates concise and readable summaries in most cases
Technical Specifications
Model Architecture and Objective
Encoder-decoder Transformer (T5)
Objective: Sequence-to-sequence text generation (summarization)
Compute Infrastructure
Single GPU training environment
Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: [More Information Needed]
- Hours used: [More Information Needed]
- Cloud Provider: [More Information Needed]
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
[More Information Needed]
Compute Infrastructure
[More Information Needed]
Hardware
[More Information Needed]
Software
-Python3
-PyTorch
-Hugging Face Transformers
-Datasets library
[More Information Needed]
Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
More Information [optional]
[More Information Needed]
Model Card Authors [optional]
[More Information Needed]
Model Card Contact
[More Information Needed]
Framework versions
- PEFT 0.19.1
