Skip to content

Commit

Permalink
spm_llama_sampling_sample syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
guinmoon committed Nov 20, 2024
1 parent d96144e commit 47e9f1d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Sources/llmfarm_core_cpp/gpt_spm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,24 +370,20 @@ int check_tensor_name(struct ggml_tensor * t){
}

llama_token spm_llama_sampling_sample(
/*llama_sampling_context*/common_sampler * ctx_sampling,
common_sampler * ctx_sampling,
struct llama_context * ctx_main,
// struct llama_context * ctx_cfg,
int idx = -1,
bool grammar_first = false)
{

// llama_sampling_sample(ctx_sampling,ctx_main,ctx_cfg,idx);
common_sampler_sample(ctx_sampling, ctx_main, idx, grammar_first);
return common_sampler_sample(ctx_sampling, ctx_main, idx, grammar_first);
}

void spm_llama_sampling_accept(
struct /*llama_sampling_context*/common_sampler * ctx_sampling,
struct common_sampler * ctx_sampling,
struct llama_context * ctx_main,
llama_token id,
bool apply_grammar)
{
// llama_sampling_accept(ctx_sampling,ctx_main,id,apply_grammar);
common_sampler_accept(ctx_sampling, id, apply_grammar);
}

0 comments on commit 47e9f1d

Please sign in to comment.