Skip to content

Commit

Permalink
reserve canidates_decoded
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDunn committed Dec 4, 2023
1 parent 5dd1f45 commit 7cd0d32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7357,6 +7357,7 @@ void llama_sample_grammar(struct llama_context * ctx, llama_token_data_array * c
const llama_token eos = llama_token_eos(&ctx->model);

std::vector<std::pair<std::vector<uint32_t>, llama_partial_utf8>> candidates_decoded;
candidates_decoded.reserve(candidates->size);
std::vector<llama_grammar_candidate> candidates_grammar;

for (size_t i = 0; i < candidates->size; ++i) {
Expand Down

0 comments on commit 7cd0d32

Please sign in to comment.