คอลเลกชันของเทมเพลตพรอมต์พื้นฐานสำหรับการแชทต่างๆ คอลเลกชันแม่แบบพรอมต์พื้นฐานของแชท LLM
แรงจูงใจ : เทมเพลตพรอมต์พื้นฐานจะส่งผลกระทบอย่างมีนัยสำคัญต่อประสิทธิภาพของการเรียนการสอนต่อไปนี้ แบบจำลองของสถาปัตยกรรมที่แตกต่างกันอาจใช้เทมเพลตที่แตกต่างกันในระหว่างการฝึกอบรม อย่างไรก็ตามในปัจจุบันเทมเพลตเหล่านี้อาจเป็นสิ่งที่ท้าทายในการค้นหา บางครั้งพวกเขาจะถูกฝังอยู่ในรหัสตัวอย่างซ่อนอยู่ภายในปัญหา GitHub หรือบางครั้งพบในบล็อกอย่างเป็นทางการ ...
แรงจูงใจ : เทมเพลตพรอมต์พื้นฐานจะส่งผลกระทบอย่างมีนัยสำคัญต่อผลกระทบของคำสั่งดังต่อไปนี้ แบบจำลองของสถาปัตยกรรมที่แตกต่างกันอาจใช้เทมเพลตคำใบ้ที่แตกต่างกันเมื่อฝึกอบรม อย่างไรก็ตามเทมเพลตเหล่านี้มักจะหาได้ยากในขณะนี้ บางครั้งพวกเขาถูกฝังอยู่ในรหัสตัวอย่างบางครั้งซ่อนอยู่ในปัญหา GitHub และบางครั้งก็พบได้ในบล็อกอย่างเป็นทางการ ...
บันทึก
ภาษามาร์กอัปแชทเป็นกระแสหลักเช่น Transformers ของ Huggingface, Tiktoken ของ Openai
การแชทมาร์กอัปภาษาเป็นรูปแบบกระแสหลักเช่น Transformers ของ HuggingFace, Tiktoken ของ Openai
(ลำดับตัวอักษรโดยสถาปัตยกรรม)
(จัดเรียงตามคำสั่งพจนานุกรมของชื่อสคีมา)
template = """<reserved_195>{query}<reserved_196>""" template = """<|system|>
You are ChatGLM3, a large language model trained by Zhipu.AI. Follow the user's instructions carefully. Respond using markdown.
<|user|>
{query}
<|assistant|>
""" template = """<bos><start_of_turn>user
{query}<end_of_turn>
<start_of_turn>model""" template = """<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
{query}<|im_end|>
<|im_start|>assistant
""" template = """<s>[INST] <<SYS>>
You are a helpful, respectful and honest assistant.
<</SYS>> {query} [/INST] Sure, I'd be happy to help. Here is the answer:"""Sure, I'd be happy to help. Here is the answer: หลีกเลี่ยงเอาต์พุตแบบจำลอง verbose template = """Instruct: {query} n Output:"""
# or template = """Alice: {query}nBob:""" template = """<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
{query}<|im_end|>
<|im_start|>assistant
"""<|im_end|> หรือ <|endoftext|> คุณสามารถลบข้อความหลังจากพวกเขาหรือใช้พารามิเตอร์ stop เช่น: # Using vLLM interface
payload = json . dumps ({
"prompt" : query ,
"n" : 1 ,
"stop" : [ "<|endoftext|>" , "<|im_end|>" ],
}) template = """<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant""" template = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a helpful AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
{query}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
""" template =