File size: 4,505 Bytes
167e1e5
 
 
 
b11d731
dd5ed48
b11d731
 
 
dd5ed48
b11d731
 
 
167e1e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b11d731
 
dd5ed48
b11d731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd5ed48
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
language:
- en
license: apache-2.0
task_categories:
- question-answering
- text-generation
tags:
- reinforcement-learning-from-human-feedback
- reinforcement-learning
- dialogue
- conversational-ai
- preference-alignment
dataset_info:
- config_name: feedback_decoder_binary
  features:
  - name: predictions
    dtype: int64
  - name: labels
    dtype: int64
  - name: game_turn_id
    dtype: string
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 5115528
    num_examples: 7003
  download_size: 651037
  dataset_size: 5115528
- config_name: feedback_decoder_ternary
  features:
  - name: predictions
    dtype: int64
  - name: labels
    dtype: int64
  - name: game_turn_id
    dtype: string
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 4936671
    num_examples: 7003
  download_size: 640213
  dataset_size: 4936671
- config_name: human_eval
  features:
  - name: correctness
    dtype: string
  - name: feedback
    dtype: string
  - name: delta_clicks
    sequence: string
  - name: game_id
    dtype: string
  - name: turn_id
    dtype: int64
  - name: round
    dtype: int64
  - name: policy_name
    dtype: string
  - name: targets
    sequence: string
  - name: selected
    sequence: string
  - name: deselected
    sequence: string
  - name: context
    sequence: string
  - name: end
    dtype: int8
  - name: currently_selected
    sequence: string
  splits:
  - name: train
    num_bytes: 3190406
    num_examples: 8111
  download_size: 347537
  dataset_size: 3190406
- config_name: interaction
  features:
  - name: game_id
    dtype: string
  - name: turn
    dtype: int64
  - name: end
    dtype: string
  - name: s comments
    dtype: string
  - name: speaker
    dtype: string
  - name: len
    dtype: string
  - name: clicks
    sequence:
      sequence: string
  - name: context
    sequence: string
  - name: targets
    sequence: string
  - name: chat
    sequence: string
  - name: dataset_alias
    dtype: string
  - name: policy_name
    dtype: string
  - name: date
    dtype: date32
  - name: round
    dtype: int64
  splits:
  - name: train
    num_bytes: 8775426
    num_examples: 7920
  download_size: 2120499
  dataset_size: 8775426
- config_name: turn
  features:
  - name: chats
    sequence: string
  - name: clicks
    sequence:
      sequence: string
  - name: targets
    sequence: string
  - name: game_id
    dtype: string
  - name: end
    dtype: int8
  - name: context
    sequence: string
  - name: turn_id
    dtype: int8
  - name: currently_selected
    sequence: string
  - name: deselected
    sequence: string
  - name: selected
    sequence: string
  - name: chat_feedback
    dtype: string
  - name: game_turn_id
    dtype: string
  - name: prob_action
    dtype: float64
  - name: dataset_alias
    dtype: string
  - name: policy_name
    dtype: string
  - name: date
    dtype: date32
  - name: round
    dtype: int64
  splits:
  - name: train
    num_bytes: 45674609
    num_examples: 59431
  download_size: 6438021
  dataset_size: 45674609
configs:
- config_name: feedback_decoder_binary
  data_files:
  - split: train
    path: feedback_decoder_binary/train-*
- config_name: feedback_decoder_ternary
  data_files:
  - split: train
    path: feedback_decoder_ternary/train-*
- config_name: human_eval
  data_files:
  - split: train
    path: human_eval/train-*
- config_name: interaction
  data_files:
  - split: train
    path: interaction/train-*
- config_name: turn
  data_files:
  - split: train
    path: turn/train-*
---

# Retrospective Learning from Interactions (Respect) Dataset

This repository contains the `lil-lab/respect` data, based on the ACL paper [Retrospective Learning from Interactions](https://huggingface.co/papers/2410.13852). For more resources, please see <https://lil-lab.github.io/respect> and <https://github.com/lil-lab/respect>.

## Sample Usage

You can load the data and associated checkpoints as follows:

```python
from datasets import load_dataset
from transformers import Idefics2ForConditionalGeneration
from peft import PeftModel
import torch # Ensure torch is imported

# Download data
ds = load_dataset("lil-lab/respect", name="turn", split="train")

# Download checkpoints
checkpoint = "HuggingFaceM4/idefics2-8b"
model_id = 'lil-lab/respect'

model = Idefics2ForConditionalGeneration.from_pretrained(
    checkpoint, torch_dtype=torch.bfloat16)
peft_model = PeftModel.from_pretrained(
    model, model_id, adapter_name="r6_bp", revision="r6_bp")
```