transformer
A transformer is a neural network model that processes sequences using self-attention to capture long-range dependencies without recurrence or convolutions.
Its transformer architecture stacks attention and feed-forward layers with residual connections, layer normalization, and positional encodings. Models such as BERT and GPT are transformers built on that design.
Transformers form the foundation of modern language and vision models because of efficient parallel training, strong scaling behavior, and adaptable decoding for tasks such as classification, translation, and text or image generation.
Related Resources
Tutorial
Hugging Face Transformers: Leverage Open-Source AI in Python
As the AI boom continues, the Hugging Face platform stands out as the leading open-source model hub. In this tutorial, you'll get hands-on experience with Hugging Face and the Transformers library in Python.
For additional information on related topics, take a look at the following resources:
- Building a Neural Network & Making Predictions With Python AI (Course)
- How to Use Ollama to Run Large Language Models Locally (Tutorial)
- Python AI: How to Build a Neural Network & Make Predictions (Tutorial)
- PyTorch vs TensorFlow for Your Python Deep Learning Project (Tutorial)
- Hugging Face Transformers (Quiz)
- How to Use Ollama to Run Large Language Models Locally (Quiz)
- Python Deep Learning: PyTorch vs Tensorflow (Course)
By Leodanis Pozo Ramos • Updated Sept. 1, 2026