https://github.com/enesdoruk/summernet
Lay Summarization with LLM
https://github.com/enesdoruk/summernet
bert elife laysummarization llm plos summarization transformer
Last synced: 3 months ago
JSON representation
Lay Summarization with LLM
- Host: GitHub
- URL: https://github.com/enesdoruk/summernet
- Owner: enesdoruk
- Created: 2024-05-13T19:25:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-31T18:58:34.000Z (about 1 year ago)
- Last Synced: 2024-05-31T20:21:19.700Z (about 1 year ago)
- Topics: bert, elife, laysummarization, llm, plos, summarization, transformer
- Language: Python
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lay Summarization with SummerNet on ELIFE AND PLOS Dataset
## Quick Links
- [Environment](#environment)
- [Data Preprocessing](#data-preprocessing)
- [Train](#train)
- [Inference](#inference)

## Environment
Create the environment with conda and pip.
```shell
conda env create -f environment.yml
conda activate season
pip install -r requirements.txt
```
Install nltk "punkt" package.
```shell
python -c "import nltk; nltk.download('punkt');"
```
We've tested this environment with python 3.8 and cuda 10.2. (For other CUDA version, please install the corresponding packages)## Data Preprocessing
Run the following commands to download the CNN/DM dataset, preprocess it, and save it locally.
```shell
mkdir data
```
- For ELIFE dataset
```shell
python preprocess.py --dataset elife
```- For PLOS dataset
```shell
python preprocess.py --dataset elife
```## Train
Please run the scripts below:
```shell
bash run_train.sh
```
The trained model parameters and training logs are saved in `outputs/train` folder.## Inference
You can use our trained model weights to generate summaries for your data.```bash
mkdir checkpoints
cd checkpoints
```Step 2. Generate summaries for CNN/DM Test set.
```bash
bash run_inference.sh
```
After running the script, you will get the results in `outputs/inference` folder including the predicted summaries in `generated_predictions.txt` and the ROUGE results in `predict_results.json`.## Inference
- We thank the authors of [Season](https://github.com/tencent-ailab/season) their open-source codes.