← Adobe Interview Insights

Adobe·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
May 2026

Summary

Adobe MLE interview focused heavily on the performance side of transformer systems, the kind of stuff that's easy to handwave but hard to actually explain under pressure. A lot of ground covered around GPU utilization and memory bottlenecks.

Questions Asked (4)

Q1

Why are transformer models considered memory-bound rather than compute-bound, and what does that mean for performance optimization?

System DesignTechnical Trade-offs
Author's notes

This is the kind of question where you think you know the answer and then halfway through realize you're describing it wrong.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining memory-bound vs compute-bound, then explain why transformers are memory-bound due to large parameter matrices and attention mechanisms that require frequent memory access. Finally, discuss optimization strategies like reducing memory footprint and improving memory bandwidth utilization.

Pro tip: Quantify the impact: mention that memory access can be orders of magnitude slower than compute, so optimizing memory often yields greater speedups than optimizing compute.

1. Define the concepts

Clearly explain what memory-bound and compute-bound mean, focusing on the ratio of memory access to arithmetic operations.

2. Analyze transformer architecture

Discuss how transformer components like self-attention and feed-forward layers involve large matrix multiplications and memory-heavy operations (e.g., storing keys/values).

3. Identify memory bottlenecks

Point out specific bottlenecks: loading weights, attention score matrices, and intermediate activations that dominate runtime.

4. Implications for optimization

Explain that performance optimization should focus on reducing memory traffic and improving data reuse, rather than just increasing FLOPs.

5. Concrete optimization techniques

List techniques like quantization, pruning, kernel fusion, and efficient attention mechanisms (e.g., FlashAttention) that address memory-bound nature.

Key Points to Mention

  • Arithmetic intensity and the roofline model
  • Memory bandwidth limitations in GPUs/TPUs
  • Attention mechanism's quadratic memory complexity
  • Weight and activation memory footprint
  • Techniques like quantization, pruning, and knowledge distillation
  • Efficient attention variants (e.g., sparse, linear, FlashAttention)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What is the cost of materializing the full attention matrix, and how does it affect memory usage at scale?

System DesignTechnical Trade-offs
Author's notes

Went okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by deriving the quadratic memory complexity of the full attention matrix, then explain how it scales with sequence length and batch size, and finally discuss practical implications and alternatives like flash attention or sparse attention. Use concrete numbers to illustrate the impact at scale.

Pro tip: Mention that while the full attention matrix is O(n^2) in memory, the actual cost also depends on the number of heads and batch size, so it's crucial to consider the full tensor shape. Also, highlight that memory bandwidth, not just capacity, often becomes the bottleneck in practice.

1. Derive the memory complexity

Explain that for a sequence of length n, the attention matrix has n x n entries per head, and with h heads and batch size b, the total memory is O(b * h * n^2).

2. Quantify with concrete numbers

Provide an example: for n=1024, b=32, h=16, and float32, the attention matrix alone would require 32*16*1024^2*4 bytes ≈ 2 GB, which is substantial.

3. Discuss scaling implications

Explain that as n grows, memory grows quadratically, making it infeasible for long sequences (e.g., n=8192 would require 128 GB for the same settings). This limits the maximum sequence length and batch size.

4. Mention alternatives and trade-offs

Discuss memory-efficient attention variants like FlashAttention, which avoid materializing the full matrix, or sparse/linear attention that reduce complexity, but may sacrifice accuracy or speed.

5. Relate to practical systems

Connect to real-world constraints: GPU memory limits, the need for gradient checkpointing, and how this affects model design and training/inference at scale.

Key Points to Mention

  • Quadratic memory complexity O(n^2) per attention head
  • Total memory includes batch size and number of heads: O(b * h * n^2)
  • Concrete example with numbers to illustrate the scale
  • Impact on maximum sequence length and batch size
  • Alternatives: FlashAttention, sparse attention, linear attention
  • Memory bandwidth and compute trade-offs in practice

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Can you explain HFU and MFU and how you'd use them to evaluate GPU efficiency?

System DesignTechnical Trade-offs
Author's notes

Blanked on the exact acronym expansion for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining HFU and MFU, then explain how they measure the gap between achieved and theoretical peak performance. Use a concrete example to illustrate how you'd calculate them and interpret the results to diagnose bottlenecks and guide optimizations.

Pro tip: Mention that MFU is typically much lower than HFU due to non-matmul operations, and that aiming for high MFU (e.g., >50% for large models) is a good target. Also note that these metrics are most useful when tracked over time and compared across configurations.

1. Define HFU and MFU

