Skip to content
Open
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
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,13 @@ fn find_llama_cpp_dir() -> PathBuf {
let manifest_dir = PathBuf::from(
env::var_os("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR is set by cargo"),
);
// Prefer an explicit mainline checkout over a sibling `llama.cpp` when both
// exist. Some forks lag upstream ggml and have produced non-finite (NaN)
// logits on Q1_0 models; a `llama.cpp-mainline` directory name makes the
// intended tree obvious. WWAMA_LLAMA_CPP_DIR still overrides entirely.
let candidates = [
manifest_dir.join("../../cpp/llama.cpp-mainline"),
manifest_dir.join("../llama.cpp-mainline"),
manifest_dir.join("../../cpp/llama.cpp"),
manifest_dir.join("../llama.cpp"),
];
Expand Down