Spaces:
Paused
Paused
ZeroGPUWeights debug
Browse files26 unmodified lines2728293031323313 unmodified lines4748495051525326 unmodified lines else: self.constants_map = constants_map def __reduce__(self): print('ZeroGPUWeights.__reduce__', f'{id(self)=}', sum([tensor.nbytes for tensor in self.constants_map.values()])) constants_map: dict[str, torch.Tensor] = {} for name, tensor in self.constants_map.items(): tensor_ = torch.empty_like(tensor, device='cpu').pin_memory()13 unmodified lines self.compiled_model.set(compiled_model) return compiled_model(*args, **kwargs) def __reduce__(self): print('ZeroGPUCompiledModel.__reduce__', f'{id(self.weights)=}') return ZeroGPUCompiledModel, (self.archive_file, self.weights)
optimization_utils.py+2