chat_prompt_templates
1.0.0
다양한 채팅 LLM에 대한 기본 프롬프트 템플릿 모음 | 채팅 LLM의 기본 프롬프트 템플릿 컬렉션
동기 부여 : 기본 프롬프트 템플릿은 다음과 같은 교육의 효과에 크게 영향을 미칩니다. 다른 아키텍처 모델은 훈련 중에 다른 프롬프트 템플릿을 사용할 수 있습니다. 그러나 현재이 템플릿은 찾기가 어려울 수 있습니다. 때로는 예제 코드에 포함되거나 GitHub 문제에 숨겨져 있거나 때때로 공식 블로그에서 찾을 수 있습니다 ...
동기 부여 : 기본 프롬프트 템플릿은 다음 지침의 영향에 크게 영향을 미칩니다. 다른 아키텍처 모델은 훈련시 서로 다른 힌트 템플릿을 사용할 수 있습니다. 그러나이 템플릿은 현재 자주 찾기가 어렵습니다. 때때로 그들은 샘플 코드에 포함되며 때로는 Github 문제에 숨겨져 있으며 때로는 공식 블로그에서 발견됩니다 ...
메모
채팅 마크 업 언어는 주류입니다. Huggingface의 변압기, Openai의 Tiktoken.
채팅 마크 업 언어는 Huggingface의 Transformers, Openai 's Tiktoken과 같은 주류 형식입니다.
(아키텍처에 의한 알파벳 순서)
(사전 순서로 정렬 된 스키마 이름으로 정렬)
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: 장황한 모델 출력을 피하십시오. 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 =