mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00
chore: fix some typos in comments (#2121)
Signed-off-by: hardlydearly <799511800@qq.com>
This commit is contained in:
@ -112,7 +112,7 @@ We also provide a some command line based examples using state of the art models
|
|||||||
|
|
||||||
<img src="https://github.com/huggingface/candle/raw/main/candle-examples/examples/segment-anything/assets/sam_merged.jpg" width="200">
|
<img src="https://github.com/huggingface/candle/raw/main/candle-examples/examples/segment-anything/assets/sam_merged.jpg" width="200">
|
||||||
|
|
||||||
- [SegFormer](./candle-examples/examples/segformer/): transformer based semantic segmantation model.
|
- [SegFormer](./candle-examples/examples/segformer/): transformer based semantic segmentation model.
|
||||||
- [Whisper](./candle-examples/examples/whisper/): speech recognition model.
|
- [Whisper](./candle-examples/examples/whisper/): speech recognition model.
|
||||||
- [EnCodec](./candle-examples/examples/encodec/): high-quality audio compression
|
- [EnCodec](./candle-examples/examples/encodec/): high-quality audio compression
|
||||||
model using residual vector quantization.
|
model using residual vector quantization.
|
||||||
|
@ -81,7 +81,7 @@ let mut tp_shape = view.shape().to_vec();
|
|||||||
let size = tp_shape[0];
|
let size = tp_shape[0];
|
||||||
|
|
||||||
if size % world_size != 0 {
|
if size % world_size != 0 {
|
||||||
panic!("The dimension is not divisble by `world_size`");
|
panic!("The dimension is not divisible by `world_size`");
|
||||||
}
|
}
|
||||||
let block_size = size / world_size;
|
let block_size = size / world_size;
|
||||||
let start = rank * block_size;
|
let start = rank * block_size;
|
||||||
|
@ -448,9 +448,9 @@ pub fn reduce_stereo_in_place(left: Windows100ms<&mut [Power]>, right: Windows10
|
|||||||
/// Perform gating and averaging for a BS.1770-4 integrated loudness measurement.
|
/// Perform gating and averaging for a BS.1770-4 integrated loudness measurement.
|
||||||
///
|
///
|
||||||
/// The integrated loudness measurement is not just the average power over the
|
/// The integrated loudness measurement is not just the average power over the
|
||||||
/// entire signal. BS.1770-4 defines defines two stages of gating that exclude
|
/// entire signal. BS.1770-4 defines two stages of gating that exclude
|
||||||
/// parts of the signal, to ensure that silent parts do not contribute to the
|
/// parts of the signal, to ensure that silent parts do not contribute to the
|
||||||
/// loudness measurment. This function performs that gating, and returns the
|
/// loudness measurement. This function performs that gating, and returns the
|
||||||
/// average power over the windows that were not excluded.
|
/// average power over the windows that were not excluded.
|
||||||
///
|
///
|
||||||
/// The result of this function is the integrated loudness measurement.
|
/// The result of this function is the integrated loudness measurement.
|
||||||
|
@ -55,7 +55,7 @@ fn quantized_matmul_neg() -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a vector simillarly to the one used in GGML unit tests: https://github.com/ggerganov/llama.cpp/blob/master/tests/test-quantize-fns.cpp#L26-L30
|
/// Creates a vector similarly to the one used in GGML unit tests: https://github.com/ggerganov/llama.cpp/blob/master/tests/test-quantize-fns.cpp#L26-L30
|
||||||
fn create_ggml_like_vector(offset: f32) -> Vec<f32> {
|
fn create_ggml_like_vector(offset: f32) -> Vec<f32> {
|
||||||
const GGML_TEST_SIZE: usize = 32 * 128;
|
const GGML_TEST_SIZE: usize = 32 * 128;
|
||||||
(0..GGML_TEST_SIZE)
|
(0..GGML_TEST_SIZE)
|
||||||
|
Reference in New Issue
Block a user