diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6687ebd31ea..742c0d71525 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -43,6 +43,7 @@ Changelog - Update HuggingFace checkpoint export to use name-based tied-weight deduplication instead of the previous address-based approach. The address-based deduplication could incorrectly drop an untied weight that happened to share memory with a tied one, producing an incomplete checkpoint (observed as a false positive on MiniMax-M2.7). - Fix EAGLE-3 training with context parallelism (``--cp_size > 1`` in ``examples/speculative_decoding``), which failed to start on ``accelerate >= 1.13`` and then raised ``got mixed torch.Tensor and DTensor``. - Polygraphy minimum dependency upgraded to ``0.53.4`` to solve ONNX AutoCast failures when marking optional graph outputs. +- Fix ``ModuleNotFoundError: No module named 'huggingface_hub'`` when importing ``modelopt.torch`` without the optional ``hf`` extra. Install the ``hf`` extra to use Hugging Face checkpointing. Affects 0.44 through 0.46. 0.46 (2026-08-17) ^^^^^^^^^^^^^^^^^ diff --git a/modelopt/torch/opt/plugins/__init__.py b/modelopt/torch/opt/plugins/__init__.py index b86ef1eb7f3..bd74fd76a97 100644 --- a/modelopt/torch/opt/plugins/__init__.py +++ b/modelopt/torch/opt/plugins/__init__.py @@ -17,7 +17,8 @@ from modelopt.torch.utils import import_plugin -from .huggingface import * +with import_plugin("huggingface_hub"): + from .huggingface import * with import_plugin("megatron core dist checkpointing"): from .mcore_dist_checkpointing import *