|
--- |
|
language: en |
|
license: mit |
|
tags: |
|
- summarization |
|
- fine-tuned |
|
- dialogue |
|
- transformers |
|
- phi-2 |
|
model_name: phi-2-dialogue-summarization |
|
datasets: |
|
- neil-code/dialogsum-test |
|
library_name: transformers |
|
metrics: |
|
- rouge |
|
base_model: |
|
- microsoft/phi-2 |
|
--- |
|
|
|
# Phi-2 Dialogue Summarization Model |
|
|
|
## Model Description |
|
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. |
|
|
|
## Intended Use |
|
- Summarizing conversations from various sources, including transcripts and chat logs. |
|
- Extracting key points from spoken or written dialogue. |
|
- Assisting in text compression for NLP applications. |
|
|
|
## Training Details |
|
- **Base Model**: `microsoft/phi-2` |
|
- **Fine-tuning Method**: PEFT (Parameter Efficient Fine-Tuning) |
|
- **Dataset**: neil-code/dialogsum-test |
|
- **Evaluation Metrics**: ROUGE scores for summary quality assessment. rouge1: 2.01%, rouge2: -0.29%, rougeL: 1.32%, rougeLsum: 2.53%. |
|
|
|
## Limitations & Biases |
|
- The model may struggle with highly technical or domain-specific dialogues. |
|
- Potential biases present in the training data could affect summary quality. |
|
- Summarization may sometimes miss nuances in highly informal conversations. |
|
|
|
## How to Use |
|
```python |
|
from transformers import AutoModelForCausalLM, AutoTokenizer |
|
|
|
model_name = "your-username/phi-2-dialogue-summarization" |
|
tokenizer = AutoTokenizer.from_pretrained(NikkeS/Phi-2-dialogsum-finetuned) |
|
model = AutoModelForCausalLM.from_pretrained(NikkeS/Phi-2-dialogsum-finetuned) |
|
|
|
prompt = "Summarize the following conversation:\n\n#Person1#: Hello! How are you?\n#Person2#: I'm good, thanks. How about you?\n\nSummary:" |
|
input_ids = tokenizer(prompt, return_tensors="pt").input_ids |
|
output = model.generate(input_ids, max_length=100) |
|
|
|
print(tokenizer.decode(output[0], skip_special_tokens=True)) |