PyTorch

@pytorch

PyTorch and the broader machine-learning ecosystem

Pick a date

The Wire ยท Showcase

TORCHRL CHECKPOINTS NOW MEMORY-MAPPED BY DEFAULT, FIXING WINDOWS FILE-LOCK CORRUPTION

By RepoJournal ยท Filed ยท About PyTorch

TorchRL's trainer checkpoint loader was materializing entire files into non-evictable RAM and aliasing external state into live components, causing permission errors on Windows and potential corruption if checkpoints were rewritten externally.

The fix lands in two coordinated PRs: Trainer.load_from_file now defaults to torch.load(mmap=True) [1], slashing checkpoint load memory footprint, while all load_state_dict implementations now copy tensors instead of aliasing them [2], breaking the pin on checkpoint file mappings that was blocking file overwrites. The mmap change alone cuts resident memory during restore, critical for large checkpoints that previously had to materialize fully before distribution to components. Meanwhile, doc build times got slashed from 78 to under 40 minutes by introducing MujocoEnv.render_every to skip rendering on frames the VideoRecorder drops anyway [3]. Device precedence rules that were duplicated across four different collector and inference server implementations got unified into a single shared resolution function [4], eliminating the manual replication burden on future changes. ExecuTorch shipped nested superscale quantization for CUDA weights, bringing int4 and int6 down to fp16 metadata packed in 256-weight superblocks [5], and added genuine INT5 support with the same quantization scheme [6]. WebGPU shader codegen now generates vec1/vec4 variants and is fp16-ready [7], while PruneEmptyTensorsPass was hardened against data-dependent shapes that were crashing export [8].

Action items

References

  1. [1] [Performance] Memory-map trainer checkpoints on load โ†— pytorch/rl
  2. [2] [BugFix] Copy tensors in load_state_dict instead of aliasing the source โ†— pytorch/rl
  3. [3] [Doc] Cut doc-build time: MujocoEnv render_every, tutorial CI fast path, per-example time budget โ†— pytorch/rl
  4. [4] [Refactor] Share device-precedence resolution across collectors and inference servers โ†— pytorch/rl
  5. [5] [cuda] Nestest Superscale Quantization for CUDA Weights (int4 / int6) (#20571) pytorch/executorch
  6. [6] [cuda backend] int5 quantization support โ†— pytorch/executorch
  7. [7] [ExecuTorch][WebGPU] WGSL shader-variant codegen (vec1/vec4, fp16-ready) + rms_norm dedup โ†— pytorch/executorch
  8. [8] Fix PruneEmptyTensorsPass crash on data-dependent shapes (#20809) pytorch/executorch

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • โ€ข14 famous open source orgs
  • โ€ขOne wire per day
  • โ€ขPublic, generic
  • โ€ขRead on the web, when you remember

Your wire

  • โ†’Up to 1,500 of your repos - orgs, deps, vendors
  • โ†’Morning and evening briefs
  • โ†’Action items routed to your team
  • โ†’Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.