nayohan commited on
Commit
21c4e18
·
verified ·
1 Parent(s): b0e024c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +148 -194
README.md CHANGED
@@ -1,199 +1,153 @@
1
  ---
 
 
2
  library_name: transformers
3
- tags: []
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
+ language:
3
+ - en
4
  library_name: transformers
5
+ pipeline_tag: text-generation
6
+ license: mit
7
  ---
8
 
 
9
 
10
+ # DialRet
11
+ <p align="center">
12
+ <picture>
13
+ <img src="./main_fig.png" width="100%" style="margin: 0px auto;">
14
+ </picture>
15
+
16
+ Proceedings of PAKDD 2025 paper "DialRet: Enhancing Dialogue Retention for Multi-Session Conversations"
17
+ Yohan Na*, Dahye Kim*, and Dong-Kyu chae.
18
+
19
+ <p align="center"> 🤗 <a href="https://huggingface.co/collections/DILAB-HYU/">Models</a> &nbsp | &nbsp 📜 <a href="https://">Paper</a> | &nbsp 💻 <a href="https://github.com/"> Github </a>
20
+
21
+ > [!Note]
22
+ > The paper is written from a multi-session dialogue perspective, which is far from the instruction performance targeted by recent models.
23
+
24
+ ## Table of Contents
25
+
26
+ - [Introduction](#introduction)
27
+ - [Model Performance](#performance)
28
+ - [Quickstart](#quickstart)
29
+ - [License](#license)
30
+ - [Citation](#citation)
31
+ - [Contributors](#contributors)
32
+ - [Contact](#contact)
33
+
34
+ <br>
35
+
36
+ ## Introduction
37
+ DialRet is a dialogue-specific language model designed for multi-session conversations.
38
+ Instead of using memory modules, it leverages long-context LMs and instruction-tuning across eight tasks (e.g., dialogue generation, summarization, speaker relation extraction).
39
+ It improves understanding and retention of past dialogues.
40
+
41
+ The paper also introduces MSC-Bench, a benchmark evaluating dialogue models on memorability, specificity, engagement, and humanness.
42
+ Experiments show DialRet outperforms existing models in multi-session dialogue quality and retention.
43
+
44
+ ### Model Performance
45
+ Below are partial report on the performance of the `DialRet`. Please refer to the [Paper](https://) for the full results.
46
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6152b4b9ecf3ca6ab820e325/RNvRrtb8UdZRP3xwikyD-.png)
47
+
48
+
49
+
50
+ ## Quickstart
51
+
52
+ #### Example Usage for `DialRet`
53
+ ```python
54
+ import torch
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
56
+
57
+ model_name = "DILAB-HYU/DialRet-L1"
58
+
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ model_name,
61
+ torch_dtype=torch.bfloat16,
62
+ trust_remote_code=True,
63
+ ).to("cuda")
64
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
65
+
66
+ session_num = 3
67
+ session_role_1 = "Neighbors A"
68
+ session_role_2 = "Neighbors B"
69
+ session_system_prompt = f"You will be shown a {session_num} session dialogues between {session_role_1} and {session_role_2}. Please read and understand given multiple Dialogue Session, then complete the task under the guidance of Task Introduction.\n\n"
70
+
71
+ session_input = """```
72
+ Dialogue Session #1:
73
+ Neighbors A:Hi there! I saw your cat in my backyard earlier. She's quite cute. What's her name?
74
+ Neighbors B:Oh, thanks! Her name is Luna. She's a rescue cat.
75
+ Neighbors A:That's really cool. How old is she?
76
+ Neighbors B:She's about 2 years old.
77
+ Neighbors A:Does she like being outside?
78
+ Neighbors B:Not really. She's pretty much an indoor cat. She likes to snuggle up and sleep all day.
79
+ Neighbors A:That's adorable. My kids would love her!
80
+ Neighbors B:You're welcome to come over and visit her anytime.
81
+ Neighbors A:Thanks, I'd love to! By the way, did you get your fence fixed?
82
+ Neighbors B:Yes, we had it repaired last weekend. It was a relief to finally get it fixed.
83
+ Neighbors A:I'm glad to hear that. Did you have to call in a professional?
84
+ Neighbors B:Yeah, we had to call a fencing company to come and take care of it. They did a great job though, so we're happy with the results.
85
+ Neighbors A:Good to know! I may have to call them too if I ever need fence repairs.
86
+ Neighbors B:Absolutely, I can give you their contact information if you'd like.
87
+ Neighbors A:Thanks, I appreciate it. Anyway, I won't keep you too long. Thanks for telling me about Luna!
88
+ Neighbors B:No problem, happy to talk about her. See you later!
89
+ ```
90
+
91
+ ```
92
+ Dialogue Session #2:
93
+ Neighbors A:Can you believe it? A tree just fell on my car!
94
+ Neighbors B:Oh no! Are you okay?
95
+ Neighbors A:Yeah, luckily I wasn't in it at the time. But my car is completely totaled.
96
+ Neighbors B:That's terrible. Did you call your insurance company?
97
+ Neighbors A:Not yet, I'm still in shock. Plus, I was in the middle of reading a really interesting book about philosophy.
98
+ Neighbors B:Oh, what book are you reading?
99
+ Neighbors A:It's called "The Republic" by Plato. It's all about the concept of justice and government.
100
+ Neighbors B:That sounds really fascinating. I've always been interested in philosophy, but I never know where to start.
101
+ Neighbors A:Well, "The Republic" is a classic. But if you're just starting out, I'd recommend "Meditations" by Marcus Aurelius. It's a great introduction to Stoicism.
102
+ Neighbors B:Thanks for the recommendation. I'll definitely check it out. But in the meantime, let's get your car situation sorted out. Do you need any help with anything?
103
+ Neighbors A:That would be great, actually. Do you have any experience dealing with insurance companies?
104
+ ```
105
+
106
+ ```
107
+ Dialogue Session #3:
108
+ Neighbors A:Hey, Neighbors B. I have a bit of a problem and was hoping you could help me out.
109
+ Neighbors B:Sure thing! What's going on?
110
+ Neighbors A:Well, I'm having some trouble with my computer. It's just not working the way it should be, and I don't know what to do.
111
+ Neighbors B:Ah, I see. What kind of issues are you having?
112
+ Neighbors A:The screen keeps freezing up, and I can't seem to get anything done. I'm really getting frustrated because I have some important work that needs to be done.
113
+ Neighbors B:Hmm, that sounds really frustrating. I think I might be able to help, though. Have you tried restarting your computer?
114
+ Neighbors A: ###
115
+ ```"""
116
+
117
+ session_task = """Task Introduction:
118
+ After reading the entire Dialogue Sessions, please create an appropriate response.
119
+ ```
120
+
121
+ Task Result:"""
122
+
123
+ input_text= session_system_prompt + session_input + session_task
124
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
125
+
126
+ outputs = model.generate(inputs, max_new_tokens=4096, do_sample=False) # Finetuned with length 8192
127
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
128
+
129
+ # Output:
130
+ # Neighbors A:Yeah, I've been trying that but it doesn't seem to be helping.
131
+ ```
132
+
133
+ <br>
134
+
135
+ ## License
136
+ The `DialRet` models are licensed under [MIT](https://opensource.org/license/mit).
137
+ <br>
138
+
139
+ ## Citation
140
+ ```
141
+ @article{2025dialret,
142
+ title={DialRet: Enhancing Dialogue Retention forMulti-session Conversations},
143
+ author={Yohan Na, Dahye Kim, Dong-kyu Chae},
144
+ year={2025},
145
+ url={},
146
+ }
147
+ ```
148
+
149
+ <br>
150
+
151
+ ## Thanks to
152
+ - Yoo Hyun Jeong, Jongsoo Lee, Seonggyeom Kim, Myeongsoo Han, Byeongtae Park, Eunseon Seong, Harim Lee.
153
+ <br>