artidoro / qlora

QLoRA: Efficient Finetuning of Quantized LLMs
https://arxiv.org/abs/2305.14314
MIT License
10.06k stars 822 forks source link

How do you use oasst1 dataset in qlora.py - why only the 'text' field is used? #282

Open Huxwell opened 11 months ago

Huxwell commented 11 months ago

https://huggingface.co/datasets/OpenAssistant/oasst1 has a lot of columns (most important: "parent_id" and "role" - assistant or prompter). However you only seem to use "text" column, input stays empty (L624, https://github.com/artidoro/qlora/blob/main/qlora.py#L624 )

        elif dataset_format == 'oasst1' or (dataset_format is None and args.dataset == 'oasst1'):
            dataset = dataset.map(lambda x: {
                'input': '',
                'output': x['text'],
            })

The model is supposed to work well in conversations, how is it possible if training doesn't recognize order of prompting-answering or even the order of messages in conversation? I am clearly missing something in my understanding, please help me out.