Downloads · 30 days
28
19% of all-time downloads
furkanyagiz/flan-t5-base-alzheimer-ultra-safe
flan-t5-base-alzheimer-ultra-safe is a summarization model from furkanyagiz. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains a fine-tuned version of google/flan-t5-base for results- and conclusions-focused summarization of Alzheimer’s disease–related scientific abstracts.
Downloads · 30 days
28
19% of all-time downloads
All-time downloads
146
Public
Parameters
248M
991 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors990 MB · 100%
From the Hugging Face model README
This repository contains a fine-tuned version of google/flan-t5-base for results- and conclusions-focused summarization of Alzheimer’s disease–related scientific abstracts.
google/flan-t5-base (≈250M parameters, encoder–decoder, Apache-2.0)⚠️ Important: This model is intended only for research, education, and literature exploration.
It must not be used as a standalone tool for diagnosis, treatment decisions, or any clinical workflow.
The model tends to emphasize:
This model is not designed or validated for:
google/flan-t5-base (Apache-2.0 licensed, instruction-tuned T5-base).The underlying dataset itself is not included in this repository. This section only documents how the data was used.
RESULTS: and/or CONCLUSIONS: (if present),In other words, training labels are extractive, results-focused summaries derived from the abstracts themselves, not human-written abstractive summaries.
summarize: or a short instruction).teacher_summary (1–3 sentences, mostly extractive).This encourages the model to:
transformersAutoModelForSeq2SeqLMAutoTokenizer for google/flan-t5-baseAdamWObserved loss over 5 epochs (representative run):
Epoch 1 – Train loss ≈ 0.32 | Val loss ≈ 0.18Epoch 5 – Train loss ≈ 0.16 | Val loss ≈ 0.16Combined with qualitative inspection, this indicates:
🔎 Note: The raw model is a standard seq2seq model.
For extra safety, you may want to wrap it with an overlap-based filter that removes sentences not grounded in the abstract (described later under “Safety & hallucination”).
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "ffurkandemir/flan-t5-base-alzheimer-ultra-safe" # or your actual repo ID
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
abstract = """
Alzheimer's disease (AD) is a neurodegenerative disorder...
RESULTS: Patients with moderate-severe periodontitis had a higher risk...
CONCLUSIONS: Our findings suggest that periodontal disease may be associated with...
"""
prompt = (
"Summarize the following abstract in 2-3 sentences, focusing on the main "
"results and conclusions:\n\n" + abstract
)
inputs = tokenizer(
prompt,
return_tensors="pt",
truncation=True,
max_length=512,
)
outputs = model.generate(
**inputs,
max_new_tokens=256, # higher limit to avoid truncation
num_beams=4,
no_repeat_ngram_size=3,
early_stopping=True,
)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(summary)