Introduction to Sequence Modeling with Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Author: Kämäräinen, Joni-Kristian
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909514202087424
author Kämäräinen, Joni-Kristian
author_facet Kämäräinen, Joni-Kristian
contents Understanding the transformer architecture and its workings is essential for machine learning (ML) engineers. However, truly understanding the transformer architecture can be demanding, even if you have a solid background in machine learning or deep learning. The main working horse is attention, which yields to the transformer encoder-decoder structure. However, putting attention aside leaves several programming components that are easy to implement but whose role for the whole is unclear. These components are 'tokenization', 'embedding' ('un-embedding'), 'masking', 'positional encoding', and 'padding'. The focus of this work is on understanding them. To keep things simple, the understanding is built incrementally by adding components one by one, and after each step investigating what is doable and what is undoable with the current model. Simple sequences of zeros (0) and ones (1) are used to study the workings of each step.
format Preprint
id arxiv_https___arxiv_org_abs_2502_19597
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Introduction to Sequence Modeling with Transformers
Kämäräinen, Joni-Kristian
Machine Learning
Understanding the transformer architecture and its workings is essential for machine learning (ML) engineers. However, truly understanding the transformer architecture can be demanding, even if you have a solid background in machine learning or deep learning. The main working horse is attention, which yields to the transformer encoder-decoder structure. However, putting attention aside leaves several programming components that are easy to implement but whose role for the whole is unclear. These components are 'tokenization', 'embedding' ('un-embedding'), 'masking', 'positional encoding', and 'padding'. The focus of this work is on understanding them. To keep things simple, the understanding is built incrementally by adding components one by one, and after each step investigating what is doable and what is undoable with the current model. Simple sequences of zeros (0) and ones (1) are used to study the workings of each step.
title Introduction to Sequence Modeling with Transformers
topic Machine Learning
url https://arxiv.org/abs/2502.19597