Skip to content

Keyword argument enable_thinking is not a valid argument for this processor and will be ignored #97

@SzhangS

Description

@SzhangS

Description

inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    enable_thinking=False,
    #chat_template_kwargs={"enable_thinking": False}
).to(qwen_model.device)  

I use this code to run qwen3.5_9b, but the resulit is "enable_thinking=False is not a valid argument" , How can I close the thinking mode?

Reproduction

inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
enable_thinking=False,
#chat_template_kwargs={"enable_thinking": False}
).to(qwen_model.device)

Logs

Environment Information

transformers ==5.3

Known Issue

  • The issue hasn't been already addressed in Documentation, Issues, and Discussions.

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