Browse Source

perplexity : fix winogrande N tasks option

Georgi Gerganov 2 năm trước cách đây
mục cha
commit
d391ae9b49
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/perplexity/perplexity.cpp

+ 1 - 1
examples/perplexity/perplexity.cpp

@@ -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]]);