pub fn gather_qmm<'b, 'lhs, 'rhs>(
x: impl AsRef<Array>,
w: impl AsRef<Array>,
scales: impl AsRef<Array>,
biases: impl Into<Option<&'b Array>>,
lhs_indices: impl Into<Option<&'lhs Array>>,
rhs_indices: impl Into<Option<&'rhs Array>>,
transpose: impl Into<Option<bool>>,
group_size: impl Into<Option<i32>>,
bits: impl Into<Option<i32>>,
sorted_indices: impl Into<Option<bool>>,
) -> Result<Array>Expand description
Perform quantized matrix multiplication with gathered indices.
This combines the functionality of gather_mm and quantized_matmul, allowing
matrix multiplication with quantized weights and index gathering along batch dimensions.
§Params
x: Input arrayw: Quantized weight matrixscales: Quantization scalesbiases: Optional quantization biases (required for affine mode)lhs_indices: Optional indices to gather fromx’s batch dimensionsrhs_indices: Optional indices to gather fromw’s batch dimensionstranspose: If true, transpose the weight matrix (default: true)group_size: The quantization group size (default: 64)bits: The number of bits per element (default: 4)sorted_indices: If true, indicates the indices are sorted (default: false)