TechSchool
Home / Interview questions / AI engineering / NVIDIA

NVIDIA AI Engineer Interview Questions

Short answers to 13 AI engineering questions asked at NVIDIA.

Questions and answers (13)

Answers are written in plain English and reviewed for technical accuracy. Each answer states the point first, then the reason.

1. Here's a CUDA kernel that's 10x slower than expected. Without running it, what are the usual suspects, and how do you confirm each?

The usual suspects are low occupancy, uncoalesced memory access, and shared memory bank conflicts. Check occupancy first with the CUDA occupancy calculator or Nsight Compute. Check coalescing by reading the access pattern in the source. Check bank conflicts by inspecting the shared memory index stride.

2. Implement the block manager for a paged KV cache: allocate, append, free, and copy-on-write prefix sharing.

The block manager maps logical token positions to physical blocks and keeps a reference count per block. Append writes to the last block and allocates a new block when the last block is full. Free decrements the reference count and returns the block to the pool at zero. Copy-on-write copies a shared block before a write when the reference count is above one.

def append(seq, tok):
    if not seq.blocks or seq.blocks[-1].full:
        seq.blocks.append(pool.alloc())
    seq.blocks[-1].write(seq.len % B, tok); seq.len += 1
def cow(seq, i):
    b = seq.blocks[i]
    if b.refs > 1: seq.blocks[i] = b.copy(); b.refs -= 1

3. A model runs fine in FP32 but produces garbage after conversion to FP16. Debug it.

The most common cause is overflow in the FP16 range, so check for inf and NaN values in activations and weights. Scale the loss or use mixed precision with a master FP32 copy of the weights. Clamp or normalize large inputs before the first layer. Also check that the tokenizer and the embedding table use the same dtype.

4. Explain strategies to combat overfitting in tree-based classification models.

Limit tree depth and minimum samples per leaf to reduce variance. Use row and column subsampling, as in random forests, to decorrelate the trees. Add L1 or L2 penalties on leaf values and prune weak splits. Use cross-validation to tune these settings and to detect overfitting early.

5. Summarize the differences and benefits of the Adam optimizer compared with other methods for neural-network image classification.

Adam adapts a separate step size per parameter, so it needs little tuning on image classification tasks. SGD with momentum can generalize slightly better on some vision benchmarks, but it needs a learning schedule. AdamW decouples weight decay and often gives the best result with little tuning. Adam costs about two extra state tensors per parameter, which raises memory use.

6. A network confuses pugs and pit bulls and some training labels are wrong. How do you modify the model and the data?

Clean the labels first with a review pass and a confident-learning or cross-validation filter. Add class-balanced sampling and stronger augmentation for the two breeds. Fine-tune with LoRA on the last layers and use a loss that tolerates label noise, such as symmetric cross-entropy. Check the confusion matrix on a clean holdout set after each change.

7. How do you evaluate a clustering model's effectiveness without pre-labelled groups?

Use internal indices such as the silhouette score, the Davies-Bouldin index, and the Calinski-Harabasz index. Compare several cluster counts and pick the stable region. Check stability by re-running on bootstrap samples and measuring label agreement. Visualize with PCA or t-SNE and confirm that the clusters match domain sense.

8. You want to serve a 70B-parameter model on a single 80 GB GPU. Walk me through whether it fits and what single-stream tokens/sec you'd expect.

It fits only in low precision, because 70B parameters need about 140 GB in FP16. Use 4-bit weight quantization, which needs about 35 GB, and leave room for the KV cache and activations. A single stream is memory-bound, so expect roughly 10 to 30 tokens/sec on an 80 GB GPU. Measure the achieved memory bandwidth and divide by the bytes read per token.

9. What does TensorRT / TensorRT-LLM actually do to a model to make it faster, and when will it not help?

TensorRT-LLM compiles the model graph into fused GPU kernels and adds runtime optimizations such as KV cache management and paged attention. It fuses layers, picks fast kernels, and can quantize weights to lower precision. The speedup is often 2x to 4x for inference. It will not help when the model is memory-bound by weights that do not fit, or when the batch is tiny and launch overhead dominates.

10. Design the parallelism strategy for serving a 405B-parameter dense model. TP, PP, EP: what goes where and why?

Use tensor parallelism (TP) inside a node, pipeline parallelism (PP) across nodes, and expert parallelism (EP) only if the model is sparse. A 405B dense model needs about 810 GB in FP16, so it must span many GPUs. Keep TP at 8 within a node to limit all-reduce cost, and use PP to cross node boundaries. EP does not apply to a dense model because there are no experts to route.

11. Design a podcast search engine with transcript indexing. / Design a recommendation algorithm for type-ahead search.

Build the podcast search engine in two stages: index transcripts with an inverted index and add a vector index for semantic recall. Split transcripts into short passages, store timestamps, and rank with BM25 plus embedding similarity. For type-ahead, use a prefix trie over query logs and rank suggestions by popularity and recency.

12. A customer's LLM chatbot on 8 GPUs is “too slow and too expensive.” You have one week with them. What do you do?

Profile first, then fix the top bottleneck. Measure tokens per second, GPU utilization, KV cache memory, and batch size on the 8 GPUs. Common wins are continuous batching, paged attention, a smaller quantized model, and prefix caching. Set a clear target such as 2x throughput at the same latency, and report the cost per 1M tokens before and after.

13. Describe a time you dealt with conflicting priorities or stakeholder feedback. What would your current manager say about you?

Two teams once asked for conflicting model behavior in the same release. I wrote a short tradeoff note and let the owners pick with data. I listed the cost, the latency impact, and the user risk for each option. My current manager says I stay calm, ask good questions, and ship on time.

Related lessons
Ai agent intro Ai agent function calling Agent architecture Ai rag Retrieval augmented generation Vector database