QwenLM / Qwen

The official repo of Qwen (通义千问) chat & pretrained large language model proposed by Alibaba Cloud.
Apache License 2.0
13.59k stars 1.11k forks source link

请问大模型的系统指令(system prompts)功能是如何训练的?system参数如何设置,一个训练集中有几种不同的system?有相关数据可以参考吗? #1108

Closed wnntju closed 7 months ago

wnntju commented 7 months ago

大模型的系统指令 (System Prompts)设定了AI助手的行为模式,例如人物设定、语言风格、任务模式、甚至针对具体问题的具体行为。https://github.com/QwenLM/Qwen/blob/main/examples/system_prompt.md 中也给出了很多的示例。请问这是怎么训练出来的,在具体训练时候system的参数如何设置呢?

难道system的参数不是唯一的吗?在训练时候 就已经有成千上万了???包括角色扮演中的system=“你是甄嬛”或者system=“你是林冲”... 这还只是角色扮演。还有语言风格、任务设定呢???请大佬解答一下,想了解下训练数据是什么样的

jklj077 commented 7 months ago

The following statement is based on public knowledge and should not be interpreted as directly applicable to the training of Qwen models.

以下陈述基于公开信息,不应视为Qwen模型训练采用的方法。

System prompts are specialized messages designed to guide a model's behavior throughout an entire conversation. Historically, such instructions have been embedded within user inputs in each turn, often through a process known as prompt engineering. Notably, for certain open-source datasets, conversations are structured into (instruction, input, output) tuples, effectively separating system messages from the flow. Implementing system prompts can be seen as an extension of this approach, aiming to achieve a similar goal but using a distinct format that is incorporated during the model's training process.

系统提示是一种专门的消息,用于在整个对话过程中引导模型的行为。过去,此类指令通常通过“提示工程”这一过程嵌入到每一轮用户输入中。特别是在某些开源数据集中,对话被组织为(指令、输入、输出)三元组形式,从而有效地将系统消息从对话流程中分离出来。采用系统提示可以视为对该方法的一种延续和拓展,旨在以一种不同的格式实现类似的目标,并在模型训练阶段就将其融入其中。

By adopting system prompts, we streamline the process of steering AI models towards desired conversational trajectories. This technique aligns with the ongoing evolution in AI dialogue systems, where explicit guidance becomes increasingly crucial for maintaining context, managing tasks, and ensuring coherent responses.

通过采用系统提示,我们能够引导AI模型遵循期望对话路径的过程。这一技术与AI对话系统的发展趋势相契合,在该趋势下,明确的指导对于保持上下文连贯性、管理任务以及确保连贯的回答变得愈发重要。