mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-29 08:41:22 +00:00 
			
		
		
		
	perplexity : ndot progress and show stats with < 100 tasks (#7348)
Fix floating point error with ndot printing, allow end stats on lower task numbers if multiple-choice tasks.
This commit is contained in:
		 strawberrymelonpanda
					strawberrymelonpanda
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							c1b295eea5
						
					
				
				
					commit
					ca57e0f35e
				
			| @@ -1425,7 +1425,7 @@ static void multiple_choice_score(llama_context * ctx, const gpt_params & params | |||||||
|         // Use all tasks |         // Use all tasks | ||||||
|         tasks.resize(n_task); |         tasks.resize(n_task); | ||||||
|         printf("%s: reading tasks", __func__); |         printf("%s: reading tasks", __func__); | ||||||
|         int n_dot = n_task/100; |         int n_dot = std::max((int) n_task/100, 1); | ||||||
|         int i = 0; |         int i = 0; | ||||||
|         for (auto& task : tasks) { |         for (auto& task : tasks) { | ||||||
|             ++i; |             ++i; | ||||||
| @@ -1675,7 +1675,7 @@ static void multiple_choice_score(llama_context * ctx, const gpt_params & params | |||||||
|  |  | ||||||
|     llama_batch_free(batch); |     llama_batch_free(batch); | ||||||
|  |  | ||||||
|     if (n_done < 100) return; |     if (n_done < 100 && (params.multiple_choice_tasks != 0 && params.multiple_choice_tasks < (size_t)n_task)) return; | ||||||
|  |  | ||||||
|     float p = 1.f*n_correct/n_done; |     float p = 1.f*n_correct/n_done; | ||||||
|     float sigma = sqrt(p*(1-p)/(n_done-1)); |     float sigma = sqrt(p*(1-p)/(n_done-1)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user