File size: 1,759 Bytes
72f1366
2388c39
 
 
 
 
 
 
 
 
 
 
72f1366
 
2388c39
72f1366
2388c39
72f1366
 
 
2388c39
 
 
 
 
72f1366
2388c39
72f1366
2388c39
72f1366
2388c39
 
 
72f1366
2388c39
72f1366
2388c39
 
 
72f1366
2388c39
a7a818b
72f1366
2388c39
 
 
72f1366
2388c39
 
72f1366
2388c39
 
72f1366
2388c39
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
53
54
---
license: mit
tags:
- peft
- lora
- tinyllama
- dialogue summarization
- text2text-generation
datasets:
- dialogsum
metrics:
- rouge
---

# TinyLlama Dialogue Summarization Fine-Tuned Model

This model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) specifically for dialogue summarization tasks. It was fine-tuned using Parameter-Efficient Fine-Tuning (PEFT) with LoRA on the [DialogSum](https://huggingface.co/datasets/dialogsum) dataset.

## Model Details

* **Model Name:** TinyLlama-1.1B-Chat-v1.0 (fine-tuned)
* **Architecture:** Causal Language Model
* **Fine-tuning Method:** Parameter-Efficient Fine-Tuning (PEFT) with LoRA
* **Dataset:** DialogSum
* **Quantization:** 4-bit quantization was used during training to reduce memory consumption.

## Intended Uses

This model is intended for generating concise and accurate summaries of dialogues. It can be used for various applications, including:

* Summarizing customer service conversations.
* Generating meeting summaries.
* Creating summaries of chat logs.

## How to Use

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
peft_model_id = "artisokka/tinyllama-dialogsum-finetuned"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
model = PeftModel.from_pretrained(model, peft_model_id)

input_text = "Dialogue: ... (your dialogue here) ..."
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to(model.device)

outputs = model.generate(input_ids, max_length=200)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(summary)