diff --git a/crates/llama_cpp/src/model/mod.rs b/crates/llama_cpp/src/model/mod.rs index c5e4b23..29487d3 100644 --- a/crates/llama_cpp/src/model/mod.rs +++ b/crates/llama_cpp/src/model/mod.rs @@ -384,6 +384,7 @@ impl LlamaModel { token.0, buffer.as_mut_ptr() as *mut c_char, std::os::raw::c_int::from(initial_size), + true, ) }; @@ -398,6 +399,7 @@ impl LlamaModel { token.0, buffer.as_mut_ptr() as *mut c_char, std::os::raw::c_int::from(buffer.len() as i32), + true, ) }; assert_eq!(size as usize, buffer.len(), "Buffer length doesn't match"); @@ -442,6 +444,7 @@ impl LlamaModel { t.0, token_buf.as_mut_ptr() as *mut c_char, token_buf.len() as i32, + true, ) }; diff --git a/crates/llama_cpp/src/model/params.rs b/crates/llama_cpp/src/model/params.rs index ed4abc6..5d20995 100644 --- a/crates/llama_cpp/src/model/params.rs +++ b/crates/llama_cpp/src/model/params.rs @@ -112,6 +112,8 @@ impl From for llama_model_params { vocab_only: value.vocab_only, use_mmap: value.use_mmap, use_mlock: value.use_mlock, + check_tensors: false, + rpc_servers: ptr::null_mut(), } } } diff --git a/crates/llama_cpp/src/session/params.rs b/crates/llama_cpp/src/session/params.rs index d678968..e234bc3 100644 --- a/crates/llama_cpp/src/session/params.rs +++ b/crates/llama_cpp/src/session/params.rs @@ -349,6 +349,7 @@ impl From for llama_context_params { pooling_type: value.pooling.into(), abort_callback: None, abort_callback_data: null_mut(), + flash_attn: false, } } } diff --git a/crates/llama_cpp_sys/build.rs b/crates/llama_cpp_sys/build.rs index a00a07e..538498c 100644 --- a/crates/llama_cpp_sys/build.rs +++ b/crates/llama_cpp_sys/build.rs @@ -495,7 +495,7 @@ fn compile_metal(cx: &mut Build, cxx: &mut Build) { let common = LLAMA_PATH.join("ggml-common.h"); let input_file = File::open(ggml_metal_shader_path).expect("Failed to open input file"); - let mut output_file = File::create(&ggml_metal_shader_out_path).expect("Failed to create output file"); + let output_file = File::create(&ggml_metal_shader_out_path).expect("Failed to create output file"); let output = Command::new("sed") .arg("-e") diff --git a/crates/llama_cpp_sys/include/build-info.h b/crates/llama_cpp_sys/include/build-info.h index 17561f1..4defbfd 100644 --- a/crates/llama_cpp_sys/include/build-info.h +++ b/crates/llama_cpp_sys/include/build-info.h @@ -13,7 +13,7 @@ #ifndef BUILD_INFO_H #define BUILD_INFO_H -#define BUILD_NUMBER 2589 -#define BUILD_COMMIT "60cdf40" +#define BUILD_NUMBER 3038 +#define BUILD_COMMIT "fb76ec3" #endif // BUILD_INFO_H diff --git a/crates/llama_cpp_sys/thirdparty/llama.cpp b/crates/llama_cpp_sys/thirdparty/llama.cpp index 60cdf40..fb76ec3 160000 --- a/crates/llama_cpp_sys/thirdparty/llama.cpp +++ b/crates/llama_cpp_sys/thirdparty/llama.cpp @@ -1 +1 @@ -Subproject commit 60cdf40cc32f0ad4cb11e0ca8fd38f3b93d8d640 +Subproject commit fb76ec31a9914b7761c1727303ab30380fd4f05c