Skip to content

naive_gamma_probabilistic_compression

Bases: naive_probabilistic_compression

Source code in tinybig/compression/probabilistic_compression.py
class naive_gamma_probabilistic_compression(naive_probabilistic_compression):
    def __init__(self, name: str = 'naive_gamma_probabilistic_compression', concentration: float = 1.0, rate: float = 1.0, require_normalization: bool = True, *args, **kwargs):
        distribution_function = torch.distributions.gamma.Gamma(torch.tensor([concentration]), torch.tensor([rate]))
        super().__init__(name=name, distribution_function=distribution_function, require_normalization=True, *args, **kwargs)