The post has been translated automatically. Original language: Russian
On September 17, 2026, version 1.32.0 of the huggingface_hub library was released, a client through which models and datasets from Hugging Face are downloaded and which is pulled by transformers, diffusers and dozens of other packages. The release includes a shared cache of files between repositories, a series of security edits after internal audit, and noticeably accelerated import of the package itself.
One file on disk instead of a copy in each repository
The cache has learned how to deduplicate files downloaded via hf_xet. Such a file is stored once in a shared blob directory under a name derived from its hash, and each repository that needs it receives a relative symbolic link — bytes do not travel over the network and extra space is not wasted. This works both between different repositories and after deleting the one that downloaded the file first.
The layout of the snapshots inside the repository has not changed, the old clients work as before, and if they fail, the library silently returns to a regular copy. The mechanism of the environment variable HF_HUB_DISABLE_SHARED_BLOBS with the value 1 is disabled. Next to the shared file is the manifest of the blobs referring to it: the cache cleanup command is checked against it.
Sandbox: nine edits after internal audit
The analysis of the Sandbox API resulted in a series of nine changes. The sandboxes in the pool have stopped using a shared key for the host — each receives its own token. Before sending credentials to the pool host, the client checks the entire pool: initiator, namespace, image, resource configuration, command, and address. The server binary of the sandbox is fixed by digest and is checked before starting as the first process.
Minor things have also been corrected: secrets no longer get into command-line arguments, background processes are addressed by an identifier from the server, and the volume of command transfers and outputs is limited.
Stricter on untrusted data
The deserialization of torch checkpoints has been reinforced by eleven vulnerability reports. Loading the model state from a file by default works in safe mode through the safetensors loader, the path through pickle by default enables the weights_only mode, and unsafe combinations of parameters give an obvious error instead of a silent continuation. The ".." segment is now rejected anywhere in the path inside the repository, not just at the beginning, and the repository ID is checked strictly as in the documentation: ASCII characters only.
Importing and working with the cache
The package has become noticeably faster to import: the utils module has been made lazy, heavy HfApi implementation imports and optional dependencies (Torch, TensorBoard, NumPy, FastAPI, Starlette) are postponed to use, console client commands are lazily registered. According to the median measurements on Python 3.10, the import of the entire package contents accelerated from 2.36 to 0.39 seconds, peak memory consumption dropped from 626.8 to 49.6 MiB, and version output from 0.37 to 0.17 seconds.
The cache deletion command takes the address of a separate file: you can throw away one GGUF quantization.
What does this mean in practice?
The best part is the shared cache: on assembly agents and GPU hosts, where several projects are pulling the same weights, the savings in space and traffic will be immediately noticeable. But the mechanism is built on symbolic links: if the cache lies where links are undesirable, disable it with a variable in advance, and not on a falling task.
The main possible problem with the update is the new defaults when loading checkpoints: pipelines that read old balance files via pickle will receive an obvious error. The behavior is correct, but run the loading of the models on the stand before the prod. There is also a path check: if the publication path is concatenated and ".." falls in the middle, the operation will be rejected.
Speeding up imports is important for those who pull the library out of short tasks: console utilities, queue handlers, on-demand functions. For a process that lives for seconds, a drop in peak memory consumption by an order of magnitude means more than the fractions of a second themselves.
The draft text was prepared with the participation of AI, the facts were checked against the original source — official notes for the release of huggingface_hub 1.32.0 on GitHub.
17 сентября 2026 года вышла версия 1.32.0 библиотеки huggingface_hub — клиента, через который скачиваются модели и датасеты с Hugging Face и который тянут за собой transformers, diffusers и десятки других пакетов. В выпуске общий кеш файлов между репозиториями, серия правок безопасности после внутреннего аудита и заметно ускоренный импорт самого пакета.
Один файл на диске вместо копии в каждом репозитории
Кеш научился дедуплицировать файлы, скачанные через hf_xet. Такой файл хранится один раз в общем каталоге блобов под именем, производным от его хеша, а каждый репозиторий, которому он нужен, получает относительную символическую ссылку — байты по сети не идут и лишнее место не тратится. Работает это и между разными репозиториями, и после удаления того, который скачал файл первым.
Раскладка снимков внутри репозитория не изменилась, старые клиенты работают как раньше, а при неудаче библиотека молча возвращается к обычной копии. Отключается механизм переменной окружения HF_HUB_DISABLE_SHARED_BLOBS со значением 1. Рядом с общим файлом лежит манифест ссылающихся на него блобов: команда очистки кеша сверяется с ним.
Песочница: девять правок после внутреннего аудита
Разбор Sandbox API вылился в серию из девяти изменений. Песочницы в пуле перестали использовать общий для хоста ключ — каждая получает собственный токен. Перед отправкой учётных данных хосту пула клиент проверяет его целиком: инициатора, пространство имён, образ, конфигурацию ресурсов, команду и адрес. Серверный бинарник песочницы закреплён по дайджесту и проверяется до запуска в роли первого процесса.
Поправили и мелочи: секреты больше не попадают в аргументы командной строки, фоновые процессы адресуются по идентификатору от сервера, объём передач и вывода команд ограничен.
Строже к недоверенным данным
Десериализация torch-чекпоинтов укреплена по одиннадцати сообщениям об уязвимостях. Загрузка состояния модели из файла по умолчанию работает в безопасном режиме через загрузчик safetensors, путь через pickle по умолчанию включает режим weights_only, а небезопасные сочетания параметров дают явную ошибку вместо тихого продолжения. Сегмент «..» теперь отклоняется в любом месте пути внутри репозитория, а не только в начале, а идентификатор репозитория проверяется строго как в документации: только ASCII-символы.
Импорт и работа с кешем
Пакет стал заметно быстрее импортироваться: модуль utils сделан ленивым, тяжёлые импорты реализации HfApi и необязательные зависимости (Torch, TensorBoard, NumPy, FastAPI, Starlette) откладываются до использования, команды консольного клиента регистрируются лениво. По медианам замеров на Python 3.10 импорт всего содержимого пакета ускорился с 2,36 до 0,39 секунды, пиковое потребление памяти упало с 626,8 до 49,6 МиБ, вывод версии — с 0,37 до 0,17 секунды.
Команда удаления кеша принимает адрес отдельного файла: можно выбросить одну GGUF-квантизацию.
Что это значит на практике
Самое приятное — общий кеш: на сборочных агентах и GPU-хостах, где несколько проектов тянут одни и те же веса, экономия места и трафика будет сразу ощутимой. Но механизм построен на символических ссылках: если кеш лежит там, где ссылки нежелательны, отключите его переменной заранее, а не на падающей задаче.
Главная вероятная поломка при обновлении — новые умолчания при загрузке чекпоинтов: пайплайны, которые читают старые файлы весов через pickle, получат явную ошибку. Поведение правильное, но прогоните загрузку моделей на стенде до прода. Туда же проверка путей: если путь публикации собирается конкатенацией и «..» попадает в середину, операция будет отклонена.
Ускорение импорта важно тем, кто дёргает библиотеку из коротких задач: консольных утилит, обработчиков очередей, функций по запросу. Для процесса, живущего секунды, падение пикового потребления памяти на порядок значит больше, чем сами доли секунды.
Черновик текста подготовлен с участием ИИ, факты сверены с первоисточником — официальные заметки к выпуску huggingface_hub 1.32.0 на GitHub.