~/talk

Parallel PyTorch Inference with Python Free-Threading

Talkat PyData London 2025 · on Saturday, 2025-06-07· at 10:20· Hardwick Hub· [large-language-models]
slides:none on file

A concrete claim: building and running a Python 3.13-T free-threaded build lets multiple Python threads run PyTorch inference truly in parallel. The demo trains a 124M-parameter GPT-2 from scratch and shows a threaded image-decoding benchmark where threads scale while processes saturate because of CUDA context switching. A threaded HTTP server for token-by-token LLM serving yields much higher throughput and lower latency overall, though single-thread performance can be slightly slower and many C/C++ bindings must be rebuilt and tested.

AI-written summary · about

  1. 0:00Introduction
  2. 1:07Python’s GIL
  3. 5:24Free-threading removal
  4. 9:25Free-threaded ecosystem challenges
  5. 15:52Parallel data processing
  6. 22:58LLM inference with HTTP server
  7. 31:59Resources
~/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.