Skip to content

Update deprecated torch_dtype argument #2835

@BenjaminBossan

Description

@BenjaminBossan

In transformers, the torch_dtype argument is deprecated in favor of dtype (as in: AutoModel.from_pretrained(..., torch_dtype=torch.float16)). Although it won't be removed anytime soon, it's still annoying to see the deprecation message. Therefore, PEFT should be updated to use dtype instead of torch_dtype.

After a quick search, the PEFT code proper is not affected, but there are instances in docs, examples, and tests. In general, a simple search and replace should do the job of updating the argument name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions