Skip to content

[RFC]: replace deprecated torch_dtype by dtype #26293

@yannicks1

Description

@yannicks1

Motivation.

Huggingface recently updated the argument from torch_dtype to a simple dtype to be coherent with PyTorch (see PR here).

Although their implementation is backward compatible, we could consider also making the change torch_dtype -> dtype to not trigger the warning:

`torch_dtype` is deprecated! Use `dtype` instead!

The warning is triggered for every call that involves huggingface (even if it is just for loading the model).

For example:

vllm bench latency --model "any_model_from_hf_hub" . . .

triggers the above warning.

Proposed Change.

Following changes are suggested:

  • Replace torch_dtype with dtype to silence above warning and be prepared to when torch_dtype is fully removed in hf.
  • Ensure backwards compatibility from vLLM user perspective.
  • (Optional) add a test for backwards compatibility.

Feedback Period.

No response

CC List.

No response

Any Other Things.

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

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