Skip to content

Commit

Permalink
Merge pull request #590 from nobodywho-ooo/bump-llamacpp-b4240
Browse files Browse the repository at this point in the history
Bump llamacpp b4240
  • Loading branch information
MarcusDunn authored Dec 3, 2024
2 parents ee96819 + 3558a20 commit b61cd95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions llama-cpp-2/src/llama_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,13 @@ impl LlamaBatch {
///
/// NOTE: this is a helper function to facilitate transition to the new batch API
///
pub fn get_one(
tokens: &[LlamaToken],
pos_0: llama_pos,
seq_id: llama_seq_id,
) -> Result<Self, BatchAddError> {
pub fn get_one(tokens: &[LlamaToken]) -> Result<Self, BatchAddError> {
if tokens.is_empty() {
return Err(BatchAddError::EmptyBuffer);
}
let batch = unsafe {
let ptr = tokens.as_ptr() as *mut i32;
llama_cpp_sys_2::llama_batch_get_one(ptr, tokens.len() as i32, pos_0, seq_id)
llama_cpp_sys_2::llama_batch_get_one(ptr, tokens.len() as i32)
};
let batch = Self {
allocated: 0,
Expand Down
2 changes: 1 addition & 1 deletion llama-cpp-sys-2/llama.cpp
Submodule llama.cpp updated 547 files

0 comments on commit b61cd95

Please sign in to comment.