Di Zhang
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -66,15 +66,15 @@ For queries in ShareGPT format like,
|
|
66 |
You can format it into this InternLM2 Dialogue format like,
|
67 |
```
|
68 |
def InternLM2_format(instruction,prompt,answer,history):
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
system = f'{prefix_template[0]}{prefix_template[-1].format(instruction)}'
|
79 |
history = "\n".join([f'{prompt_template[0]}{prompt_template[1].format(qa[0])}\n{prompt_template[-1]}{qa[1]}' for qa in history])
|
80 |
prompt = f'\n{prompt_template[0]}{prompt_template[1].format(prompt)}\n{prompt_template[-1]}'
|
|
|
66 |
You can format it into this InternLM2 Dialogue format like,
|
67 |
```
|
68 |
def InternLM2_format(instruction,prompt,answer,history):
|
69 |
+
prefix=[
|
70 |
+
"<|system|>:",
|
71 |
+
"{}"
|
72 |
+
]
|
73 |
+
prompt=[
|
74 |
+
"<|user|>:",
|
75 |
+
"{}\n",
|
76 |
+
"<|Bot|>:\n"
|
77 |
+
]
|
78 |
system = f'{prefix_template[0]}{prefix_template[-1].format(instruction)}'
|
79 |
history = "\n".join([f'{prompt_template[0]}{prompt_template[1].format(qa[0])}\n{prompt_template[-1]}{qa[1]}' for qa in history])
|
80 |
prompt = f'\n{prompt_template[0]}{prompt_template[1].format(prompt)}\n{prompt_template[-1]}'
|