Skip to content

Add the support for deepseek architecture .gguf #36144

Open

Description

@z7d1

Feature request

The current version does not support gguf under the deepseek architecture. It is hoped that the deepseek architecture will be added. [supported-model-architectures]

Motivation

In some framework based transformers (e.g. vllm) will raise error when load .gguf file of deepseek model or quantized deepseek model.

Your contribution

Is there any guidance to help users add relevant support?

Activity

  1. Rocketknight1 commented on Feb 12, 2025

    @Rocketknight1
    Member

    cc @SunMarc @muellerzr @MekkCyber - who's the right person to ping for GGUF loading?

  2. MekkCyber commented on Feb 12, 2025

    @MekkCyber
    Contributor

    I think me and @SunMarc and @Isotr0py

  3. Isotr0py commented on Feb 12, 2025

    @Isotr0py
    Contributor

    Seems that all deepseek-r1 gguf checkpoints are sharded, I think we should add sharded gguf support firstly.

  4. Isotr0py commented on Feb 12, 2025

    @Isotr0py
    Contributor

    Anyway, regardless the sharded gguf weights (we can merge weights with tool from llama.cpp), will #35926 block us currently? Because the deepseek-v3 support hasn't landed yet.

  5. MekkCyber commented on Feb 12, 2025

    @MekkCyber
    Contributor

    yes deepseek v3 is still not supported for now, the pr is functional but some small adjustments are needed

  6. z7d1 commented on Feb 13, 2025

    @z7d1
    Author

    Hello @MekkCyber ! Isn't the reason that the transformers don't support it because the deepseek .gguf file can't be merged?

  7. MekkCyber commented on Feb 13, 2025

    @MekkCyber
    Contributor

    Hello @zh-jp! I think it can be merged using llama-gguf-split --merge but i'm not sure if it's a good idea

  8. mmdbhs commented on Feb 14, 2025

    @mmdbhs

    we need GGUF supported! please!

  9. Jackarry188 commented on Feb 14, 2025

    @Jackarry188

    we need GGUF supported! please!

  10. floyddcn commented on Feb 17, 2025

    @floyddcn

    we need GGUF supported! please!

  11. htkim27 commented on Feb 18, 2025

    @htkim27

    we need GGUF supported! please!

  12. fonhorst commented on Feb 18, 2025

    @fonhorst

    we need GGUF supported! please!

  13. shangdibufashi commented on Feb 19, 2025

    @shangdibufashi

    we need GGUF supported! please!

  14. maguih commented on Feb 27, 2025

    @maguih

    we need GGUF supported! please!

  15. tywuAMD commented on Mar 4, 2025

    @tywuAMD

    We need GGUF supported! Please!

  16. MiyaaL commented on Mar 13, 2025

    @MiyaaL

    We need GGUF supported! Please!

  17. binghanc commented on Sep 22, 2025

    @binghanc

    We need GGUF supported! Please!

  18. ArthurZucker commented on Oct 20, 2026

    @ArthurZucker
    Collaborator

    DeepSeek GGUF is still not supported, but the path is now well trodden: add a deepseek2 entry (llama.cpp's arch name for V2/V3/R1) to GGUF_CONFIG_MAPPING in src/transformers/integrations/ggml.py, map it to deepseek_v3 in src/transformers/modeling_gguf_pytorch_utils.py, and handle stacked expert tensors like the existing MoE support (see _split_moe_expert_tensor and MiniMax-M2 support in #44526, or qwen3_moe). The MLA kv_b tensors will likely need a custom TensorProcessor. Docs: https://huggingface.co/docs/transformers/main/en/quantization/gguf; contributions welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions