Skip to content

Commit

Permalink
fix linux/arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Feb 7, 2024
1 parent 1a34987 commit fa393ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llama-cpp-low/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use core::slice;
use std::{
ffi::CString,
fmt::{Debug, Formatter},
os::raw::c_char,
sync::{Arc, Mutex},
};

Expand Down Expand Up @@ -239,7 +240,7 @@ impl Model {
llama_token_to_piece(
model,
token as i32,
res.as_mut_ptr() as *mut i8,
res.as_mut_ptr() as *mut c_char,
res.len() as i32,
)
});
Expand All @@ -261,7 +262,7 @@ impl Model {
let ntok = self.with_model(|model| unsafe {
llama_tokenize(
model,
data.as_ptr() as *mut i8,
data.as_ptr() as *mut c_char,
data.len() as i32,
res.as_mut_ptr() as *mut i32,
res.len() as i32,
Expand Down

0 comments on commit fa393ec

Please sign in to comment.