Int4WeightOnlyEmbedding¶
- class torchao.quantization.qat.embedding.Int4WeightOnlyEmbedding(num_embeddings: int, embedding_dim: int, padding_idx: Optional[int] = None, max_norm: Optional[float] = None, norm_type: float = 2.0, scale_grad_by_freq: bool = False, sparse: bool = False, group_size: int = 32, scale_precision: dtype = torch.float32, zero_point_precision: dtype = torch.int32, device: device = None, output_dtype: dtype = torch.float32)[源代码]¶
该模块实现了一个具有 int4 量化分组通道权重的嵌入层。