Method
__init__
(self, in_features: int, out_features: int, bias: bool = True, device=None, dtype=None, w_group_size=128, dynamic_sfr=3.0)
Source from the content-addressed store, hash-verified
| 20 | |
| 21 | class QuantLinear(nn.Linear): |
| 22 | def __init__(self, in_features: int, out_features: int, bias: bool = True, device=None, dtype=None, w_group_size=128, dynamic_sfr=3.0): |
| 23 | super().__init__(in_features, out_features, bias, device=device, dtype=dtype) |
| 24 | |
| 25 | self.k = dynamic_sfr |
| 26 | self.w_group_size = w_group_size |
| 27 | self.weight_quantizer = Quantizer(in_features, out_features, w_group_size) |
| 28 | |
| 29 | def forward(self, x): |
| 30 | # BLD |
Callers
nothing calls this directly
Tested by
no test coverage detected