b9840

ggml-org/llama.cppb9840Jun 29, 2026by github-actions[bot]same day as b9839

What changed since b9839

medium risk

Adds full DeepSeek V4 model support (conversion, graph reuse, Flash Attention, partial checkpointing) on top of a UI tooling fix.

Breaking changes

  • The DeepSeek V4 architecture identifier was renamed from deepseek-v4-flash to deepseek4, so GGUFs produced with the older naming may need re-conversion or renaming.
  • The built-in C++ chat template for DeepSeek V4 was removed in favor of architecture-based inlined templates, changing how prompts are formatted for these models.

New features

  • DeepSeek V4 conversion and inference support, including the Pro variant.
  • Graph reuse and Flash Attention enabled for DeepSeek V4, with KV padding to make FA viable.
  • Partial checkpointing and save/load state support for DeepSeek V4 sessions.
  • Multi-sequence processing groundwork, currently limited to n_seq=1.
  • Compatibility with antirez ds4 GGUFs and a mechanism for inlining chat templates per architecture.

Improvements

  • Removed the redundant V cache and dead code, and simplified graph reuse logic.
  • Replaced ggml_view_3d with ggml_reshape_3d and precomputed source indices for efficiency.
  • Reserved worst-case KV cache and set llama_model_n_swa to 0 for DeepSeek V4.
  • Simplified set_gguf_parameters by delegating to the superclass and using expert_gating_func instead of moe.score_func.
  • Restored Tailwind CSS scanning in ignored worktrees for the UI tooling (carried over from the prior build).

Bug fixes

  • Fixed RoPE configuration and added a Sinkhorn epsilon correction for DeepSeek V4.
  • Corrected the kq_mask shape and the pointer used for can_reuse.
  • Fixed the architecture test list and removed an outdated test.
  • Cleaned up leftover debugging code and unused variables/inputs.

Upgrade notes

Re-convert or rename any DeepSeek V4 GGUFs that still use the old deepseek-v4-flash architecture tag, since the identifier is now deepseek4. Prompt formatting for these models now comes from inlined templates rather than a built-in C++ template, so verify your chat template handling. Multi-sequence use of DeepSeek V4 is not yet supported beyond n_seq=1.

Analyzed Nov 1, 2026

Upgrading?

Release notes summary

Adds comprehensive support for DeepSeek V4 models, including conversion, graph optimization, and multi-sequence processing.

Key Highlights

  • Added DeepSeek V4 conversion and model support
  • Enabled graph reuse and Flash Attention (FA) optimizations
  • Added partial checkpointing and multi-sequence processing support
  • Supported pro models and fixed RoPE configuration

Release Notes (excerpt)

<details open> DeepSeek V4 (#24162) * convert: add dsv4 conversion * add basic setup * add llm_graph_input_dsv4 * add save-load state * add sinkhorn eps - correction by @fairydreaming * add rope fix * cleanup dead code * fix bugs * support pro model: added by @fairydreaming * remove redundant V cache * Chat template * remove debugging leftovers * Add mechanism for inlining templates based on architecture * s/deepseek-v4-flash/deepseek4/g…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories