size_categories:100K<n<1M format:parquet modality:tabular modality:text library:datasets library:dask library:mlcroissant library:polars region:us
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: subreddit
    dtype: string
  - name: title
    dtype: string
  - name: post
    dtype: string
  - name: summary
    dtype: string
  - name: query_token
    sequence: int64
  - name: query
    dtype: string
  - name: reference_response
    dtype: string
  - name: reference_response_token
    sequence: int64
  - name: reference_response_token_len
    dtype: int64
  - name: query_reference_response
    dtype: string
  - name: query_reference_response_token
    sequence: int64
  - name: query_reference_response_token_response_label
    sequence: int64
  - name: query_reference_response_token_len
    dtype: int64
  splits:
  - name: train
    num_bytes: 2153610385
    num_examples: 116722
  - name: validation
    num_bytes: 119000449
    num_examples: 6447
  - name: test
    num_bytes: 120983572
    num_examples: 6553
  download_size: 561265613
  dataset_size: 2393594406
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
---
# TL;DR SFT Dataset for OpenAI's [Summarize from Feedback](https://openai.com/blog/summarization/) task

The dataset is directly taken from https://github.com/openai/summarize-from-feedback/tree/700967448d10004279f138666442bf1497d0e705#reddit-tldr-dataset

These columns are taken directly from the aforementioned dataset:

* **id**: unique identifier for the post
* **subreddit**: subreddit the post was taken from
* **title**: title of the post
* **post**: body of the post
* **summary**: summary of the post
* **reference_response**: reference response for the post

These columns are added by this preprocessing script:
* **query**: length-limited query for summarization: OAI pre-processes the main text (title + subreddit + post), ensuring it has only 512 tokens; if the main text is too long, then it tries to truncate at the last `
`. If it's too short it pads the main text ([summarize_from_feedback/tasks.py#L98-L165](https://github.com/openai/summarize-from-feedback/blob/700967448d10004279f138666442bf1497d0e705/summarize_from_feedback/tasks.py#L98-L165)). Padding is either space or `[PAD]` token (see Args below).
* **query_token**: tokenized version of `query`
* **reference_response_token**: tokenized version of `reference_response`
* **reference_response_token_len**: length of `reference_response_token`
* **query_reference_response**: concatenation of `query.strip()` and `reference_response`
* **query_reference_response_token**: tokenized version of `query_reference_response`, up to `max_sft_query_response_length` tokens
* **query_reference_response_token_len**: length of `query_reference_response_token`


# Args

```python
{'base_model': 'EleutherAI/pythia-1b',
 'check_length_correctness': True,
 'cnndm_params': TaskQueryHParams(length=1919,
                                  format_str='Article:\n{article}\n\nTL;DR:\n',
                                  truncate_field='article',
                                  truncate_text='\n',
                                  padding='pad_token',
                                  pad_token=[50277],
                                  pad_side='left',
                                  max_sft_response_length=None,
                                  max_sft_query_response_length=None,
                                  max_rm_response_length=155,
                                  max_rm_query_response_length=2021),
 'debug': False,
 'ds_name': 'pythia_scene1',
 'hf_entity': 'yguooo',
 'push_to_hub': True,
 'scenario': 0,
 'tldr_params': TaskQueryHParams(length=512,
                                 format_str='SUBREDDIT: '
                                            'r/{subreddit}\\n\\nTITLE: '
                                            '{title}\\n\\nPOST: '
                                            '{post}\\n\\nWrite a short and '
                                            'concise summary of the given '
                                            'titled post from the subreddit, '
                                            'ensuring the purpose and main '
                                            'ideas are represented '
                                            'clearly.\\n\\nTL;DR:',
                                 truncate_field='post',
                                 truncate_text='\n',
                                 padding='pad_token',
                                 pad_token=[50277],
                                 pad_side='left',
                                 max_sft_response_length=53,
                                 max_sft_query_response_length=562,
                                 max_rm_response_length=169,
                                 max_rm_query_response_length=639)}
```
