Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/llama_cpp/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
};

Expand All @@ -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");
Expand Down Expand Up @@ -442,6 +444,7 @@ impl LlamaModel {
t.0,
token_buf.as_mut_ptr() as *mut c_char,
token_buf.len() as i32,
true,
)
};

Expand Down
2 changes: 2 additions & 0 deletions crates/llama_cpp/src/model/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ impl From<LlamaParams> 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(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/llama_cpp/src/session/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ impl From<SessionParams> for llama_context_params {
pooling_type: value.pooling.into(),
abort_callback: None,
abort_callback_data: null_mut(),
flash_attn: false,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/llama_cpp_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions crates/llama_cpp_sys/include/build-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion crates/llama_cpp_sys/thirdparty/llama.cpp