SIGN IN SIGN UP

Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.

0 0 104 Python

Expose `weights_only` argument for loading checkpoints in `Fabric.load()` and `Fabric.load_raw()` (#21470)

* Expose weights_only in Fabric.load

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Extend Fabric.load docstring with weights_only argument

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "Merge branch 'fabric-load-weights-only' of https://github.com/CodeVishal-17/pytorch-lightning into fabric-load-weights-only"

This reverts commit 6143e653e4b64cbdbc2e95f57d61394b39ad3773, reversing
changes made to debde18e0771006c4151b990853e7165265dfbad.

* Update fabric.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add tests

* add chlog

* add weights_only option to load_raw method for checkpoint loading

* add docs for weights_only parameter to Strategy class for checkpoint loading

* update docsstrings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bhimraj Yadav <bhimrajyadav977@gmail.com>
V
Vishal Goyal committed
20602996da9ee7a6bdc03faaaff7d856c9705a12
Parent: 494b83d
Committed by GitHub <noreply@github.com> on 1/12/2026, 9:58:07 AM