Lightning-AI / Lightning-AI/litgpt

LIMA multiturn dialogues not working correctly?

Open
#1,504 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted question
Dominant language
Python
Stars
13.7k
Forks
1.5k
Avg merge
15h 37m
Merged PRs (30d)
1

Description

It was stated to use the follow up questions in the multi turn dialogues for LIMA, you would have to set `--data.include_multiturn_conversations True`. I included that and compared it with the original data. It seems only the first instruction-response pair is selected. The follow up pairs are not included in the generated json.

steps to reproduce the dataset creation
```py
def format_dataset(dataset_partition: dict, include_multi_turn_conversations: bool) -> List[dict]:
formatted_ds = []

for entry in dataset_partition:
convo = entry["conversations"]
if include_multi_turn_conversations:
for i in range(0, len(convo) - 1, 2):
formatted_ds.append({"instruction": convo[i], "input": "", "output": convo[i + 1]})
else:
formatted_ds.append({"instruction": convo[0], "input": "", "output": convo[1]})

return formatted_ds

lima=load_dataset('GAIR/lima',token=)
formatted_ds = format_dataset(lima['train'], include_multi_turn_conversations=True)
with open('new_lima_ds.json', 'w') as f:
json.dump(formatted_ds, f,indent=4)
```
you can find the generated file here-[new_lima_ds.json](https://github.com/user-attachments/files/15899084/new_lima_ds.json).

i am curious to know if the `--data.include_multiturn_conversations True` actually works and the expected output because i don't think it includes the follow up response-pairs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dataset-formatting entry point controlled by `--data.include_multiturn_conversations`, then compare its generated JSON with the LIMA conversation structure shown in the reproduction. Verify whether every follow-up instruction-response pair is emitted when the flag is enabled, and add or update coverage for that behavior if the repository has a relevant test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.