Skip to content

Commit de34b7c

Browse files
danbevarthw
authored andcommitted
llama : update llm_build_copy_mask_state comment [no ci] (ggml-org#9385)
This commit updates the comment, which seems to contain a typo or be an outdated comment, in the copy_mask_state function changing the variable n_rs to n_kv. I believe this change is correct and what the comment wants to convey is to copy the states that are not going to be used in the upcoming processing, which are the tokens states from n_seqs up to the number of possible token states n_kv.
1 parent 43d634d commit de34b7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9262,7 +9262,7 @@ static struct ggml_tensor * llm_build_copy_mask_state(
92629262
// FIXME: zero-out NANs?
92639263
states = ggml_mul(ctx, states, state_mask);
92649264

9265-
// copy states which won't be changed further (between n_seqs and n_rs)
9265+
// copy states which won't be changed further (between n_seqs and n_kv)
92669266
ggml_build_forward_expand(graph,
92679267
ggml_cpy(ctx,
92689268
ggml_view_1d(ctx, states, n_state*(n_kv - n_seqs), n_seqs*n_state*ggml_element_size(states)),

0 commit comments

Comments
 (0)