Skip to content

Commit

Permalink
Merge pull request #93 from SilasMarvin/fix-user-defined-tokens
Browse files Browse the repository at this point in the history
Process user defined tokens
  • Loading branch information
MarcusDunn authored Feb 21, 2024
2 parents 2b294f4 + 0adb2cc commit 68534b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llama-cpp-2/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl LlamaModel {
}

match self.token_type(token) {
LlamaTokenType::Normal => {}
LlamaTokenType::Normal | LlamaTokenType::UserDefined => {}
LlamaTokenType::Control => {
if token == self.token_bos() || token == self.token_eos() {
return Ok(String::new());
Expand All @@ -219,7 +219,6 @@ impl LlamaModel {
LlamaTokenType::Unknown
| LlamaTokenType::Undefined
| LlamaTokenType::Byte
| LlamaTokenType::UserDefined
| LlamaTokenType::Unused => {
return Ok(String::new());
}
Expand Down

0 comments on commit 68534b6

Please sign in to comment.