yenshanchen/DPO-joke-preference-dataset
收藏Hugging Face2025-12-08 更新2025-12-20 收录
下载链接:
https://hf-mirror.com/datasets/yenshanchen/DPO-joke-preference-dataset
下载链接
链接失效反馈官方服务:
资源简介:
# Joke Preference Dataset
This dataset contains jokes with like counts and reasoning annotations, prepared for **preference learning (DPO)**.
It provides **train** and **validation** splits.
## Columns
- `joke` : the raw joke text
- `like_count` : the number of likes
- `post_id` : the original post identifier
- `reasoning` : full reasoning / analysis
- `stripped_reasoning` : reasoning cleaned of any like counts or metadata
When loaded as preference pairs, each example contains:
- `chosen` : text of the joke chosen as higher preference
- `rejected` : text of the lower-preference joke
- `score_chosen` : like count of chosen joke
- `score_rejected` : like count of rejected joke
- `source_post_id` : post id of the group
## Modes
- `raw` : chosen/rejected = joke only
- `reasoning` : chosen/rejected = `Joke:\n{joke}\n\nReasoning:\n{reasoning}`
- `reasoning_stripped` : chosen/rejected = `Joke:\n{joke}\n\nReasoning:\n{stripped_reasoning}`
## Example Usage
```python
from datasets import load_dataset
# Load HF Dataset splits
train_ds = load_dataset("yenshanchen/DPO-joke-preference-dataset", split="train")
val_ds = load_dataset("yenshanchen/DPO-joke-preference-dataset", split="validation")
# Import your dataloader
from dataloader import JokePairsIterable
# Build preference pair datasets
train_pairs = JokePairsIterable(train_ds, mode="reasoning_stripped")
val_pairs = JokePairsIterable(val_ds, mode="reasoning_stripped")
print(f"Number of training pairs: {len(train_pairs)}")
print(f"Number of validation pairs: {len(val_pairs)}")
# Iterate over a few examples
for i, pair in enumerate(train_pairs):
print(pair)
if i >= 2:
break
```
---
license: apache-2.0
---
提供机构:
yenshanchen



