A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 21:30 UTC
Use Xet high performance mode for Transformers v5 (#35098)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Feb 23, 2026 at 16:19 UTC
c4f38696f759099c9295a8d65a25d4e3171d2737
1 file changed
+12
-1
vllm/model_executor/model_loader/weight_utils.py
+12
-1
@@ -80,7 +80,18 @@ def enable_hf_transfer():
80
pass
81
82
83
-enable_hf_transfer()
83
+def enable_xet_high_performance():
84
+ """automatically activates xet high performance mode"""
85
+ if "HF_XET_HIGH_PERFORMANCE" not in os.environ:
86
+ huggingface_hub.constants.HF_XET_HIGH_PERFORMANCE = True
87
+
88
+
89
+if hasattr(huggingface_hub.constants, "HF_XET_HIGH_PERFORMANCE"):
90
+ # Transformers v5
91
+ enable_xet_high_performance()
92
+else:
93
+ # Transformers v4
94
+ enable_hf_transfer()
95
96
97
class DisabledTqdm(tqdm):