</>PackageGraphPackageGraph

transformers

PyPIv5.16.1

Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

Adopt with care

transformers is usable, with caveats. Pulls in 29 transitive packages, about 38 MB installed (at least — some of the tree is still being crawled).

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 14 days ago. 50 releases in the last 2 years.

  • CWeight: grade C, Fair — worth a look.

    Pulls in 29 transitive packages, about 38 MB installed (at least — some of the tree is still being crawled).

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    Apache 2.0 License — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding transformers to a project.

9
Direct dependencies

Runtime packages this one declares itself.

29
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

38 MB
Install size

Unpacked size of this package plus its entire runtime tree.

4
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Licenses in the dependency tree

Apache-2.0BSD-3-ClauseMITMPL-2.0MPL-2.0 AND MIT

Every license you inherit by installing transformers, not just its own. Check this before a legal review, not after.

Compatibility

Python
python >=3.10.0

Quick start

A usage example from the transformers README.

from transformers import pipeline

pipeline = pipeline(task="text-generation", model="Qwen/Qwen2.5-1.5B")
pipeline("the secret to baking a really good cake is ")
[{'generated_text': 'the secret to baking a really good cake is 1) to use the right ingredients and 2) to follow the recipe exactly. the recipe for the cake is as follows: 1 cup of sugar, 1 cup of flour, 1 cup of milk, 1 cup of butter, 1 cup of eggs, 1 cup of chocolate chips. if you want to make 2 cakes, how much sugar do you need? To make 2 cakes, you will need 2 cups of sugar.'}]

Dependencies

Declared by transformers v5.16.1. Runtime dependencies are installed with the package; dev dependencies are not.

Relationship graph

Dependencies (left) and dependents (right) of transformers.

Release history

50 releases in the last two years, typically about 6 days apart.

Recent versions of transformers
VersionPublishedSizeLicense
5.16.1latest14 days ago12 MBApache 2.0 License
5.16.014 days ago11 MBApache 2.0 License
5.15.121 days ago11 MBApache 2.0 License
5.15.01 month ago11 MBApache 2.0 License
5.14.11 month ago11 MBApache 2.0 License
5.14.01 month ago11 MBApache 2.0 License
5.13.12 months ago11 MBApache 2.0 License
5.13.02 months ago11 MBApache 2.0 License
5.10.42 months ago10 MBApache 2.0 License
5.12.12 months ago11 MBApache 2.0 License
5.12.02 months ago11 MBApache 2.0 License
5.11.03 months ago11 MBApache 2.0 License
5.10.23 months ago10 MBApache 2.0 License
5.10.13 months ago10 MBApache 2.0 License
5.10.03 months ago10 MBApache 2.0 License

Overview

transformers is an PyPI package that transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. The latest version is 5.16.1, released under the Apache 2.0 License license.

Who should use it

Teams working in the PyPI ecosystem who need transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your PyPI stack.

Pros

  • Clear open-source license (Apache 2.0 License).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use transformers?

transformers is usable, with caveats. Pulls in 29 transitive packages, about 38 MB installed (at least — some of the tree is still being crawled).

How do I install transformers?

Run `pip install transformers` to add transformers to your PyPI project.

How many dependencies does transformers have?

transformers declares 9 direct dependencies and pulls in 29 packages in total once its runtime tree is resolved totalling about 38 MB on disk.

What license is transformers released under?

transformers is distributed under the Apache 2.0 License license. Its dependency tree also includes: Apache-2.0, BSD-3-Clause, MIT, MPL-2.0, MPL-2.0 AND MIT.

Is transformers still maintained?

The most recent release of transformers (v5.16.1) was published 14 days ago.