@@ -136,7 +136,7 @@ def qwen_completion_to_prompt(completion):
136
136
"tiny-llama-1b-chat" : {
137
137
"model_id" : "TinyLlama/TinyLlama-1.1B-Chat-v1.0" ,
138
138
"remote_code" : False ,
139
- "start_message" : f"<|system|> \n { DEFAULT_SYSTEM_PROMPT } </s> \n " ,
139
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
140
140
"history_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}</s> \n " ,
141
141
"current_message_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}" ,
142
142
"rag_prompt_template" : f"""<|system|> { DEFAULT_RAG_PROMPT } </s>"""
@@ -150,24 +150,23 @@ def qwen_completion_to_prompt(completion):
150
150
"DeepSeek-R1-Distill-Qwen-1.5B" : {
151
151
"model_id" : "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" ,
152
152
"genai_chat_template" : "{% for message in messages %}{% if loop.first %}{{ '<|begin▁of▁sentence|>' }}{% endif %}{% if message['role'] == 'system' and message['content'] %}{{ message['content'] }}{% elif message['role'] == 'user' %}{{ '<|User|>' + message['content'] }}{% elif message['role'] == 'assistant' %}{{ '<|Assistant|>' + message['content'] + '<|end▁of▁sentence|>' }}{% endif %}{% if loop.last and add_generation_prompt and message['role'] != 'assistant' %}{{ '<|Assistant|>' }}{% endif %}{% endfor %}" ,
153
- "system_prompt " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoidi mixing languages." ,
153
+ "start_message " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoidi mixing languages." ,
154
154
},
155
155
"DeepSeek-R1-Distill-Qwen-7B" : {
156
156
"model_id" : "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B" ,
157
157
"genai_chat_template" : "{% for message in messages %}{% if loop.first %}{{ '<|begin▁of▁sentence|>' }}{% endif %}{% if message['role'] == 'system' and message['content'] %}{{ message['content'] }}{% elif message['role'] == 'user' %}{{ '<|User|>' + message['content'] }}{% elif message['role'] == 'assistant' %}{{ '<|Assistant|>' + message['content'] + '<|end▁of▁sentence|>' }}{% endif %}{% if loop.last and add_generation_prompt and message['role'] != 'assistant' %}{{ '<|Assistant|>' }}{% endif %}{% endfor %}" ,
158
- "system_prompt " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoid mixing languages." ,
158
+ "start_message " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoid mixing languages." ,
159
159
},
160
160
"DeepSeek-R1-Distill-Llama-8B" : {
161
161
"model_id" : "deepseek-ai/DeepSeek-R1-Distill-Llama-8B" ,
162
162
"genai_chat_template" : "{% for message in messages %}{% if loop.first %}{{ '<|begin▁of▁sentence|>' }}{% endif %}{% if message['role'] == 'system' and message['content'] %}{{ message['content'] }}{% elif message['role'] == 'user' %}{{ '<|User|>' + message['content'] }}{% elif message['role'] == 'assistant' %}{{ '<|Assistant|>' + message['content'] + '<|end▁of▁sentence|>' }}{% endif %}{% if loop.last and add_generation_prompt and message['role'] != 'assistant' %}{{ '<|Assistant|>' }}{% endif %}{% endfor %}" ,
163
- "system_prompt " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoid mixing languages." ,
163
+ "start_message " : DEFAULT_SYSTEM_PROMPT + "Think briefly and provide informative answers, avoid mixing languages." ,
164
164
},
165
165
"llama-3.2-1b-instruct" : {
166
166
"model_id" : "meta-llama/Llama-3.2-1B-Instruct" ,
167
167
"start_message" : DEFAULT_SYSTEM_PROMPT ,
168
168
"stop_tokens" : ["<|eot_id|>" ],
169
169
"has_chat_template" : True ,
170
- "start_message" : " <|start_header_id|>system<|end_header_id|>\n \n " + DEFAULT_SYSTEM_PROMPT + "<|eot_id|>" ,
171
170
"history_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}<|eot_id|>" ,
172
171
"current_message_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}" ,
173
172
"rag_prompt_template" : f"<|start_header_id|>system<|end_header_id|>\n \n { DEFAULT_RAG_PROMPT } <|eot_id|>"
@@ -187,7 +186,6 @@ def qwen_completion_to_prompt(completion):
187
186
"start_message" : DEFAULT_SYSTEM_PROMPT ,
188
187
"stop_tokens" : ["<|eot_id|>" ],
189
188
"has_chat_template" : True ,
190
- "start_message" : " <|start_header_id|>system<|end_header_id|>\n \n " + DEFAULT_SYSTEM_PROMPT + "<|eot_id|>" ,
191
189
"history_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}<|eot_id|>" ,
192
190
"current_message_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}" ,
193
191
"rag_prompt_template" : f"<|start_header_id|>system<|end_header_id|>\n \n { DEFAULT_RAG_PROMPT } <|eot_id|>"
@@ -212,7 +210,7 @@ def qwen_completion_to_prompt(completion):
212
210
"gemma-2b-it" : {
213
211
"model_id" : "google/gemma-2b-it" ,
214
212
"remote_code" : False ,
215
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
213
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
216
214
"history_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}<end_of_turn>" ,
217
215
"current_message_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}" ,
218
216
"rag_prompt_template" : f"""{ DEFAULT_RAG_PROMPT } ,"""
@@ -221,7 +219,7 @@ def qwen_completion_to_prompt(completion):
221
219
"gemma-2-2b-it" : {
222
220
"model_id" : "google/gemma-2-2b-it" ,
223
221
"remote_code" : False ,
224
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
222
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
225
223
"history_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}<end_of_turn>" ,
226
224
"current_message_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}" ,
227
225
"rag_prompt_template" : f"""{ DEFAULT_RAG_PROMPT } ,"""
@@ -244,7 +242,7 @@ def qwen_completion_to_prompt(completion):
244
242
"qwen2.5-3b-instruct" : {
245
243
"model_id" : "Qwen/Qwen2.5-3B-Instruct" ,
246
244
"remote_code" : False ,
247
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
245
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
248
246
"rag_prompt_template" : f"""<|im_start|>system
249
247
{ DEFAULT_RAG_PROMPT } <|im_end|>"""
250
248
+ """
@@ -260,7 +258,7 @@ def qwen_completion_to_prompt(completion):
260
258
"qwen2.5-7b-instruct" : {
261
259
"model_id" : "Qwen/Qwen2.5-7B-Instruct" ,
262
260
"remote_code" : False ,
263
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
261
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
264
262
"rag_prompt_template" : f"""<|im_start|>system
265
263
{ DEFAULT_RAG_PROMPT } <|im_end|>"""
266
264
+ """
@@ -275,7 +273,7 @@ def qwen_completion_to_prompt(completion):
275
273
"gemma-7b-it" : {
276
274
"model_id" : "google/gemma-7b-it" ,
277
275
"remote_code" : False ,
278
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
276
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
279
277
"history_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}<end_of_turn>" ,
280
278
"current_message_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}" ,
281
279
"rag_prompt_template" : f"""{ DEFAULT_RAG_PROMPT } ,"""
@@ -284,7 +282,7 @@ def qwen_completion_to_prompt(completion):
284
282
"gemma-2-9b-it" : {
285
283
"model_id" : "google/gemma-2-9b-it" ,
286
284
"remote_code" : False ,
287
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
285
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
288
286
"history_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}<end_of_turn>" ,
289
287
"current_message_template" : "<start_of_turn>user{user}<end_of_turn><start_of_turn>model{assistant}" ,
290
288
"rag_prompt_template" : f"""{ DEFAULT_RAG_PROMPT } ,"""
@@ -293,7 +291,7 @@ def qwen_completion_to_prompt(completion):
293
291
"llama-2-chat-7b" : {
294
292
"model_id" : "meta-llama/Llama-2-7b-chat-hf" ,
295
293
"remote_code" : False ,
296
- "start_message" : f"<s>[INST] <<SYS>> \n { DEFAULT_SYSTEM_PROMPT } \n <</SYS>> \n \n " ,
294
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
297
295
"history_template" : "{user}[/INST]{assistant}</s><s>[INST]" ,
298
296
"current_message_template" : "{user} [/INST]{assistant}" ,
299
297
"tokenizer_kwargs" : {"add_special_tokens" : False },
@@ -310,7 +308,6 @@ def qwen_completion_to_prompt(completion):
310
308
"start_message" : DEFAULT_SYSTEM_PROMPT ,
311
309
"stop_tokens" : ["<|eot_id|>" , "<|end_of_text|>" ],
312
310
"has_chat_template" : True ,
313
- "start_message" : " <|start_header_id|>system<|end_header_id|>\n \n " + DEFAULT_SYSTEM_PROMPT + "<|eot_id|>" ,
314
311
"history_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}<|eot_id|>" ,
315
312
"current_message_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}" ,
316
313
"rag_prompt_template" : f"<|start_header_id|>system<|end_header_id|>\n \n { DEFAULT_RAG_PROMPT } <|eot_id|>"
@@ -331,7 +328,6 @@ def qwen_completion_to_prompt(completion):
331
328
"start_message" : DEFAULT_SYSTEM_PROMPT ,
332
329
"stop_tokens" : ["<|eot_id|>" , "<|end_of_text|>" ],
333
330
"has_chat_template" : True ,
334
- "start_message" : " <|start_header_id|>system<|end_header_id|>\n \n " + DEFAULT_SYSTEM_PROMPT + "<|eot_id|>" ,
335
331
"history_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}<|eot_id|>" ,
336
332
"current_message_template" : "<|start_header_id|>user<|end_header_id|>\n \n {user}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n \n {assistant}" ,
337
333
"rag_prompt_template" : f"<|start_header_id|>system<|end_header_id|>\n \n { DEFAULT_RAG_PROMPT } <|eot_id|>"
@@ -349,7 +345,7 @@ def qwen_completion_to_prompt(completion):
349
345
"mistral-7b-instruct" : {
350
346
"model_id" : "mistralai/Mistral-7B-Instruct-v0.1" ,
351
347
"remote_code" : False ,
352
- "start_message" : f"<s>[INST] <<SYS>> \n { DEFAULT_SYSTEM_PROMPT } \n <</SYS>> \n \n " ,
348
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
353
349
"history_template" : "{user}[/INST]{assistant}</s><s>[INST]" ,
354
350
"current_message_template" : "{user} [/INST]{assistant}" ,
355
351
"tokenizer_kwargs" : {"add_special_tokens" : False },
@@ -363,7 +359,7 @@ def qwen_completion_to_prompt(completion):
363
359
"mistral-7B-Instruct-v0.3" : {
364
360
"model_id" : "mistralai/Mistral-7B-Instruct-v0.3" ,
365
361
"remote_code" : False ,
366
- "start_message" : f"<s>[INST] { DEFAULT_SYSTEM_PROMPT } \n \n " ,
362
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
367
363
"history_template" : "{user}[/INST]{assistant}</s>[INST]" ,
368
364
"current_message_template" : "{user} [/INST]{assistant}</s>" ,
369
365
"tokenizer_kwargs" : {"add_special_tokens" : False },
@@ -373,7 +369,7 @@ def qwen_completion_to_prompt(completion):
373
369
"zephyr-7b-beta" : {
374
370
"model_id" : "HuggingFaceH4/zephyr-7b-beta" ,
375
371
"remote_code" : False ,
376
- "start_message" : f"<|system|> \n { DEFAULT_SYSTEM_PROMPT } </s> \n " ,
372
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
377
373
"history_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}</s> \n " ,
378
374
"current_message_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}" ,
379
375
"rag_prompt_template" : f"""<|system|> { DEFAULT_RAG_PROMPT } </s>"""
@@ -387,7 +383,7 @@ def qwen_completion_to_prompt(completion):
387
383
"notus-7b-v1" : {
388
384
"model_id" : "argilla/notus-7b-v1" ,
389
385
"remote_code" : False ,
390
- "start_message" : f"<|system|> \n { DEFAULT_SYSTEM_PROMPT } </s> \n " ,
386
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
391
387
"history_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}</s> \n " ,
392
388
"current_message_template" : "<|user|>\n {user}</s> \n <|assistant|>\n {assistant}" ,
393
389
"rag_prompt_template" : f"""<|system|> { DEFAULT_RAG_PROMPT } </s>"""
@@ -401,7 +397,7 @@ def qwen_completion_to_prompt(completion):
401
397
"neural-chat-7b-v3-3" : {
402
398
"model_id" : "Intel/neural-chat-7b-v3-3" ,
403
399
"remote_code" : False ,
404
- "start_message" : f"<s>[INST] <<SYS>> \n { DEFAULT_SYSTEM_PROMPT } \n <</SYS>> \n \n " ,
400
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
405
401
"history_template" : "{user}[/INST]{assistant}</s><s>[INST]" ,
406
402
"current_message_template" : "{user} [/INST]{assistant}" ,
407
403
"tokenizer_kwargs" : {"add_special_tokens" : False },
@@ -415,7 +411,7 @@ def qwen_completion_to_prompt(completion):
415
411
"phi-3-mini-instruct" : {
416
412
"model_id" : "microsoft/Phi-3-mini-4k-instruct" ,
417
413
"remote_code" : True ,
418
- "start_message" : "<|system|> \n { DEFAULT_SYSTEM_PROMPT}<|end|> \n " ,
414
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
419
415
"history_template" : "<|user|>\n {user}<|end|> \n <|assistant|>\n {assistant}<|end|>\n " ,
420
416
"current_message_template" : "<|user|>\n {user}<|end|> \n <|assistant|>\n {assistant}" ,
421
417
"stop_tokens" : ["<|end|>" ],
@@ -431,7 +427,7 @@ def qwen_completion_to_prompt(completion):
431
427
"phi-3.5-mini-instruct" : {
432
428
"model_id" : "microsoft/Phi-3.5-mini-instruct" ,
433
429
"remote_code" : True ,
434
- "start_message" : "<|system|> \n { DEFAULT_SYSTEM_PROMPT}<|end|> \n " ,
430
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
435
431
"history_template" : "<|user|>\n {user}<|end|> \n <|assistant|>\n {assistant}<|end|>\n " ,
436
432
"current_message_template" : "<|user|>\n {user}<|end|> \n <|assistant|>\n {assistant}" ,
437
433
"stop_tokens" : ["<|end|>" ],
@@ -451,7 +447,7 @@ def qwen_completion_to_prompt(completion):
451
447
"qwen2.5-14b-instruct" : {
452
448
"model_id" : "Qwen/Qwen2.5-14B-Instruct" ,
453
449
"remote_code" : False ,
454
- "start_message" : DEFAULT_SYSTEM_PROMPT + ", " ,
450
+ "start_message" : DEFAULT_SYSTEM_PROMPT ,
455
451
"rag_prompt_template" : f"""<|im_start|>system
456
452
{ DEFAULT_RAG_PROMPT } <|im_end|>"""
457
453
+ """
@@ -566,7 +562,7 @@ def qwen_completion_to_prompt(completion):
566
562
"qwen-7b-chat" : {
567
563
"model_id" : "Qwen/Qwen-7B-Chat" ,
568
564
"remote_code" : True ,
569
- "start_message" : f"<|im_start|>system \n { DEFAULT_SYSTEM_PROMPT_CHINESE } <|im_end|>" ,
565
+ "start_message" : DEFAULT_SYSTEM_PROMPT_CHINESE ,
570
566
"history_template" : "<|im_start|>user\n {user}<im_end><|im_start|>assistant\n {assistant}<|im_end|>" ,
571
567
"current_message_template" : '"<|im_start|>user\n {user}<im_end><|im_start|>assistant\n {assistant}' ,
572
568
"stop_tokens" : ["<|im_end|>" , "<|endoftext|>" ],
0 commit comments