Skip to content

Commit 0b6ff47

Browse files
authored
fix: correct misspellings in code comments (#21217)
- emdeddings → embeddings (gemma3.cpp, gemma3n-iswa.cpp, gemma-embedding.cpp) - imlpemented → implemented (llama-adapter.cpp) - interere → interfere (llama-graph.cpp) - overridde → overridden (chat.cpp) - stastistics → statistics (ngram-map.h) - layed → laid (llama-kv-cache.h) - worster → worst (llama-context.cpp) - sequantial → sequential (llama-batch.h)
1 parent eec6f85 commit 0b6ff47

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

common/chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ using chat_template_caps = jinja::caps;
221221
struct common_chat_templates {
222222
bool add_bos;
223223
bool add_eos;
224-
bool has_explicit_template; // Model had builtin template or template overridde was specified.
224+
bool has_explicit_template; // Model had builtin template or template overridden was specified.
225225
std::unique_ptr<common_chat_template> template_default; // always set (defaults to chatml)
226226
std::unique_ptr<common_chat_template> template_tool_use;
227227
};

common/ngram-map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct common_ngram_map_value {
5151
// statistics of a n-gram
5252
struct common_ngram_map_key {
5353
size_t key_idx; // index of key n-gram in token-history
54-
size_t stat_idx; // index of last token of stastistics computation (key_num, values)
54+
size_t stat_idx; // index of last token of statistics computation (key_num, values)
5555

5656
uint16_t key_num; // number of occurrences of this key n-gram in token-history
5757
common_ngram_map_value values[COMMON_NGRAM_MAX_VALUES]; // some known values after the key

src/llama-adapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static void llama_adapter_lora_init_impl(llama_model & model, const char * path_
294294
}
295295

296296
// get extra buffer types of the CPU
297-
// TODO: a more general solution for non-CPU extra buft should be imlpemented in the future
297+
// TODO: a more general solution for non-CPU extra buft should be implemented in the future
298298
// ref: https://github.com/ggml-org/llama.cpp/pull/12593#pullrequestreview-2718659948
299299
std::vector<ggml_backend_buffer_type_t> buft_extra;
300300
{

src/llama-batch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct llama_ubatch {
1818
}
1919

2020
// typical for M-RoPE cases:
21-
// 0 - sequantial position of the tokens/embeddings in the sequence
21+
// 0 - sequential position of the tokens/embeddings in the sequence
2222
// 1 - y position in the image
2323
// 2 - x position in the image
2424
// 3 - other

src/llama-context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ void llama_context::sched_reserve() {
586586

587587
// reserve again with pp graph to avoid ggml-alloc reallocations during inference
588588
{
589-
// TODO: not sure if the following graph would be worster case for multi-stream KV caches:
589+
// TODO: not sure if the following graph would be worst case for multi-stream KV caches:
590590
//
591591
// auto * gf = graph_reserve(n_tokens, 1, n_tokens, mctx.get());
592592
//

src/llama-graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ ggml_tensor * llm_graph_context::build_inp_attn_scale() const {
16651665

16661666
ggml_tensor * llm_graph_context::build_inp_out_ids() const {
16671667
// note: when all tokens are output, we could skip this optimization to spare the ggml_get_rows() calls,
1668-
// but this would make the graph topology depend on the number of output tokens, which can interere with
1668+
// but this would make the graph topology depend on the number of output tokens, which can interfere with
16691669
// features that require constant topology such as pipeline parallelism
16701670
// ref: https://github.com/ggml-org/llama.cpp/pull/14275#issuecomment-2987424471
16711671
//if (n_outputs < n_tokens) {

src/llama-kv-cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class llama_kv_cache_context : public llama_memory_context_i {
333333
ggml_tensor * get_v(ggml_context * ctx, int32_t il) const;
334334

335335
// store k_cur and v_cur in the cache based on the provided head location
336-
// note: the heads in k_cur and v_cur should be layed out contiguously in memory
336+
// note: the heads in k_cur and v_cur should be laid out contiguously in memory
337337
// - k_cur [n_embd_head_k, n_head_k, n_tokens]
338338
// - k_idxs [n_tokens]
339339
// - v_cur [n_embd_head_v, n_head_v, n_tokens]

src/models/gemma-embedding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ llm_build_gemma_embedding::llm_build_gemma_embedding(const llama_model & model,
99

1010
inpL = build_inp_embd(model.tok_embd);
1111

12-
// important: do not normalize weights for raw embeddings input (i.e. encoded image emdeddings)
12+
// important: do not normalize weights for raw embeddings input (i.e. encoded image embeddings)
1313
inpL = ggml_scale(ctx0, inpL, ubatch.token ? sqrtf(n_embd) : 1.0f);
1414
cb(inpL, "inp_scaled", -1);
1515

src/models/gemma3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ llm_build_gemma3<iswa>::llm_build_gemma3(const llama_model & model, const llm_gr
99

1010
inpL = build_inp_embd(model.tok_embd);
1111

12-
// important: do not normalize weights for raw embeddings input (i.e. encoded image emdeddings)
12+
// important: do not normalize weights for raw embeddings input (i.e. encoded image embeddings)
1313
inpL = ggml_scale(ctx0, inpL, ubatch.token ? sqrtf(n_embd) : 1.0f);
1414
cb(inpL, "inp_scaled", -1);
1515

src/models/gemma3n-iswa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ llm_build_gemma3n_iswa::llm_build_gemma3n_iswa(const llama_model & model, const
1212

1313
inpL = build_inp_embd(model.tok_embd);
1414

15-
// important: do not normalize weights for raw embeddings input (i.e. encoded image emdeddings)
15+
// important: do not normalize weights for raw embeddings input (i.e. encoded image embeddings)
1616
inpL = ggml_scale(ctx0, inpL, ubatch.token ? sqrtf(n_embd) : 1.0f);
1717
cb(inpL, "inp_scaled", -1);
1818

0 commit comments

Comments
 (0)