From 5bbe814a5389e7b9030c8cc1f54862eb92d6275c Mon Sep 17 00:00:00 2001 From: Daniel Keysers Date: Tue, 10 Dec 2024 03:33:25 -0800 Subject: [PATCH] Tiny cleanup. PiperOrigin-RevId: 704636988 --- evals/cross_entropy.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/evals/cross_entropy.cc b/evals/cross_entropy.cc index 6393c53..e4bf1b1 100644 --- a/evals/cross_entropy.cc +++ b/evals/cross_entropy.cc @@ -100,11 +100,10 @@ HWY_EXPORT(CallSoftmax); float ComputeCrossEntropy(Gemma& gemma, size_t max_generated_tokens, const std::vector& prompt, KVCache& kv_cache, int verbosity) { - const StreamFunc stream_token = [](int /*token*/, float) { return true; }; + const StreamFunc stream_token = [](int, float) { return true; }; - // TWeight is unused, but we have to pass it to Config*. const int vocab_size = gemma.GetModelConfig().vocab_size; - float cross_entropy = std::log(vocab_size); // first token + float cross_entropy = std::log(vocab_size); // first token; == -log(1/v_s) size_t pos = 1; const SampleFunc sample_token = [&](float* probs,