From 3f111ad7bbb2d4f721332f9b2b344e48b3bbf9aa Mon Sep 17 00:00:00 2001 From: firecoperana Date: Thu, 19 Jun 2025 02:24:53 -0500 Subject: add dry sampler (#513) * add dry sampler * use vocab instead of model in dry_init function * fix compile error for build test --------- Co-authored-by: firecoperana --- examples/main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/main/main.cpp') diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 6e0635a6..de736f08 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -531,7 +531,7 @@ int main(int argc, char ** argv) { antiprompt_ids.emplace_back(::llama_tokenize(ctx, antiprompt, false, true)); } - struct llama_sampling_context * ctx_sampling = llama_sampling_init(sparams); + struct llama_sampling_context * ctx_sampling = llama_sampling_init(llama_get_model_vocab(model), sparams); if (!ctx_sampling) { fprintf(stderr, "%s: failed to initialize sampling subsystem\n", __func__); exit(1); -- cgit v1.2.3