-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtemplates.py
More file actions
52 lines (40 loc) · 1.28 KB
/
templates.py
File metadata and controls
52 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Prompts = {
'meta-llama3': """\n<|start_header_id|>user<|end_header_id|>
{}<|eot_id|>
<|start_header_id|>assistant<|end_header_id|>
""",
'llama3-code':"""<|start_header_id|>user<|end_header_id|>
{}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
<|python_tag|>""",
'qwen': """<|im_start|>user
{}<|im_end|>
<|im_start|>assistant
""",
'gemma2-it': """<start_of_turn>user
{}<end_of_turn>
<start_of_turn>model
""",
'gemma2': "{}",
'mistral': "[INST] {} [/INST]",
'glm4': """<|user|>
{}<|assistant|>
"""
}
SysPrompts = {
'meta-llama3': """<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a knowledgeable, efficient, and direct AI assistant. Provide concise answers, focusing on the key information needed. Offer suggestions tactfully when appropriate to improve outcomes. Engage in productive collaboration with the user. <|eot_id|>""",
'llama3-code': """<|begin_of_text|><|start_header_id|>system<|end_header_id|>
Environment: ipython<|eot_id|>""",
'qwen': """<|im_start|>system
You are a helpful assistant.<|im_end|>
""",
'gemma2': "",
'gemma2-it': "",
'mistral': "",
'glm4': """[gMASK]<sop><|system|>
You are a helpful assistant
"""
}
ExtraPrompts = {
'llama3-code': """\nAlways try to wrap what you write in a function."""
}