Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,53 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: mit
|
4 |
+
tags:
|
5 |
+
- summarization
|
6 |
+
- fine-tuned
|
7 |
+
- dialogue
|
8 |
+
- transformers
|
9 |
+
- phi-2
|
10 |
+
model_name: phi-2-dialogue-summarization
|
11 |
+
datasets:
|
12 |
+
- neil-code/dialogsum-test
|
13 |
+
library_name: transformers
|
14 |
+
metrics:
|
15 |
+
- rouge
|
16 |
+
base_model:
|
17 |
+
- microsoft/phi-2
|
18 |
+
---
|
19 |
+
|
20 |
+
# Phi-2 Dialogue Summarization Model
|
21 |
+
|
22 |
+
## Model Description
|
23 |
+
This is a fine-tuned version of **Phi-2**, optimized for **dialogue summarization**. The model is trained on a dataset containing human conversations and their respective summaries, allowing it to generate concise and coherent summaries of dialogue-based texts.
|
24 |
+
|
25 |
+
## Intended Use
|
26 |
+
- Summarizing conversations from various sources, including transcripts and chat logs.
|
27 |
+
- Extracting key points from spoken or written dialogue.
|
28 |
+
- Assisting in text compression for NLP applications.
|
29 |
+
|
30 |
+
## Training Details
|
31 |
+
- **Base Model**: `microsoft/phi-2`
|
32 |
+
- **Fine-tuning Method**: PEFT (Parameter Efficient Fine-Tuning)
|
33 |
+
- **Dataset**: neil-code/dialogsum-test
|
34 |
+
- **Evaluation Metrics**: ROUGE scores for summary quality assessment. rouge1: 2.01%, rouge2: -0.29%, rougeL: 1.32%, rougeLsum: 2.53%.
|
35 |
+
|
36 |
+
## Limitations & Biases
|
37 |
+
- The model may struggle with highly technical or domain-specific dialogues.
|
38 |
+
- Potential biases present in the training data could affect summary quality.
|
39 |
+
- Summarization may sometimes miss nuances in highly informal conversations.
|
40 |
+
|
41 |
+
## How to Use
|
42 |
+
```python
|
43 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
44 |
+
|
45 |
+
model_name = "your-username/phi-2-dialogue-summarization"
|
46 |
+
tokenizer = AutoTokenizer.from_pretrained(NikkeS/Phi-2-dialogsum-finetuned)
|
47 |
+
model = AutoModelForCausalLM.from_pretrained(NikkeS/Phi-2-dialogsum-finetuned)
|
48 |
+
|
49 |
+
prompt = "Summarize the following conversation:\n\n#Person1#: Hello! How are you?\n#Person2#: I'm good, thanks. How about you?\n\nSummary:"
|
50 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
51 |
+
output = model.generate(input_ids, max_length=100)
|
52 |
+
|
53 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|