Fix PR for recent change
This commit is contained in:
parent
c09330edba
commit
9cfb7145a1
1 changed files with 1 additions and 1 deletions
|
@ -7667,7 +7667,7 @@ static std::string llama_decode_text(const std::string& text) {
|
||||||
|
|
||||||
// does not write null-terminator to buf
|
// does not write null-terminator to buf
|
||||||
int llama_token_to_piece(const struct llama_model * model, llama_token token, char * buf, int length) {
|
int llama_token_to_piece(const struct llama_model * model, llama_token token, char * buf, int length) {
|
||||||
if (0 <= token && token < llama_model_n_vocab(model)) {
|
if (0 <= token && token < llama_n_vocab(model)) {
|
||||||
switch (llama_vocab_get_type(model->vocab)) {
|
switch (llama_vocab_get_type(model->vocab)) {
|
||||||
case LLAMA_VOCAB_TYPE_SPM: {
|
case LLAMA_VOCAB_TYPE_SPM: {
|
||||||
if (llama_is_normal_token(model->vocab, token)) {
|
if (llama_is_normal_token(model->vocab, token)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue