zipslicer
zipslicer copied to clipboard
Can we please have a more detailed example on how to load weights one by one for inferencing?
For example, transformers model; I assume this is not enough:
model = Transformer(model_args)
model.state_dict = zipslicer.load(checkpoints[-1], map_location="cpu", debug=True)
model.to("cuda")
As it throws out of memory error. How to pass weights for inference one by one?