AD-IQ3_XS

#2
by djpista - opened

Thank you for the upload.
I tried the AD-IQ3_XS quant, however I cannot seem to make it think on MAX with llama.cpp.
tried the official pi setup:
{
"id": "deepseek-v4-flash",
"name": "DeepSeek V4 Flash",
"contextWindow": 300000,
"maxTokens": 384000,
"input": ["text"],
"reasoning": true
"compat": {
"requiresReasoningContentOnAssistantMessages": true,
"thinkingFormat": "deepseek",
"reasoningEffortMap": {
"minimal": "high",
"low": "high",
"medium": "high",
"high": "high",
"xhigh": "max"
}
}

Also tried with --chat-template-kwargs '{"reasoning_effort":"max"}' or with --reasoning on
But with all of this just seems to think on low effort. (Either it doesn't think or very small like 1-2 lines and starts to write the file.)
None of this seemed to do anything.
On unsloth quant the chat template kwargs working.

My llama.cpp command:
./build/bin/llama-server --model ~/.cache/huggingface/hub/models--AtomicChat--DeepSeek-V4-Flash-0731-GGUF/snapshots/f4c7d285a98969f58aacfe0ebbf544def1a2f525/AD-IQ3_XS/DeepSeek-V4-Flash-0731-AD-IQ3_XS-00001-of-00004.gguf --ctx-size 384000 --load-mode none --no-warmup --temp 1.0 --top-p 1.0 --min-p 0.0 -np 1 -ngl 99 -fa on --alias "dsv4" --cache-ram 15360 --host 0.0.0.0 --port 9100 --jinja --chat-template-kwargs '{"reasoning_effort":"max"}'

Could you please give me some guidance on how to turn on max reasoning mode with these quants?

Thank you in advance.

Atomic Chat org

Hi @djpista ! Welcome :D
Thanks for the question!
I'll check and return with a proper guidance in a moment

Atomic Chat org

Hi again @djpista !
Thanks for finding that problem, it's on me. I've used generic chat template from late June instead of making/finding a new one and packing it into a GGUF quants. That's actually a severe problem and i need to update all quants.

The short reasoning you're seeing has a second cause from the same template - it gates reasoning retention on is_after_last_user, so in agentic loops every previous turn's resoning gets dropped once tool results come back. The current template keeps it.

Easy quick fix (NO redownload needed!):

  1. I've just published the correct template at the repo root. download it;
curl -sLO https://huggingface.co/AtomicChat/DeepSeek-V4-Flash-0731-GGUF/resolve/main/chat_template.jinja
  1. Then just add this temlate using those specific flags:
./build/bin/llama-server \
        --model ~/.cache/huggingface/hub/models--AtomicChat--DeepSeek-V4-Flash-0731-GGUF/snapshots/f4c7d285a98969f58aacfe0ebbf544def1a2f525/AD-IQ3_XS/DeepSeek-V4-Flash-0731-AD-IQ3_XS-00001-of-00004.gguf \
        --ctx-size 384000 --load-mode none --no-warmup \
        --temp 1.0 --top-p 1.0 --min-p 0.0 -np 1 -ngl 99 -fa on \
        --alias "dsv4" --cache-ram 15360 --host 0.0.0.0 --port 9100 \
        --jinja \
        --chat-template-file ./chat_template.jinja \
        --chat-template-kwargs '{"reasoning_effort":"max"}' \
        --reasoning-format deepseek

You don't need enable_thinking or --reasoning on. Thinking defaults to on and the server injects it into the template context. --reasoning-format deepseek is just explicit rather than relying on auto.

Atomic Chat org

Also, your provided model config has a JSON syntax error.

You're missing a comma after "reasoning":true
Fix:

{
  "id": "deepseek-v4-flash",
  "name": "DeepSeek V4 Flash",
  "contextWindow": 300000,
  "maxTokens": 384000,
  "input": [
    "text"
  ],
  "reasoning": true,
  "compat": {
    "requiresReasoningContentOnAssistantMessages": true,
    "thinkingFormat": "deepseek",
    "reasoningEffortMap": {
      "minimal": "high",
      "low": "high",
      "medium": "high",
      "high": "high",
      "xhigh": "max"
    }
  }
}

Note your map only emits "max" at the xhigh setting - every other level sends "high". Both are real levels in the 0731 template, but if you want max you have to actually select xhigh in the client.

requiresReasoningContentOnAssistantMessages: true is correct and now matters more than it did: the new template reads reasoning_content off prior assistant messages and preserves it through tool-call turns, so make sure your client is genuinely sending it back.

We'll insert the template into the GGUF metadata so the extra flag stops being necessary. Thanks again for catching this.

Are you planing to update the weights with the fix? I'll wait to download if it's the case.

Are you planing to update the weights with the fix? I'll wait to download if it's the case.

You dont need to update the weights just to use a chat template. Thats kind of a standard bug. Just pass it with the arguments i sent you above.

I will repack GGUFs, yes. But the chat template is stored in GGUFs metadata. Its simple to repack them, i just have a lot of tasks to do sorry. Will repack soon, for now pleass just use the jinja and chat template flags 😉

Hi again @djpista !
Thanks for finding that problem, it's on me. I've used generic chat template from late June instead of making/finding a new one and packing it into a GGUF quants. That's actually a severe problem and i need to update all quants.

The short reasoning you're seeing has a second cause from the same template - it gates reasoning retention on is_after_last_user, so in agentic loops every previous turn's resoning gets dropped once tool results come back. The current template keeps it.

Easy quick fix (NO redownload needed!):

  1. I've just published the correct template at the repo root. download it;
curl -sLO https://huggingface.co/AtomicChat/DeepSeek-V4-Flash-0731-GGUF/resolve/main/chat_template.jinja
  1. Then just add this temlate using those specific flags:
./build/bin/llama-server \
        --model ~/.cache/huggingface/hub/models--AtomicChat--DeepSeek-V4-Flash-0731-GGUF/snapshots/f4c7d285a98969f58aacfe0ebbf544def1a2f525/AD-IQ3_XS/DeepSeek-V4-Flash-0731-AD-IQ3_XS-00001-of-00004.gguf \
        --ctx-size 384000 --load-mode none --no-warmup \
        --temp 1.0 --top-p 1.0 --min-p 0.0 -np 1 -ngl 99 -fa on \
        --alias "dsv4" --cache-ram 15360 --host 0.0.0.0 --port 9100 \
        --jinja \
        --chat-template-file ./chat_template.jinja \
        --chat-template-kwargs '{"reasoning_effort":"max"}' \
        --reasoning-format deepseek

You don't need enable_thinking or --reasoning on. Thinking defaults to on and the server injects it into the template context. --reasoning-format deepseek is just explicit rather than relying on auto.

Thank you, it works great now.

Sign up or log in to comment

Free AI Image Generator No sign-up. Instant results. Open Now