Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6af216

Browse filesBrowse files
authored
speculative : fix seg fault in certain cases (ggml-org#12454)
1 parent 99aa304 commit c6af216
Copy full SHA for c6af216

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎examples/speculative/speculative.cpp

Copy file name to clipboardExpand all lines: examples/speculative/speculative.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ int main(int argc, char ** argv) {
331331
}
332332

333333
active_seqs.erase(s);
334-
for(int i = 0; i < n_seq_dft; i++) {
334+
for (int i = 0; i < n_seq_dft; i++) {
335335
if (i == s) {
336336
continue;
337337
}
338-
if (drafts[i].tokens[i_dft] == drafts[s].tokens[i_dft]) {
338+
if (drafts[i].active && drafts[i].tokens[i_dft] == drafts[s].tokens[i_dft]) {
339339
// synchronize active status for sequences with the same drafted token
340340
drafts[i].active = drafts[i].active && accept;
341341
if (!drafts[i].active) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.