BASE

Transformers

Transformers

AI / ML development tool · Free

A library for loading and using models for text, images, and other data: it provides pipelines, tokenizers, and training tools.

Also known as: huggingface/transformers; huggingface-transformers

Resource illustration: Transformers

Open resource ↗

What you can use for free

A local code pipeline under Apache-2.0; rights for the selected models are checked separately.

Paid features and costs

Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

Access and limitations

A local code pipeline under Apache-2.0; rights for the selected models are checked separately. Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

Use cases

  • Connect a model to the application's data processing
  • Process test inputs and connect outputs to an application feature

Example workflow

A possible workflow; this is not a report of hands-on testing.

Connect a model to the application's data processing.

Before you start

  • Test documents or tasks, and a quality criterion.
  • Models, a runtime, and a computing budget.

Steps

  1. Choose a task pipeline, tokenizer, and licensed model.
  2. Process test inputs and connect outputs to an application feature.
  3. Connect the workflow to the application and make errors observable.

Check your result

  • Check the result against reference examples and invalid inputs.
  • Inference costs, model rights, and data handling have been established.

Choosing Transformers

Connect a model to the application's data processing

Choose this when

  • Connect a model to the application's data processing
  • Process test inputs and connect outputs to an application feature

Requirements

  • The current README specifies Python 3.10+ and PyTorch 2.5+ for the demonstrated installation method and recommends a virtual environment.

Things to consider

  • Costs and limits of free use: Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.
  • Terms of use: Apache-2.0 for the code; third-party components retain their own terms.
  • The library is not intended as a collection of arbitrary neural network building blocks. Its training is oriented toward Transformers models in PyTorch; examples may need adaptation, and the source branch may contain unstable changes.

Frequently asked questions

What can you use for free in Transformers?

A local code pipeline under Apache-2.0; rights for the selected models are checked separately.

What additional costs might arise with Transformers?

Model APIs, managed services, and computing resources are paid for separately; the code license does not license all model weights.

What terms of use matter for Transformers?

Apache-2.0 for the code; third-party components retain their own terms.

How do you get started with Transformers?

Choose a task pipeline, tokenizer, and licensed model. Process test inputs and connect outputs to an application feature. Connect the workflow to the application and make errors observable.

What does a Transformers pipeline do?

A pipeline combines preprocessing, running the selected model, and processing the result. The README shows text, speech recognition, and image question-answering tasks; the model is downloaded and cached.

License

Apache-2.0 for the code; third-party components retain their own terms.

Apache 2.0 — permissive license with patent terms

You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.

License terms

Technologies and topics

  • Transformers
  • ml
  • Development

Sources

Other resources