llama.cpp : fix line feed and compiler warning
This commit is contained in:
parent
dd6eaa32e4
commit
a49931300a
1 changed files with 2 additions and 2 deletions
|
@ -2282,7 +2282,7 @@ static bool llama_is_byte_token(const llama_vocab & vocab, llama_token token) {
|
||||||
|
|
||||||
static uint8_t llama_byte_to_char(const llama_vocab & vocab, uint8_t byte) {
|
static uint8_t llama_byte_to_char(const llama_vocab & vocab, uint8_t byte) {
|
||||||
if (llama_vocab_type(vocab) == "spm") {
|
if (llama_vocab_type(vocab) == "spm") {
|
||||||
return byte + 3;
|
return byte - 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (llama_vocab_type(vocab) == "bpe") {
|
if (llama_vocab_type(vocab) == "bpe") {
|
||||||
|
@ -4790,7 +4790,7 @@ int llama_token_to_str_with_model(const struct llama_model * model, llama_token
|
||||||
if (length < 3) {
|
if (length < 3) {
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
strncpy(str, "\xe2\x96\x85", 3);
|
strncpy(str, "\xe2\x96\x85", 4);
|
||||||
return 3;
|
return 3;
|
||||||
} else if (llama_is_control_token(model->vocab, token)) {
|
} else if (llama_is_control_token(model->vocab, token)) {
|
||||||
;
|
;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue