From e4ccb2d28b5be10bacae3b78d301607095376e2e Mon Sep 17 00:00:00 2001 From: Semen Zhydenko <semen.zhydenko@gmail.com> Date: Wed, 28 Dec 2022 14:57:32 +0100 Subject: [PATCH] Fixed typo: begining -> beginning --- codegeex/megatron/data/helpers.cpp | 6 +++--- codegeex/megatron/model/distributed.py | 2 +- codegeex/megatron/model/transformer.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codegeex/megatron/data/helpers.cpp b/codegeex/megatron/data/helpers.cpp index e45926a..8a4497a 100644 --- a/codegeex/megatron/data/helpers.cpp +++ b/codegeex/megatron/data/helpers.cpp @@ -158,7 +158,7 @@ py::array build_sample_idx(const py::array_t<int32_t>& sizes_, doc_offset += (remaining_seq_length + doc_length - 1); remaining_seq_length = 0; } else { - // Otherwise, start from the begining of the next document. + // Otherwise, start from the beginning of the next document. ++doc_idx_index; doc_offset = 0; } @@ -296,7 +296,7 @@ py::array build_mapping_impl(const py::array_t<int64_t>& docs_, const auto sent_index_first = docs[doc]; const auto sent_index_last = docs[doc + 1]; - // At the begining of the document previous index is the + // At the beginning of the document previous index is the // start index. auto prev_start_index = sent_index_first; @@ -556,7 +556,7 @@ py::array build_blocks_mapping_impl(const py::array_t<int64_t>& docs_, const auto sent_index_last = docs[doc + 1]; const auto target_seq_len = max_seq_length - titles_sizes[doc]; - // At the begining of the document previous index is the + // At the beginning of the document previous index is the // start index. auto prev_start_index = sent_index_first; diff --git a/codegeex/megatron/model/distributed.py b/codegeex/megatron/model/distributed.py index 3c6ec56..5776b68 100644 --- a/codegeex/megatron/model/distributed.py +++ b/codegeex/megatron/model/distributed.py @@ -174,7 +174,7 @@ class DistributedDataParallel(DistributedDataParallelBase): def zero_grad_buffer(self): """Set the grad buffer data to zero. Needs to be called at the - begining of each iteration.""" + beginning of each iteration.""" assert self._grad_buffers is not None, "buffers are not initialized." for _, buffer_ in self._grad_buffers.items(): buffer_.zero() diff --git a/codegeex/megatron/model/transformer.py b/codegeex/megatron/model/transformer.py index 4dd761e..a66580e 100644 --- a/codegeex/megatron/model/transformer.py +++ b/codegeex/megatron/model/transformer.py @@ -779,7 +779,7 @@ class ParallelTopQueryLayer(MegatronModule): # hidden_states: [b, s, h] assert query_hidden_state != None - # Layer norm at the begining of the transformer layer. + # Layer norm at the beginning of the transformer layer. if self.ln_fp16: layernorm_output = self.input_layernorm(hidden_states) else: