fixes based on review @cebtenzzre
This commit is contained in:
parent
27f2e85520
commit
0a243da7d4
2 changed files with 5 additions and 5 deletions
|
@ -173,7 +173,7 @@ static llama_token llama_sampling_sample_impl(
|
||||||
const float mirostat_tau = params.mirostat_tau;
|
const float mirostat_tau = params.mirostat_tau;
|
||||||
const float mirostat_eta = params.mirostat_eta;
|
const float mirostat_eta = params.mirostat_eta;
|
||||||
|
|
||||||
std::vector<float> original_logits = {};
|
std::vector<float> original_logits;
|
||||||
auto cur_p = llama_sampling_configure_token_candidates(ctx_sampling, ctx_main, ctx_cfg, idx, !is_resampling, &original_logits);
|
auto cur_p = llama_sampling_configure_token_candidates(ctx_sampling, ctx_main, ctx_cfg, idx, !is_resampling, &original_logits);
|
||||||
if (!is_resampling) {
|
if (!is_resampling) {
|
||||||
GGML_ASSERT(!original_logits.empty());
|
GGML_ASSERT(!original_logits.empty());
|
||||||
|
@ -271,7 +271,7 @@ static llama_token_data_array llama_sampling_configure_token_candidates_impl(
|
||||||
|
|
||||||
if (apply_grammar && original_logits != NULL) {
|
if (apply_grammar && original_logits != NULL) {
|
||||||
// Only make a copy of the original logits if we are not applying grammar checks, not sure if I actually have to do this.
|
// Only make a copy of the original logits if we are not applying grammar checks, not sure if I actually have to do this.
|
||||||
(*original_logits).insert((*original_logits).end(), logits, logits + llama_n_vocab(llama_get_model(ctx_main)));
|
*original_logits = {logits, logits + llama_n_vocab(llama_get_model(ctx_main))};
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply params.logit_bias map
|
// apply params.logit_bias map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue