Skip to content

Deepseek V3 support added #176

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

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Deepseek V3 support added #176

merged 1 commit into from
Jan 23, 2025

Conversation

saood06
Copy link
Collaborator

@saood06 saood06 commented Jan 23, 2025

Very direct port of ggml-org/llama.cpp#11049.

Tested working with IQ4_K_R4 and IQ4_K. No tests so far on any quant that is supported by llama.cpp so that performance can be compared.

Tested on dual socket Xeon E5-2690 v3
Prompt processing:11.5 t/s for IQ4_K, 9.8 t/s IQ4_K_R4
Token generation: 2.75 t/s for IQ4_K, 3.10 t/s for IQ4_K_R4

Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com>
@ikawrakow ikawrakow merged commit 2195632 into ikawrakow:main Jan 23, 2025
@ikawrakow
Copy link
Owner

@saood06

Quick question: current llama.cpp has this check for Deepseek-V3:

    } else if (tmpl_contains(LU8("<|Assistant|>")) && tmpl_contains(LU8("<|User|>")) && tmpl_contains(LU8("<|end▁of▁sentence|>"))) {
        return LLM_CHAT_TEMPLATE_DEEPSEEK_3;

while the check you added with this PR is

    else if (tmpl == "deepseek3" || tmpl_contains(LU8("'<|Assistant|>' + message['content'] + '<|end▁of▁sentence|>'"))) {

The check for tmpl == "deepseek3" is done before in llama.cpp, so this is not an issue, but the remainder is not the same. Is this a problem? Or would it be a problem if I just made it the same as llama.cpp ?

@saood06
Copy link
Collaborator Author

saood06 commented Jan 23, 2025

The change you are referencing happened in ggml-org/llama.cpp@ec7f3ac I was not aware of that till now.

Is this a problem? Or would it be a problem if I just made it the same as llama.cpp ?

You can change it if you want but both work, based on the chat_templates for the models that have been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants