AWS Certified AI Practitioner AIF-C01 Practice Question
Why can a transformer-based large language model usually perform inference more quickly on modern GPUs than a recurrent neural network (RNN) when both must analyze an equally long text sequence?
Transformers cache the entire model vocabulary in GPU memory, so no additional computation is needed during inference.
Transformers rely mainly on convolutional layers, which require fewer floating-point operations than matrix multiplications.
Transformers omit positional encodings, reducing overhead compared with architectures that track token positions.
Transformers evaluate all tokens concurrently through self-attention, allowing the workload to be parallelized on the GPU.
Transformers apply a self-attention mechanism to every token in the sequence at the same time. Because no hidden state must be passed from one time step to the next, all token-level computations can be executed in parallel across GPU cores. RNNs, by contrast, are inherently sequential-each step depends on the result of the previous one-so they cannot fully exploit parallel hardware and run more slowly. Holding the entire vocabulary in memory, using convolutional layers, or omitting positional information does not remove the sequential dependency that limits RNN speed, and none of those points explain the transformer's primary performance advantage.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is self-attention in a transformer model?
Open an interactive chat with Bash
Why can GPUs parallelize transformer models efficiently?
Open an interactive chat with Bash
What is the limitation of RNNs compared to transformers?
Open an interactive chat with Bash
What is the self-attention mechanism in transformers?
Open an interactive chat with Bash
Why do RNNs depend on sequential processing for inference?
Open an interactive chat with Bash
How do GPUs optimize transformer-based workloads?
Open an interactive chat with Bash
AWS Certified AI Practitioner AIF-C01
Fundamentals of Generative AI
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .