Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

DeepSeek Flash 1017 skips Jinja. Read its prompts with Python

Описание и применение

Разработчики могут локально генерировать и проверять промпты DeepSeek Flash 1017, используя файл encoding.py, без загрузки модели. Это позволяет увидеть, как формируются маркеры, ограничения на усилие рассуждения и порядок результатов инструментов.

Задача

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