Skip to content

Commit

Permalink
Workaround for ggerganov#3454
Browse files Browse the repository at this point in the history
  • Loading branch information
goerch committed Oct 3, 2023
1 parent ff5a3f0 commit ee8e2b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7713,7 +7713,9 @@ int llama_token_to_piece(const struct llama_model * model, llama_token token, ch
buf[0] = llama_token_to_byte(model->vocab, token);
return 1;
} else {
GGML_ASSERT(false);
// TODO: for now we accept all unsupported token types,
// suppressing them like CONTROL tokens.
// GGML_ASSERT(false);
}
break;
}
Expand All @@ -7729,7 +7731,9 @@ int llama_token_to_piece(const struct llama_model * model, llama_token token, ch
} else if (llama_is_control_token(model->vocab, token)) {
;
} else {
GGML_ASSERT(false);
// TODO: for now we accept all unsupported token types,
// suppressing them like CONTROL tokens.
// GGML_ASSERT(false);
}
break;
}
Expand Down

1 comment on commit ee8e2b2

@m18coppola
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A printf("<%d>", token); would be a neat addition here.

Please sign in to comment.