Skip to content

Commit

Permalink
perplexity : fix winogrande N tasks option
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jan 18, 2024
1 parent e9240cd commit d391ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/perplexity/perplexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ static void winogrande_score(llama_context * ctx, const gpt_params & params) {
}
float scale = 1/(1.f + (float)rng.max());
std::vector<winogrande_entry> selected;
selected.reserve(params.winogrande_tasks);
selected.resize(params.winogrande_tasks);
for (int i = 0; i < int(params.winogrande_tasks); ++i) {
int j = int(scale*rng()*aux.size());
selected[i] = std::move(data[aux[j]]);
Expand Down

0 comments on commit d391ae9

Please sign in to comment.