Skip to content

Commit 0ae2860

Browse files
jaime-m-pggerganov
andauthored
Apply suggestions from code review
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent a46dfcf commit 0ae2860

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12820,13 +12820,13 @@ static std::vector<llama_vocab::id> llama_tokenize_internal(const llama_vocab &
1282012820
while (isspace(raw_text[num_whitespaces])) {
1282112821
num_whitespaces++;
1282212822
}
12823-
if(num_whitespaces == raw_text.size()) {
12823+
if (num_whitespaces == raw_text.size()) {
1282412824
continue; // skip if all whitespaces
1282512825
}
1282612826
raw_text = raw_text.substr(num_whitespaces);
1282712827
}
1282812828

12829-
if(vocab.add_space_prefix) {
12829+
if (vocab.add_space_prefix) {
1283012830
if (!output.size() || is_prev_special) { // prefix with space if first token
1283112831
raw_text = " " + raw_text;
1283212832
}

0 commit comments

Comments
 (0)