You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
petals/src/petals/utils/misc.py

8 lines
171 B
Python

import torch
DUMMY = torch.empty(0) # dummy tensor that replaces empty prompt or adapter parameters
def is_dummy(tensor: torch.Tensor):
return tensor.numel() == 0