Skip to content

xlm.commands.extract_model_state_dict

filter_model_state_dict(full_state_dict)

Keep only "model.*" keys and strip the "model." prefix.

Used by :func:main to convert a full Lightning checkpoint state-dict into a plain model state-dict suitable for model.load_state_dict.