File size: 1,231 Bytes
93102cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
52

#
# Model Card for t5_small Summarization Model

## Model Details
This model is a fine-tuned version of T5-small for text summarization tasks.

## Training Data
The model was trained on the CNN/Daily Mail dataset.

## Training Procedure
Fine-tuning the pre-trained T5-small model on the CNN/Daily Mail dataset.

```python
training_args = Seq2SeqTrainingArguments(
    output_dir="./results",
    eval_strategy="epoch",
    learning_rate=2e-5,
    per_device_train_batch_size=4,
    per_device_eval_batch_size=4,
    warmup_steps=500,
    weight_decay=0.01,
    save_total_limit=2,
    num_train_epochs=1,
    fp16=True,
    predict_with_generate=True
)
```

## How to Use
```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model = AutoModelForSeq2SeqLM.from_pretrained("repo_name")
tokenizer = AutoTokenizer.from_pretrained("repo_name")

inputs = tokenizer("input text", return_tensors="pt")
outputs = model.generate(**inputs)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
```

## Evaluation
ROUGE, BLEU
'ROUGE-1', 'ROUGE-2', 'ROUGE-L', 'BLEU-1', 'BLEU-2', 'BLEU-4'

## Limitations
The model may not perform well on texts.

## Ethical Considerations
The model should be used responsibly.