Skip to content

Commit

Permalink
Update sampling.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh Skanda authored Oct 6, 2024
1 parent f3d40e4 commit 9923342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ llama_token gpt_sampler_sample(struct gpt_sampler * gsmpl, struct llama_context
return id;
}

// check if it the sampled token fits the grammar
// check if the sampled token fits the grammar
{
llama_token_data single_token_data = { id, 1.0f, 0.0f };
llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false };
Expand Down Expand Up @@ -398,7 +398,7 @@ std::vector<gpt_sampler_type> gpt_sampler_types_from_names(const std::vector<std
{ "temperature", GPT_SAMPLER_TYPE_TEMPERATURE },
};

// since samplers names are written multiple ways
// since samplers names are written in multiple ways
// make it ready for both system names and input names
std::unordered_map<std::string, gpt_sampler_type> sampler_alt_name_map {
{ "top-k", GPT_SAMPLER_TYPE_TOP_K },
Expand Down

0 comments on commit 9923342

Please sign in to comment.