@@ -340,8 +340,8 @@ static results_perplexity perplexity_v2(llama_context * ctx, const gpt_params &
340340 // Output: `perplexity: 13.5106 [114/114]`
341341 // BOS tokens will be added for each chunk before eval
342342
343- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
344- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
343+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
344+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
345345
346346 fprintf (stderr, " %s: tokenizing the input ..\n " , __func__);
347347
@@ -480,8 +480,8 @@ static results_perplexity perplexity(llama_context * ctx, const gpt_params & par
480480 // Output: `perplexity: 13.5106 [114/114]`
481481 // BOS tokens will be added for each chunk before eval
482482
483- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
484- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
483+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
484+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
485485
486486 std::ofstream logits_stream;
487487 if (!params.logits_file .empty ()) {
@@ -1733,8 +1733,8 @@ static void kl_divergence(llama_context * ctx, const gpt_params & params) {
17331733 const int n_batch = params.n_batch ;
17341734 const int num_batches = (n_ctx + n_batch - 1 )/n_batch;
17351735 const int nv = 2 *((n_vocab + 1 )/2 ) + 4 ;
1736- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
1737- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
1736+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
1737+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
17381738
17391739 std::vector<uint16_t > log_probs_uint16 (size_t (n_ctx - 1 - n_ctx/2 ) * nv);
17401740 std::vector<float > kld_values (size_t (n_ctx - 1 - n_ctx/2 )*n_chunk);
0 commit comments