fix: don't add space after special tokens when using SPM
This commit is contained in:
parent
9422c5e34b
commit
fb1fef9962
1 changed files with 1 additions and 1 deletions
|
@ -13393,7 +13393,7 @@ static std::vector<llama_vocab::id> llama_tokenize_internal(const llama_vocab &
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vocab.add_space_prefix) {
|
if (vocab.add_space_prefix) {
|
||||||
if (!output.size() || is_prev_special) { // prefix with space if first token
|
if (!output.size() && !is_prev_special) { // prefix with space if first token
|
||||||
raw_text = " " + raw_text;
|
raw_text = " " + raw_text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue