Skip to content

dual_lphm_parameterized_concatenation_fusion

Bases: parameterized_concatenation_fusion

Source code in tinybig/fusion/parameterized_concatenation_fusion.py
class dual_lphm_parameterized_concatenation_fusion(parameterized_concatenation_fusion):
    def __init__(self, r: int, p: int, q: int = None, name: str = 'dual_lphm_parameterized_concatenation_fusion', *args, **kwargs):
        super().__init__(name=name, *args, **kwargs)
        self.r = r
        self.p = p
        self.q = q if q is not None else p
        assert self.n is not None and self.n % self.p == 0
        assert self.dims is not None and sum(self.dims) % self.q == 0
        self.parameter_fabrication = dual_lphm_reconciliation(p=self.p, q=self.q, r=self.r)