Di Zhang commited on
Commit
10c10c4
·
verified ·
1 Parent(s): baf3e29

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -9
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
- prefix_template=[
70
- "[UNUSED_TOKEN_146]system\n",
71
- "{}[UNUSED_TOKEN_145]\n"
72
- ]
73
- prompt_template=[
74
- "[UNUSED_TOKEN_146]user\n",
75
- "{}[UNUSED_TOKEN_145]\n",
76
- "[UNUSED_TOKEN_146]assistant\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]}'
 
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]}'