赞
踩
基本模型支持文本补全,因此任何未完成的用户提示(没有特殊标签)都会提示模型完成它。
<s>{{ user_prompt }}
系统提示(prompt)是可选的。可有可无。
单个消息的具有可选的 system prompt。
- <s>[INST] <<SYS>>
- {your_system_message}
- <</SYS>>
- {user_message_1} [/INST]
多个user和assistant 消息示例。
- <s>[INST] <<SYS>>
- {your_system_message}
- <</SYS>>
- {user_message_1} [/INST] {model_reply_1}</s><s>[INST] {user_message_2} [/INST]
可在此处找到生成此提示格式的代码。
注意:换行符 (0x0A) 是提示格式的一部分,为了在示例中清晰起见,它们已表示为实际的新行。
<|begin_of_text|>{{ user_message }}
可在此处找到生成此提示格式的代码。
注意:
换行符 (0x0A) 是提示格式的一部分,为了在示例中清晰起见,它们已表示为实际的新行。
该模型期望提示末尾的助手标题开始完成它。
分解带有系统消息的示例 instruct 提示:
- <|begin_of_text|><|start_header_id|>system<|end_header_id|>
-
- You are a helpful AI assistant for travel tips and recommendations<|eot_id|><|start_header_id|>user<|end_header_id|>
-
- What can you help me with?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
- <|begin_of_text|><|start_header_id|>user<|end_header_id|>
-
- What is France's capital?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
系统提示以及用户和助手之间的多轮对话
- <|begin_of_text|><|start_header_id|>system<|end_header_id|>
-
- You are a helpful AI assistant for travel tips and recommendations<|eot_id|><|start_header_id|>user<|end_header_id|>
-
- What is France's capital?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
- Bonjour! The capital of France is Paris!<|eot_id|><|start_header_id|>user<|end_header_id|>
- What can I do there?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
- Paris, the City of Light, offers a romantic getaway with must-see attractions like the Eiffel Tower and Louvre Museum, romantic experiences like river cruises and charming neighborhoods, and delicious food and drink options, with helpful tips for making the most of your trip.<|eot_id|><|start_header_id|>user<|end_header_id|>
- Give me a detailed list of the attractions I should visit, and time it takes in each one, to plan my trip accordingly.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
- System: You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
- User: {prompt}
- Assistant:
参考资料
https://llama.meta.com/docs/model-cards-and-prompt-formats/meta-llama-2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。