Skip to content

fix: upgrade Transformers to prevent unconsented module downloads - #23

Merged
shanaiabuggy merged 1 commit into
mainfrom
sbuggy/fix-transformers-consent
Sep 21, 2026
Merged

shanaiabuggy merged 1 commit into
mainfrom
sbuggy/fix-transformers-consent

Conversation

@shanaiabuggy

Copy link
Copy Markdown
Contributor

Summary

  • Bump the optional local-embedding dependency from transformers==5.16.1 to transformers==5.17.0 and refresh its lockfile artifacts.
  • Address the reported unauthorized remote-module cache write in GenerationMixin.load_custom_generate(): 5.17.0 checks remote-code consent before downloading the module.
  • Regenerate the third-party inventory and preserved license notices for the new version. No new dependencies or license types are introduced.

Upstream fix

huggingface/transformers#48620

Although the supplied advisory lists affected versions only through 5.8.1, inspection of 5.16.1 shows the download still occurs before the consent check. The 5.17.0 implementation contains the reordered consent check, and its behavior was verified locally.

Validation

  • pytest: 321 passed (two existing LangSmith deprecation warnings).
  • Ruff lint and formatting, ty, and copyright-header checks passed.
  • Generated license freshness check passed for all 121 inventory entries.
  • Both workspace packages built successfully; license contents matched in wheels, source distributions, and wheels rebuilt from source distributions.
  • Installed the optional local-embedding dependencies and verified AutoModel/AutoTokenizer imports. A mocked remote-file existence check with trust_remote_code=False raised the expected error without calling get_cached_module_file.
  • git diff --check passed.

No model weights were downloaded and full embedding inference was not exercised.

@shanaiabuggy
shanaiabuggy merged commit fba7006 into main Sep 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants