Downloads · 30 days
10
9% of all-time downloads
furkanyagiz/flan-t5-base-parkinson-abstain-curriculum-v1
flan-t5-base-parkinson-abstain-curriculum-v1 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.
A faithfulness-first abstractive summarization model for Parkinson’s disease–related PubMed abstracts, fine-tuned from google/flan-t5-base.
Downloads · 30 days
10
9% of all-time downloads
All-time downloads
114
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
A faithfulness-first abstractive summarization model for Parkinson’s disease–related PubMed abstracts, fine-tuned from google/flan-t5-base.
This model generates a short summary (typically 2–3 sentences) from a biomedical abstract with a strong bias toward:
Architecture: FLAN-T5 Base (T5-base family; ~220M parameters, encoder-decoder seq2seq).
Good for
Not for
pmid, title, abstract, journal, year, doi, authors, mesh_termsNote: This repository does not include raw PubMed abstracts by default. Ensure you have rights to redistribute any text you upload.
Targets were generated using a heuristic teacher pipeline to “teach” the model what an ideal faithful summary looks like:
INSUFFICIENT_RESULT_INFORMATION
A staged curriculum was used:
Best checkpoint selected by validation loss.
We run a “hallucination quick-check” based on:
Baseline vs SAFE (fixed) on 200 samples:
Interpretation:
Summarize the following Parkinson's disease (PD) abstract in 2-3 sentences.
Use ONLY information that appears in the abstract.
Do NOT add recommendations or speculation.
If results/conclusions are not present, output exactly: INSUFFICIENT_RESULT_INFORMATION
<ABSTRACT>
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
MODEL_ID = "https://huggingface.co/furkanyagiz/flan-t5-base-parkinson-abstain-curriculum-v1"
ABSTAIN = "INSUFFICIENT_RESULT_INFORMATION"
tok = AutoTokenizer.from_pretrained(MODEL_ID)
mdl = AutoModelForSeq2SeqLM.from_pretrained(MODEL_ID)
prompt = (
"Summarize the following Parkinson's disease (PD) abstract in 2-3 sentences.\n"
"Use ONLY information that appears in the abstract.\n"
"Do NOT add recommendations or speculation.\n"
f"If results/conclusions are not present, output exactly: {ABSTAIN}\n\n"
+ abstract
)
inputs = tok(prompt, return_tensors="pt", truncation=True, max_length=512)
out = mdl.generate(
**inputs,
max_new_tokens=256,
num_beams=4,
do_sample=False,
no_repeat_ngram_size=4,
length_penalty=0.8,
repetition_penalty=1.05,
)
summary = tok.decode(out[0], skip_special_tokens=True).strip()
print(summary)
To reduce truncation and formatting artifacts:
(Full reference implementation is in the GitHub repo: https://github.com/ffurkandemir/parkinson-abstract-summarizer)
If you use this model, cite: