Instructions to use xtie/BARTScore-PET with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xtie/BARTScore-PET with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" 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("summarization", model="xtie/BARTScore-PET")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("xtie/BARTScore-PET") model = AutoModelForSeq2SeqLM.from_pretrained("xtie/BARTScore-PET", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files123456789---metrics:- bertscorelibrary_name: transformerspipeline_tag: summarizationtags:- medical- summarization---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849---language: entags:- summarization- medicallibrary_name: transformerspipeline_tag: summarization---# Automatic Personalized Impression Generation for PET Reports Using Large Language Models ๐โ**Authored by**: Xin Tie, Muheon Shin, Ali Pirasteh, Nevein Ibrahim, Zachary Huemann, Sharon M. Castellino, Kara Kelly, John Garrett, Junjie Hu, Steve Y. Cho, Tyler J. Bradshaw[Read the full paper]()<!-- Link to our Arxiv paper -->## ๐ Model DescriptionThis is the domain-adapted BARTScore for evaluating the quality of PET impressions.To check our fine-tuned large language models (LLMs) for PET report summarization:- [BARTScore+PET](https://huggingface.co/xtie/BARTScore-PET)- [PEGASUSScore+PET](https://huggingface.co/xtie/PEGASUSScore-PET)- [T5+PET](https://huggingface.co/xtie/T5Score-PET)## ๐ UsageClone this GitHub repository in a local folder```bashgit clone https://github.com/xtie97/PET-Report-Summarization.git```Go the the folder containing codes for computing BARTScore and create a new folder called "checkpoints"```bashcd ./PET-Report-Summarization/evaluation_metrics/metrics/BARTScoremkdir checkpointsmkdir checkpoints/bart-large```Download the model weights and put them in the folder "checkpoints/bart-large". Run the code for computing text-generation-based metrics```python compute_metrics_text_generation.py```## ๐ Additional Resources- **Codebase for evaluation metrics:** [GitHub Repository](https://github.com/xtie97/PET-Report-Summarization)---
README.md+46-6