Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deepseek-r1 chat template #3072

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Add deepseek-r1 chat template #3072

merged 3 commits into from
Jan 27, 2025

Conversation

AllentDan
Copy link
Collaborator



@pytest.mark.parametrize('model_path_or_name', [
'deepseek-ai/DeepSeek-R1-Distill-Llama-70B',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladrad
Copy link

vladrad commented Jan 23, 2025

Im just 👀 to learn how you did it. Maybe if its easy like this I can add the next one?

@AllentDan
Copy link
Collaborator Author

Yes, @vladrad it is pretty easy to add a new chat template yourself. Check our doc out.


def messages2prompt(self, messages, sequence_start=True, **kwargs):
if sequence_start and not isinstance(messages, str):
return '<|begin▁of▁sentence|>' + super().messages2prompt(messages, sequence_start, **kwargs)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to include the tags?

@vladrad
Copy link

vladrad commented Jan 25, 2025

Thank you I’ll try to do one next time

@lvhan028 lvhan028 merged commit 894af4d into InternLM:main Jan 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants