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

Fix UT of deepseek chat template #3125

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Fix UT of deepseek chat template #3125

merged 1 commit into from
Feb 10, 2025

Conversation

lvhan028
Copy link
Collaborator

For deepseek-r1 model, the chat template add "\n" after "<|Assistant|>"

 AssertionError: assert '<|begin▁of▁s...nt|><think>\n' == '<|begin▁of▁s...<|Assistant|>'

Since LMDeploy allows users to add assistant content in prompt message, I think we'd better not change "deepseek-r1" in model.py but modifying the UT.

@AllentDan
Copy link
Collaborator

Is it caused by the modification of deepseek r1 huggingface model? https://huggingface.co/deepseek-ai/DeepSeek-R1/commit/8a58a132790c9935686eb97f042afa8013451c9f

@lvhan028
Copy link
Collaborator Author

Is it caused by the modification of deepseek r1 huggingface model? https://huggingface.co/deepseek-ai/DeepSeek-R1/commit/8a58a132790c9935686eb97f042afa8013451c9f

Yes

@lvhan028 lvhan028 merged commit 985c767 into InternLM:main Feb 10, 2025
4 checks passed
tastelikefeet added a commit to tastelikefeet/lmdeploy that referenced this pull request Feb 17, 2025
* main: (90 commits)
  Fix cogvlm and phi3vision (InternLM#3137)
  support release pipeline (InternLM#3069)
  [ci] fix some fail in daily testcase (InternLM#3134)
  Fix internvl2.5 error after eviction (InternLM#3122)
  fix UT of deepseek chat template (InternLM#3125)
  Update benchmark script and user guide (InternLM#3110)
  bump version to v0.7.0.post3 (InternLM#3115)
  fix postional argument (InternLM#3086)
  remove logitswarper (InternLM#3109)
  [Fix] fix the URL judgment problem in Windows (InternLM#3103)
  fix user guide about cogvlm deployment (InternLM#3088)
  add option max-concurrent-requests for api_server(InternLM#2961)
  bump version to v0.7.0.post2 (InternLM#3094)
  Fix xcomposer2d5 (InternLM#3087)
  Add system role to deepseek chat template (InternLM#3031)
  Update tokenizer (InternLM#3061)
  Add deepseek-r1 chat template (InternLM#3072)
  bump version to v0.7.0.post1 (InternLM#3076)
  More arguments in api_client, update docstrings (InternLM#3077)
  fix sliding window mgr (InternLM#3068)
  ...

# Conflicts:
#	lmdeploy/turbomind/turbomind.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants