transformers
by huggingface
Transformers is a Python library from Hugging Face that provides ready-made definitions of machine learning models for text, images, audio, video and combined inputs. It is used to run pretrained models, or to train and fine-tune them, with a few lines of code.
- Stars
- 168.2k
- Licence
- Apache-2.0
- Runs on
- Your computer
- Setup
- Technical
- Language
- Python
- Age
- 2919 days
What you can do with it
- Generate text or chat with open language models such as Qwen or Llama using a short Python script
- Transcribe speech to text with models such as Whisper
- Classify images or fine-tune a pretrained model on your own data
Make money with it
A freelancer could offer custom AI services, such as transcription pipelines or fine-tuned classifiers, built on open models for local clients.
An idea, not financial advice. Check the licence before charging for anything built on it.
Ways a business could use it
- Add transcription, text classification or summarisation to your own product using open models, avoiding per-request fees from paid AI services
- Fine-tune a small open model on your own business data to build a custom assistant or document-sorting tool
Can you use it commercially?
Free to use, change and sell, including in paid products. Keep the copyright notice.
Not legal advice. Read the project's licence file before building a product on it.
Getting it running
Install it with pip or uv (for example pip install "transformers[torch]") inside a Python 3.11+ virtual environment with PyTorch 2.6+.
Follow the official instructions in the project README.
Things to check
- Small models run on a CPU, but larger models need a capable GPU and plenty of memory
- Some models, such as Llama, are gated and have their own licence terms that differ from this library's Apache-2.0 licence
- Requires Python programming skills; it is a library, not a finished app
Checked 26 Oct 2026. Summary drafted by AI from the project's README.