AI engineering glossary · Transformers LLM architecture

What is sequence length?

Sequence length (also called Sequence size): The number of tokens in a single input the model processes at once, including the prompt and, when generating, the output so far. Compute and memory for attention grow with it, and each model has a maximum it can handle.

Level: beginnerTopic: Transformers LLM architecture

Sequence length: an example

A 3-page document of about 1,500 words is roughly 2,000 tokens, so the sequence length is about 2,000.

Related terms

More Transformers LLM architecture terms

Where you learn it

Sequence length is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.