Use Xet high performance mode for Transformers v5#35098
Use Xet high performance mode for Transformers v5#35098vllm-bot merged 2 commits intovllm-project:mainfrom
Conversation
…s v5 installed Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request updates the logic for enabling high-performance download modes in huggingface_hub to support both Transformers v4 and v5. The change correctly detects the huggingface_hub version and enables either Xet high-performance mode (for v5) or hf_transfer (for v4). However, the implementation for enabling Xet mode unconditionally sets HF_XET_HIGH_PERFORMANCE to True, which overrides any user-defined environment variable setting. I've suggested a change to respect the user's environment configuration, making it consistent with the existing logic for hf_transfer.
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
In v4 we would force For v5 I think this is safe because all it does is boost the number of CPU cores used in order to saturate network/disk bandwidth while downloading models. (docs). Since it doesn't require an extra dependency and can still be disabled by users who really don't want it, it should be ok. |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Andrii Skliar <askliar@nvidia.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Enable high performance mode for Xet when Transformers v5 is installed, falling back to
hf_transferfor Transformers v4. This change optimizes performance based on the installed version of the Transformers library.