File size: 1,608 Bytes
5585a48
 
 
 
 
d856028
 
5585a48
 
 
 
 
 
 
 
 
 
 
61e349f
 
5585a48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
title: "Adaptive T5 Summarization"
emoji: πŸ“
colorFrom: blue
colorTo: indigo
sdk: gradio
app_file: "app.py"
---

# Adaptive T5 Summarization

This project builds a meta-model on top of T5 to adapt model selection based on text complexity.

## Installation

To use this project, clone the repository and install the required dependencies:

```bash
git clone https://huggingface.co/spaces/tlmk22/OptimAbstract
cd OptimAbstract
pip install -r requirements.txt
python -m spacy download en_core_web_lg
```


## Repository Structure
```bash
.
β”œβ”€β”€ demo.ipynb                   #  Jupyter notebook demonstrating the usage.
β”œβ”€β”€ model.py                    # Contains the T5 models and the meta-model implementation.
β”œβ”€β”€ requirements.txt                     # Lists the required Python packages.
└── README.md
```

## Usage
What the meta model does:
- Extract complexity-based features from input texts.
- Apply multiple T5-based summarization models.
- Use BertScore to determine the best-performing model for each text.
- Train a classifier to predict the best model based on extracted features.
- At inference, the classifier selects the appropriate model dynamically.

## TODO
The results are not satisfactory. Improvements should be made:

- Reduce the tolerance (the small model is nearly always used).
- Include feature computation time in the meta-model cost analysis.
- Analyze feature relevance and classifier performance more deeply.
- Modify the MetaModel structure since it is too large to commit (4GB).

This is an ongoing project, and contributions or feedback are welcome!