unstale

npm / @huggingface/transformers

@huggingface/transformers

What changed in @huggingface/transformers 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

2 breaking9 new APIs and options1 performance3 behavior and defaults10 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

@huggingface/transformers 425 changes

Breaking changes 2

  • For EmbeddingGemma 2, the feature-extraction pipeline returns normalized embeddings, making their dot product equal to cosine similarity.

    4.3.1release notes

  • Generation now always sets this parameter to 1.

    4.3.0release notes

New APIs and options 9

  • Exposes getSupportedDevices() under env.backends.onnx.

    4.3.2release notes

  • Adds support for LFM3 models.

    4.3.2release notes

  • Adds support for LFM3-VL models.

    4.3.2release notes

  • Adds support for EmbeddingGemma 2, a multimodal embedding model that maps text, images, video, and audio into a shared vector space.

    4.3.1release notes

  • Adds support for the DeepSeek-V4 model architecture.

    4.3.0release notes

  • Adds support for the HRM-Text model architecture.

    4.3.0release notes

  • Adds an experimental, dependency-free package for constraining generation to a JSON schema, JSON object, or regular expression.

    4.3.0release notes

  • Provides a logits processor for constraining generated output using a JSON schema, JSON object, or regular expression.

    4.3.0release notes

  • Adds support for the Zaya model architecture.

    4.3.0release notes

Performance 1

Behavior and default changes 3

  • Cross-Origin Storage now allows all origins.

    4.3.0release notes

  • Cross-Origin Storage now uses requestFileHandle().

    4.3.0release notes

  • Enables WebGPU support for Safari 26 and above.

    4.3.0release notes

Fixes and other changes 10

  • External data download failures no longer cause from_pretrained to hang.

    4.3.2release notes

  • Fixes handling of negative integer random seeds.

    4.3.2release notes

  • Browser cache writes are skipped for non-HTTP(S) resources.

    4.3.0release notes

  • Restores missing global exports.

    4.3.0release notes

  • Fixes the number of features in the processor.

    4.3.0release notes

  • Fixes token decoding for Moonshine ASR.

    4.3.0release notes

  • Fixes duplicate model file downloads when this callback is active.

    4.3.0release notes

  • Fixes toBlob() so it respects typed-array byte offsets and lengths.

    4.3.0release notes

  • Pins the WebGPU KV cache for Gemma3n and Gemma4 image-audio-text-to-text models.

    4.3.0release notes

  • Fixes progress callbacks for Whisper.

    4.3.0release notes