@@ -347,8 +347,8 @@ static results_perplexity perplexity_v2(llama_context * ctx, const gpt_params &
347347 // Output: `perplexity: 13.5106 [114/114]`
348348 // BOS tokens will be added for each chunk before eval
349349
350- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
351- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
350+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
351+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
352352
353353 fprintf (stderr, " %s: tokenizing the input ..\n " , __func__);
354354
@@ -487,8 +487,8 @@ static results_perplexity perplexity(llama_context * ctx, const gpt_params & par
487487 // Output: `perplexity: 13.5106 [114/114]`
488488 // BOS tokens will be added for each chunk before eval
489489
490- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
491- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
490+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
491+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
492492
493493 std::ofstream logits_stream;
494494 if (!params.logits_file .empty ()) {
@@ -1740,8 +1740,8 @@ static void kl_divergence(llama_context * ctx, const gpt_params & params) {
17401740 const int n_batch = params.n_batch ;
17411741 const int num_batches = (n_ctx + n_batch - 1 )/n_batch;
17421742 const int nv = 2 *((n_vocab + 1 )/2 ) + 4 ;
1743- const bool add_bos = llama_should_add_bos_token (llama_get_model (ctx));
1744- GGML_ASSERT (llama_add_eos_token (llama_get_model (ctx)) != 1 );
1743+ const bool add_bos = llama_add_bos_token (llama_get_model (ctx));
1744+ GGML_ASSERT (! llama_add_eos_token (llama_get_model (ctx)));
17451745
17461746 std::vector<uint16_t > log_probs_uint16 (size_t (n_ctx - 1 - n_ctx/2 ) * nv);
17471747 std::vector<float > kld_values (size_t (n_ctx - 1 - n_ctx/2 )*n_chunk);
0 commit comments