Skip to content

Commit 0adb2cc

Browse files
committed
Process user defined tokens
1 parent c5e6a10 commit 0adb2cc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llama-cpp-2/src/model.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl LlamaModel {
210210
}
211211

212212
match self.token_type(token) {
213-
LlamaTokenType::Normal => {}
213+
LlamaTokenType::Normal | LlamaTokenType::UserDefined => {}
214214
LlamaTokenType::Control => {
215215
if token == self.token_bos() || token == self.token_eos() {
216216
return Ok(String::new());
@@ -219,7 +219,6 @@ impl LlamaModel {
219219
LlamaTokenType::Unknown
220220
| LlamaTokenType::Undefined
221221
| LlamaTokenType::Byte
222-
| LlamaTokenType::UserDefined
223222
| LlamaTokenType::Unused => {
224223
return Ok(String::new());
225224
}

0 commit comments

Comments
 (0)