Skip to content

Commit 29394d6

Browse files
committed
debugging & optimization
1 parent 5dc869f commit 29394d6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/models.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,12 @@ namespace chatllm
943943

944944
before_generate(gen_config);
945945

946+
#if (0)
947+
for (auto i : curr_input_ids)
948+
printf("%d, ", i);
949+
printf("\n");
950+
#endif
951+
946952
while (!aborted && !completed && (n_past + (int)curr_input_ids.size() < gen_config.max_length))
947953
{
948954
std::vector<float> lm_logits;

src/unicode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,8 @@ std::vector<std::string> unicode_regex_split(const std::string & text, const std
623623
break;
624624
}
625625
}
626+
if (need_collapse)
627+
break;
626628
}
627629

628630
const auto cpts = unicode_cpts_from_utf8(text);

0 commit comments

Comments
 (0)