Call block.load_state_dict only once (#124)

pull/123/head^2
Max Ryabinin 2 years ago committed by GitHub
parent 0855aa7347
commit 055f85b83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,7 +43,6 @@ def load_pretrained_block(
state_dict = _load_state_dict(
converted_model_name_or_path, block_index, use_auth_token=use_auth_token, cache_dir=cache_dir
)
block.load_state_dict(state_dict)
if torch_dtype == "auto":
with torch.no_grad():

Loading…
Cancel
Save