explicitly del state (#784)
This commit is contained in:
@@ -76,6 +76,8 @@ def hf_model_weights_iterator(
|
|||||||
state = torch.load(bin_file, map_location="cpu")
|
state = torch.load(bin_file, map_location="cpu")
|
||||||
for name, param in state.items():
|
for name, param in state.items():
|
||||||
yield name, param
|
yield name, param
|
||||||
|
del state
|
||||||
|
torch.cuda.empty_cache()
|
||||||
|
|
||||||
|
|
||||||
def load_tensor_parallel_weights(
|
def load_tensor_parallel_weights(
|
||||||
|
|||||||
Reference in New Issue
Block a user