Skip to content

Commit a818384

Browse files
author
Chris Warren-Smith
committed
LLAMA: nitro - huge max-tokens for generating large files. update icons
1 parent 0a38fe4 commit a818384

2 files changed

Lines changed: 118 additions & 98 deletions

File tree

llama/llama-sb.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,11 @@ string Llama::token_to_string(LlamaIter &iter, llama_token tok) {
624624

625625
result.append(buf, n);
626626

627+
// detect end of max-tokens
628+
if (++iter._tokens_generated > _max_tokens) {
629+
iter._has_next = false;
630+
}
631+
627632
// detect stop words
628633
if (iter._has_next) {
629634
for (const auto &stop : _stop_sequences) {

0 commit comments

Comments
 (0)