perplexity : fix winogrande N tasks option

This commit is contained in:
Georgi Gerganov 2024-01-18 20:49:00 +02:00
parent e9240cdfa0
commit d391ae9b49
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -865,7 +865,7 @@ static void winogrande_score(llama_context * ctx, const gpt_params & params) {
} }
float scale = 1/(1.f + (float)rng.max()); float scale = 1/(1.f + (float)rng.max());
std::vector<winogrande_entry> selected; 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) { for (int i = 0; i < int(params.winogrande_tasks); ++i) {
int j = int(scale*rng()*aux.size()); int j = int(scale*rng()*aux.size());
selected[i] = std::move(data[aux[j]]); selected[i] = std::move(data[aux[j]]);