Skip to content

Commit

Permalink
Update hf_internlm2_chat template (#823)
Browse files Browse the repository at this point in the history
* Update hf_internlm2_chat template

* Update 20B
  • Loading branch information
RangiLyu committed Jan 19, 2024
1 parent e975a96 commit 40a2441
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions configs/models/hf_internlm/hf_internlm2_chat_20b.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

_meta_template = dict(
round=[
dict(role='HUMAN', begin='[UNUSED_TOKEN_146]user\n', end='[UNUSED_TOKEN_145]\n'),
dict(role='SYSTEM', begin='[UNUSED_TOKEN_146]system\n', end='[UNUSED_TOKEN_145]\n'),
dict(role='BOT', begin='[UNUSED_TOKEN_146]assistant\n', end='[UNUSED_TOKEN_145]\n', generate=True),
dict(role='HUMAN', begin='<|im_start|>user\n', end='<|im_end|>\n'),
dict(role='SYSTEM', begin='<|im_start|>system\n', end='<|im_end|>\n'),
dict(role='BOT', begin='<|im_start|>assistant\n', end='<|im_end|>\n', generate=True),
],
eos_token_id=92542
)
Expand All @@ -31,6 +31,6 @@
batch_size=8,
meta_template=_meta_template,
run_cfg=dict(num_gpus=2, num_procs=1),
end_str='[UNUSED_TOKEN_145]',
end_str='<|im_end|>',
)
]
8 changes: 4 additions & 4 deletions configs/models/hf_internlm/hf_internlm2_chat_7b.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

_meta_template = dict(
round=[
dict(role='HUMAN', begin='[UNUSED_TOKEN_146]user\n', end='[UNUSED_TOKEN_145]\n'),
dict(role='SYSTEM', begin='[UNUSED_TOKEN_146]system\n', end='[UNUSED_TOKEN_145]\n'),
dict(role='BOT', begin='[UNUSED_TOKEN_146]assistant\n', end='[UNUSED_TOKEN_145]\n', generate=True),
dict(role='HUMAN', begin='<|im_start|>user\n', end='<|im_end|>\n'),
dict(role='SYSTEM', begin='<|im_start|>system\n', end='<|im_end|>\n'),
dict(role='BOT', begin='<|im_start|>assistant\n', end='<|im_end|>\n', generate=True),
],
eos_token_id=92542
)
Expand All @@ -31,6 +31,6 @@
batch_size=8,
meta_template=_meta_template,
run_cfg=dict(num_gpus=1, num_procs=1),
end_str='[UNUSED_TOKEN_145]',
end_str='<|im_end|>',
)
]

0 comments on commit 40a2441

Please sign in to comment.