Skip to content

Commit 883a870

Browse files
committed
samplers : add missing cont
1 parent b26c706 commit 883a870

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/llama-backend-sampler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ static void llama_sampler_backend_top_k_apply_ggml(
149149
fprintf(stderr, "CPU backend will be used instead which defeats the purpose of having backend samplers\n");
150150
}
151151

152-
ggml_data->candidates = top_k;
152+
// TODO: temporary cont until https://github.com/ggml-org/llama.cpp/pull/17365 is merged
153+
ggml_data->candidates = ggml_cont(ctx, top_k);
153154

154155
struct ggml_tensor * logits_rows = ggml_reshape_2d(ctx, ggml_data->logits, 1, ggml_data->logits->ne[0]);
155156
struct ggml_tensor * top_k_rows = ggml_get_rows(ctx, logits_rows, top_k);

0 commit comments

Comments
 (0)