Possibility Exploration (PE) dataset
收藏数据集概述
数据集名称
Possibility Exploration Fine-Tuning (PEFT) 数据集
数据集描述
该数据集用于训练和评估大型语言模型(LLMs)在生成多样化响应方面的能力。数据集旨在通过引入可能性探索微调(PEFT)方法,增强模型生成不同语义响应的能力。
数据集用途
- 训练:用于微调模型以生成多样化响应。
- 评估:用于评估模型在生成多样化响应方面的性能。
数据集内容
- 训练数据:包含对话生成任务的训练数据,格式为JSONL文件。
train_dialogs_1k.jsonl:包含1000个对话样本。train_dialogs_4k.jsonl:包含4000个对话样本。
- 测试数据:包含对话生成任务的测试数据,格式为JSONL文件。
test_dialogs.jsonl:用于测试模型生成多样化响应的能力。
数据集示例
对话生成任务示例
Prompt:
Given the following dialogue context: Person B: "I have been working in retail while I finish up school, same as you, I suppose." Person A: "What are you studying?"
Imagine you are Person B, and act as if you were a real individual. Consider all the different ways Person B might respond, and then provide the response that matches possibility number #k.
Expected Results:
Response for possibility number 1: Im wrapping up my psychology and human resources studies.
Response for possibility number 2: Im into data and technology, so I’m majoring in computer science.
...
数据集特点
- 多样化响应生成:通过PEFT方法,模型能够生成语义上不同的响应。
- 适用于创意写作和头脑风暴工具:适用于需要多个不同响应的应用场景。
数据集相关模型
- Mistral 7B
- LLAMA 2
数据集使用方法
训练
bash python train.py --train_file data/train_dialogs_1k.jsonl --loss_steps 100 --save_steps 500 --learning_rate 5e-5 --output_dir checkpoints --exp_name mistral_peft --per_device_train_batch_size 1 --gradient_accumulation_steps 2 --num_response_per_input 4 --max_num_negatives_per_sample 30 --ul_weight 0.5 --max_steps 1000 --max_length 500 --max_input_length 300 --model_name mistralai/Mistral-7B-Instruct-v0.2 --warmup_steps -1;
推理
bash python infer.py --model_name_or_path checkpoints/mistral_peft/check_1000/ --num_response_per_input 5 --method peft --temperature 0.75 --decoding sampling --test_file data/test_dialogs.jsonl --save_file outs/out.jsonl
评估
bash python eval.py --eval_file outs/out.jsonl --save_file eval_logs/out.pkl




