Skip to content

Commit e99f039

Browse files
committed
cleanup main.cpp:273
1 parent 0b36725 commit e99f039

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

examples/main/main.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,17 @@ int main(int argc, char ** argv) {
270270
}
271271
}
272272

273+
LOGLN(
274+
"recalculate the cached logits (check): embd_inp.empty() %s, n_matching_session_tokens %zu, embd_inp.size() %zu, session_tokens.size() %zu, embd_inp.size() %zu",
275+
LOG_TOSTR(embd_inp.empty()), n_matching_session_tokens, embd_inp.size(), session_tokens.size(), embd_inp.size())
276+
273277
// if we will use the cache for the full prompt without reaching the end of the cache, force
274278
// reevaluation of the last token token to recalculate the cached logits
275279
if (!embd_inp.empty() && n_matching_session_tokens == embd_inp.size() &&
276280
session_tokens.size() > embd_inp.size()) {
277-
#ifndef _WIN32
278-
LOG(
279-
"recalculate the cached logits: embd_inp.empty() %s, n_matching_session_tokens %lu, embd_inp.size() %lu, session_tokens.size() %lu, embd_inp.size() %lu, session_tokens.resize( %lu )",
280-
LOG_TOSTR(embd_inp.empty()), n_matching_session_tokens, embd_inp.size(), session_tokens.size(), embd_inp.size(), embd_inp.size() - 1)
281-
#else
282-
LOG(
283-
"recalculate the cached logits: embd_inp.empty() %s, n_matching_session_tokens %llu, embd_inp.size() %llu, session_tokens.size() %llu, embd_inp.size() %llu, session_tokens.resize( %llu )",
284-
LOG_TOSTR(embd_inp.empty()), n_matching_session_tokens, embd_inp.size(), session_tokens.size(), embd_inp.size(), embd_inp.size() - 1)
285-
#endif
281+
282+
LOGLN("recalculate the cached logits (do): session_tokens.resize( %zu )", embd_inp.size() - 1)
283+
286284
session_tokens.resize(embd_inp.size() - 1);
287285
}
288286

0 commit comments

Comments
 (0)