Skip to content

Commit 1ff8410

Browse files
authored
Merge pull request #820 from emilnorsker/main
Expose separator token
2 parents e9faeae + e3752cc commit 1ff8410

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llama-cpp-2/src/model.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ impl LlamaModel {
185185
LlamaToken(token)
186186
}
187187

188+
/// Get the separator token (SEP).
189+
#[must_use]
190+
pub fn token_sep(&self) -> LlamaToken {
191+
let token = unsafe { llama_cpp_sys_2::llama_vocab_sep(self.vocab_ptr()) };
192+
LlamaToken(token)
193+
}
194+
188195
/// Convert single token to a string.
189196
///
190197
/// # Errors

0 commit comments

Comments
 (0)