Blogs / What Assisted Generation Is and What Its Two Models Do

What Assisted Generation Is and What Its Two Models Do

What a Hugging Face post says assisted generation is also known as, what its core idea is and what the assistant and target models do each cycle.

  • Learning
  • 1 min read

For: Learners who know what a large language model is.

What assisted generation is

Assisted generation, also known as speculative decoding, is a very popular and practical approach for accelerating LLM inference without accuracy loss.[1]

The core idea

The core idea behind assisted generation involves using a pair of models, referred to as the target and assistant models.[1]

Assisted generation,also known asspeculative decodingaccelerates inferencewithout accuracy lossA target model and anassistant modelthe core pairEach cyclethe assistant generatestokens, the target verifiesthem in one forward passusesworks in
What happens in each cycle?

What each cycle does

Each cycle, the assistant model generates a sequence of tokens autoregressively, one at a time.[1]

The target model then verifies all the assistant tokens in the sequence in a single forward pass.[1]

Sources

  1. Universal Assisted Generation (huggingface.co · checked )

More articles