~/talk

Model-Changing Transforms With Torch.compile

slides:none on file

Proposes using torch.compile’s three outputs — graph, guards, and wrapper — as a transformable contract so quantization, distribution and other changes act on model, inputs and guards without rewriting models. Builds a prototype that uses Dynamo + Inductor, composes transforms for sharding/materialization (FSDP-style), state_dict load/save and quantization, and runs end-to-end by swapping the trace via convert_frame monkeypatch and a custom backend; the hacky ~500 lines of glue proves the idea works though it needs a safer API.

AI-written summary · about

  1. 0:00Introduction
  2. 1:45Removing friction in model optimization
  3. 3:56Source code to torch.compile
  4. 5:24Composable optimizations in PyTorch
  5. 7:10Challenges in transforming code
  6. 8:36torch.compile toolkit
  7. 10:22FSDP and materialization transforms
  8. 12:53Composable transforms for optimizations
  9. 13:35Internal mechanics of guards and wrappers
  10. 15:25Hacking frame conversion for model switching
  11. 17:14Implementation and demo results
  12. 19:49Benefits of model-changing transforms
  13. 20:52Future directions
~/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.