Explain that HFU (Hardware FLOP Utilization) measures achieved FLOPs as a percentage of the GPU's theoretical peak FLOPs, while MFU (Model FLOP Utilization) measures the FLOPs required for the model's forward/backward pass as a percentage of peak. Clarify that MFU excludes operations like data movement and activation functions.

2. Explain how to calculate them

Describe the formulas: HFU = (achieved FLOPs / peak FLOPs) * 100, and MFU = (model FLOPs / (peak FLOPs * time)) * 100. Emphasize that model FLOPs are typically estimated from the model architecture and batch size.

3. Interpret the metrics

Discuss what high or low values indicate. High HFU means the hardware is well-utilized for all floating-point operations, while high MFU means the model's core computations are efficient. Low MFU often points to bottlenecks in memory bandwidth, communication, or non-matmul operations.

4. Use them to evaluate GPU efficiency

Explain how you would use these metrics to assess and optimize training or inference. For example, if MFU is low, profile to identify bottlenecks (e.g., data loading, kernel inefficiencies) and apply optimizations like mixed precision, kernel fusion, or better parallelism.

5. Provide a concrete example

Walk through a simple scenario: e.g., training a transformer on an A100. Calculate model FLOPs, measure time, and compute MFU. Show how you'd interpret a 30% MFU and what steps you'd take to improve it.

Key Points to Mention

  • Definition of HFU and MFU, and the difference between them.
  • Theoretical peak FLOPs depend on GPU architecture (e.g., A100: 312 TFLOPS FP16).
  • Model FLOPs are estimated from operations like matrix multiplications in layers.
  • Common bottlenecks that reduce MFU: memory bandwidth, communication overhead, non-matmul ops.
  • Optimization techniques to improve MFU: mixed precision, kernel fusion, efficient data loading.
  • Importance of tracking MFU over time and comparing across hardware/software configurations.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How does kernel fusion help with GPU performance, and what role do CUDA graphs play in reducing overhead?

System DesignTechnical Trade-offs
Author's notes

Kernel launch overhead is one of those things that sounds minor until you're launching thousands of small ops per forward pass.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining kernel fusion and CUDA graphs in the context of GPU performance, then explain how fusion reduces kernel launch overhead and memory traffic, while CUDA graphs capture and replay sequences to minimize CPU overhead. Use a concrete example from ML workloads, such as fusing element-wise operations or using graphs for a training loop, to illustrate the trade-offs and benefits.

Pro tip: Quantify the impact when possible—mention that kernel fusion can reduce memory bandwidth usage by 2-3x for memory-bound ops, and CUDA graphs can cut launch overhead from microseconds to nanoseconds, which matters at scale. Also, note that fusion isn't always beneficial; it can increase register pressure and reduce occupancy, so profiling is key.

1. Define kernel fusion and its benefits

Explain that kernel fusion combines multiple GPU operations into a single kernel, reducing kernel launch overhead and global memory access. Highlight how it improves performance by keeping intermediate data in registers or shared memory.

2. Explain CUDA graphs and overhead reduction

Describe CUDA graphs as a way to capture a sequence of GPU operations (kernels, memcpys) into a graph and replay it with a single launch. This reduces CPU launch overhead and improves GPU utilization, especially for repetitive workloads.

3. Connect to ML workloads

Give an example from ML, such as fusing batch norm with ReLU, or using CUDA graphs to accelerate a training loop with many small kernels. Discuss how these techniques are used in frameworks like PyTorch (e.g., torch.cuda.graphs).

4. Discuss trade-offs and considerations

Mention that fusion can increase compilation time, register pressure, and reduce flexibility; CUDA graphs require static shapes and careful memory management. Emphasize the need for profiling to decide when to apply them.

5. Summarize impact and best practices

Conclude that both techniques are essential for high-performance ML, but should be applied judiciously based on workload characteristics. Recommend using profilers like Nsight Systems to measure overhead and guide optimizations.

Key Points to Mention

  • Kernel fusion reduces memory bandwidth bottlenecks by eliminating intermediate global memory writes/reads.
  • CUDA graphs minimize CPU launch overhead by batching kernel launches into a single graph launch.
  • Fusion can improve arithmetic intensity and enable better use of on-chip memory (registers/shared memory).
  • CUDA graphs are particularly effective for static, repetitive workloads like training loops or inference with fixed batch sizes.
  • Trade-offs: fusion may increase register pressure and reduce occupancy; CUDA graphs require static shapes and can complicate debugging.
  • Tools like NVIDIA Nsight Systems and PyTorch's profiler can help identify when these optimizations are beneficial.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.