ince there is no opensource checkpoint for GPT3, we utilized the Meta OPT family…
- User
ince there is no opensource checkpoint for GPT3, we utilized the Meta OPT family pretrained models (i.e., facebook/opt-1.3b). One may also use other pretrained models (such as GPT-Neo, Bloom etc). As for the dataset, we also used those open-sourced datasets from to the Huggingface Datasets, namely
Dahoas/rm-static Dahoas/full-hh-rlhf Dahoas/synthetic-instruct-gptj-pairwise yitingxie/rlhf-reward-datasets openai/webgpt_comparisons stanfordnlp/SHP
Thanks to the DeepSpeed RLHF data abstraction and blending techniques, we are now able to combine multiple sources of data for training. However, it is important to note that different datasets may use different prompt words (e.g., Dohas/rm-static uses "Human:" for queries and "Assistant:" for answers). Therefore, users must align these prompts by themselves. In our example, we use the format from Dohas/rm-static consistently. Through our evaluation, we have found that incorporating diverse datasets can improve the quality of the model. Please refer to the next section for examples of different query-answer pairs.
- Assistant
Overall, the use of pretrained models and open-sourced datasets greatly facilitates the development of conversational agents. We encourage researchers and practitioners to continue contributing to these resources, as well as exploring new methods for training and evaluating dialogue models. With more robust and effective chatbots, we can enhance the communication and accessibility of information for individuals and communities worldwide.
- User
微软最近开源的DeepSpeed-Chat如何使用
- Assistant
DeepSpeed-Chat是一个基于DeepSpeed的对话模型训练工具箱,提供了端到端的解决方案,包括模型架构、数据集处理、端到端训练和推理等。
下面是使用DeepSpeed-Chat训练对话模型的基本步骤:
-
安装DeepSpeed-Chat:使用以下命令可以在Python环境中安装DeepSpeed-Chat:
codepip install deepspeed-chat -
准备数据集:DeepSpeed-Chat支持各种格式的数据集,包括文本对话、语音对话、多轮对话等。用户可以根据自己的需求选择合适的数据集,并将其转换为DeepSpeed-Chat支持的格式。
-
配置训练参数:用户可以根据自己的需求配置DeepSpeed-Chat的训练参数,包括模型的超参数、训练时的优化器、学习率等。
-
进行训练:使用以下命令可以开始训练模型:
codedeepspeed train_chat.py --model-config config/model_config.json --dataset-config config/dataset_config.json --train-config config/train_config.json这里的
model-config、dataset-config和train-config分别指向模型配置文件、数据集配置文件和训练配置文件的路径。 -
进行推理:使用以下命令可以进行推理:
codedeepspeed predict_chat.py --model-config config/model_config.json --checkpoint-path checkpoints/model.ckpt --input-file input.txt --output-file output.txt
-