-
Notifications
You must be signed in to change notification settings - Fork 139
Support DeepSeek v3.2 encoding module #415
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
Conversation
db99b6e to
c36b3f7
Compare
|
internal source has been updated, please review the changes! |
1 similar comment
|
internal source has been updated, please review the changes! |
192b403 to
2a4a143
Compare
|
internal source has been updated, please review the changes! |
12c1b72 to
98a7500
Compare
|
internal source has been updated, please review the changes! |
d78bef5 to
1413c45
Compare
|
internal source has been updated, please review the changes! |
c02d23c to
c513694
Compare
|
internal source has been updated, please review the changes! |
c513694 to
1c97338
Compare
|
internal source has been updated, please review the changes! |
16b943b to
2ed31b5
Compare
|
internal source has been updated, please review the changes! |
14e6e0c to
338bf6b
Compare
|
internal source has been updated, please review the changes! |
8637143 to
93ccbd9
Compare
|
internal source has been updated, please review the changes! |
4bd4339 to
02fffc8
Compare
|
internal source has been updated, please review the changes! |
02fffc8 to
eb72107
Compare
|
internal source has been updated, please review the changes! |
eb72107 to
ca14b13
Compare
|
internal source has been updated, please review the changes! |
ca14b13 to
ca09274
Compare
|
internal source has been updated, please review the changes! |
7341eee to
f61910e
Compare
|
internal source has been updated, please review the changes! |
2 similar comments
|
internal source has been updated, please review the changes! |
|
internal source has been updated, please review the changes! |
0adcd45 to
4aebc77
Compare
|
internal source has been updated, please review the changes! |
4aebc77 to
8c51b6e
Compare
|
internal source has been updated, please review the changes! |
36ef3b4 to
4c52d4b
Compare
4c52d4b to
314e1fc
Compare
DeepSeek-V3.2 introduces significant updates to its chat template compared to prior versions. The primary changes involve a revised format for tool calling and the introduction of a "thinking with tools" capability.
To assist the community in understanding and adapting to this new template, we have provided a dedicated encoding folder, which contains Python scripts and test cases demonstrating how to encode messages in OpenAI-compatible format into input strings for the model and how to parse the model's text output.
A brief example is illustrated below:
Important Notes:
This release does not include a Jinja-format chat template. Please refer to the Python code mentioned above.
The output parsing function included in the code is designed to handle well-formatted strings only. It does not attempt to correct or recover from malformed output that the model might occasionally generate. It is not suitable for production use without robust error handling.
A new role named developer has been introduced in the chat template. This role is dedicated exclusively to search agent scenarios and is designated for no other tasks. The official API does not accept messages assigned to developer.
Reference: https://huggingface.co/deepseek-ai/DeepSeek-V3.2