Args: input_features (`str`): Number of input features of the linear layer. output_features (`str`): Number of output features of the linear layer. bias (`bool`, defaults to `True`): Whether the linear class
(
self,
input_features,
output_features,
bias=True,
compute_dtype=None,
compress_statistics=True,
quant_storage=torch.uint8,
device=None,
)
| 643 | """ |
| 644 | |
| 645 | def __init__( |
| 646 | self, |
| 647 | input_features, |
| 648 | output_features, |
| 649 | bias=True, |
| 650 | compute_dtype=None, |
| 651 | compress_statistics=True, |
| 652 | quant_storage=torch.uint8, |
| 653 | device=None, |
| 654 | ): |
| 655 | """ |
| 656 | Args: |
| 657 | input_features (`str`): |
| 658 | Number of input features of the linear layer. |
| 659 | output_features (`str`): |
| 660 | Number of output features of the linear layer. |
| 661 | bias (`bool`, defaults to `True`): |
| 662 | Whether the linear class uses the bias term as well. |
| 663 | """ |
| 664 | super().__init__( |
| 665 | input_features, |
| 666 | output_features, |
| 667 | bias, |
| 668 | compute_dtype, |
| 669 | compress_statistics, |
| 670 | "fp4", |
| 671 | quant_storage, |
| 672 | device, |
| 673 | ) |
| 674 | |
| 675 | |
| 676 | class LinearNF4(Linear4bit): |