DeepSeek Flash 1017 skips Jinja. Read its prompts with Python
说明与用途
开发者可以使用 encoding.py 在本地生成并检查 DeepSeek Flash 1017 的提示,无需下载模型权重。这样可以查看提示标记、推理努力限制和工具结果顺序。
问题
DeepSeek Flash 1017 does not ship a chat_template.jinja file, making it hard to inspect prompt text before tokenization.
结果
The workflow demonstrates how to generate and inspect DeepSeek Flash prompts without model weights, validate reasoning effort limits, and confirm tool result ordering.
工作流
- 1. Create a folder and download encoding.py and LICENSE from Hugging Face.
- 2. Verify file integrity with SHA‑256 checksum.
- 3. Write demo.py to import encode_messages and construct messages.
- 4. Run demo.py to see prompt ends with
<|Assistant|>marker and no answer content. - 5. Enable thinking_mode and reasoning_effort to see prompt includes Reasoning Effort line and
<|Assistant|><think>marker. - 6. Test reasoning_effort bounds by passing 101 and observing validation error.
- 7. Create tool call messages with two function calls (Pune and Delhi).
- 8. Encode messages and assert that prompt orders tool results by call id, not completion order.
证据
DeepSeek Flash 1017 doesn't ship one. Instead there's a 38 KB Python file called encoding.py
Make a folder and fetch the file, pinned to the exact version I tested so nothing shifts under you:
Check you got the same file (37,962 bytes):
The output stops at an assistant marker. No 4 anywhere.
I also tried reasoning_effort=101. The encoder refused it: the effort has to be a whole number from 1 to 100, or one of the words low, high or max.
Pune comes first in the prompt, even though Delhi arrived first.
- 记录日期: 2026-10-20T08:41:01.407Z