From c68ed8963fb6fc842f20d84baa07ff97b56aedb4 Mon Sep 17 00:00:00 2001
From: hardlydearly <167623323+hardlydearly@users.noreply.github.com>
Date: Sun, 28 Apr 2024 14:34:32 +0800
Subject: [PATCH] chore: fix some typos in comments (#2121)
Signed-off-by: hardlydearly <799511800@qq.com>
---
README.md | 2 +-
candle-book/src/lib.rs | 2 +-
candle-examples/src/bs1770.rs | 4 ++--
candle-wasm-tests/tests/quantized_tests.rs | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index d730313a66..5644d81813 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ We also provide a some command line based examples using state of the art models
-- [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.
- [EnCodec](./candle-examples/examples/encodec/): high-quality audio compression
model using residual vector quantization.
diff --git a/candle-book/src/lib.rs b/candle-book/src/lib.rs
index f8ca510ded..faffd7537b 100644
--- a/candle-book/src/lib.rs
+++ b/candle-book/src/lib.rs
@@ -81,7 +81,7 @@ let mut tp_shape = view.shape().to_vec();
let size = tp_shape[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 start = rank * block_size;
diff --git a/candle-examples/src/bs1770.rs b/candle-examples/src/bs1770.rs
index e18b77a750..fbda6dfdc7 100644
--- a/candle-examples/src/bs1770.rs
+++ b/candle-examples/src/bs1770.rs
@@ -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.
///
/// 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
-/// 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.
///
/// The result of this function is the integrated loudness measurement.
diff --git a/candle-wasm-tests/tests/quantized_tests.rs b/candle-wasm-tests/tests/quantized_tests.rs
index fc107e611d..8705df4219 100644
--- a/candle-wasm-tests/tests/quantized_tests.rs
+++ b/candle-wasm-tests/tests/quantized_tests.rs
@@ -55,7 +55,7 @@ fn quantized_matmul_neg() -> Result<()> {
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 {
const GGML_TEST_SIZE: usize = 32 * 128;
(0..GGML_TEST_SIZE)