diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-09-26 22:30:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 22:30:21 +0100 |
commit | ce0a4e3a85c40f2b46ce2ee5f58ab56c30f38d99 (patch) | |
tree | 0010e960666b6554328b31697d764eddded45461 /candle-core/src/quantized/utils.rs | |
parent | 4abc1ea34dbc834e561f442737faf2c735f0a6ce (diff) | |
download | candle-ce0a4e3a85c40f2b46ce2ee5f58ab56c30f38d99.tar.gz candle-ce0a4e3a85c40f2b46ce2ee5f58ab56c30f38d99.tar.bz2 candle-ce0a4e3a85c40f2b46ce2ee5f58ab56c30f38d99.zip |
Use the gelu-erf activation. (#969)
Diffstat (limited to 'candle-core/src/quantized/utils.rs')
-rw-r--r-- | candle-core/src/quantized/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/candle-core/src/quantized/utils.rs b/candle-core/src/quantized/utils.rs index edbffa35..fa6eff51 100644 --- a/candle-core/src/quantized/utils.rs +++ b/candle-core/src/quantized/utils.rs @@ -17,7 +17,7 @@ pub(super) fn group_for_quantization<'a, 'b, T: super::k_quants::GgmlType>( let expected_blocks = xs.len() / block_size; let actual_blocks = ys.len(); - //validate that the input is the right size + // Validate that the input is the right size if expected_blocks != actual_blocks { crate::bail!("quantize {dtype:?}: expected {expected_blocks} blocks but only {actual_blocks} were provided!") } @@ -37,12 +37,12 @@ pub(super) fn group_for_dequantization<'a, 'b, T: super::k_quants::GgmlType>( let actual_output_len = ys.len(); let expected_output_len = xs.len() * block_size; - //validate that the output is the right size + // Validate that the output is the right size if expected_output_len != actual_output_len { crate::bail!("dequantize {dtype:?}: ys (len = {actual_output_len}) does not match the expected length of {expected_output_len}!") } - //zip the blocks and outputs together + // Zip the blocks and outputs together Ok(xs.iter().zip(ys.chunks_exact_mut(block_size)).collect()) } |