Skip to content

Support of Qwen3 GGUF model #38650

@Auth0rM0rgan

Description

@Auth0rM0rgan

Hi, I am getting the following error when I want to use the GGUF model with Qwen3
"ValueError: GGUF model with architecture qwen3 is not supported yet."

I have the latest transformers and gguf-0.17.0

self.tokenizer = AutoTokenizer.from_pretrained(model_name, gguf_file= "Qwen3-0.6B-Q2_K_L.gguf",use_fast=True)
        if self.tokenizer.pad_token is None:
            self.tokenizer.pad_token = "<pad>"
            self.tokenizer.add_special_tokens({"pad_token": "<pad>"})
        self.tokenizer.padding_side = "left"
        self.model = AutoModelForCausalLM.from_pretrained(
            model_name,
            gguf_file = "Qwen3-0.6B-Q2_K_L.gguf",
            pad_token_id=self.tokenizer.pad_token_id,
            trust_remote_code=True,
            torch_dtype=torch.bfloat16,
            device_map="auto",
        )

How can I use the gguf model of Qwen3 with transformers? Could you please add the support of it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions