~/lightning

Lightning Talk: The Fastest Path to Production: PyTorch Inference in Python

Lightningat PyTorch Conference 2023 · 2023-10-16..10-17· [machine-learning]
slides:none on file

Describes a concrete path to run PyTorch in production using torch.compile with new APIs to cache compilation artifacts across devices and python bindings for AOT Inductor, plus using torchserve with backend Python workers. Recommends dynamic batching (example: batch=4, wait=30ms), CUDA graphs to cut overhead, and py‑profiler to spot many tiny GPU kernels. Warns zipping LLaMA‑7B takes 24 min (unzip 3 min) and that mmap + meta‑device init yields ~10x faster load; CPU thread migration can cause 5–10x slowdowns, fixed by core affinity and tuned torch.set_num_threads.

AI-written summary · about

  1. 0:00Fast PyTorch inference intro
  2. 1:46TorchServe vs FastAPI
  3. 3:28Dynamic batching optimization
  4. 5:12Debugging slow inference
  5. 6:35Latency reduction with TorchCompile
  6. 7:38Caching and warm starts
  7. 8:40Faster model loading
  8. 9:24CPU thread affinity
  9. 10:48Cost savings from optimizations
  10. 11:49TorchServe for production
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.