Scale and Serve JAX Models on NVIDIA GPUs

  1. What is the best first check before debugging JAX GPU performance?

  2. If jax.default_backend() prints cpu and jax.devices() shows only a CpuDevice, what is the most likely cause?

  3. Why can the first call to a jax.jit function be much slower than later calls?

  4. What is a common cause of accidental recompilation in JAX?

  5. Inside a @jax.jit function, why does if x > 0: on a traced array raise an error?

  6. Why must you call block_until_ready() before stopping a timer around GPU work?

  7. Calling float(loss) every step inside a training loop can slow it down because it:

  8. Why does the training loop reshape data into fixed-size batches and drop the partial final batch?

  9. In a JAX training step, how are parameters updated?

  10. What does setting implementation="cudnn" in jax.nn.dot_product_attention require?

  11. Why does naive attention use more memory than a fused cuDNN kernel on long sequences?

  12. In data-parallel training with JAX, what actually creates the parallelism?

  13. What does PartitionSpec('data', None) mean for a 2-D array on a mesh with a 'data' axis?

  14. How does the Lesson 7 transformer get causal (backward-only) attention?

  15. When saving an NNX model with Orbax StandardCheckpointer, what is saved and what is not?

  16. What problem does AOT compilation (lower()compile()) solve for serving?

  17. Which serving path produces a portable artifact that runs in any JAX runtime without the original model code?