Skip to content
Closed
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
5 changes: 5 additions & 0 deletions model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,12 @@ bool ModelLoader::save_to_gguf_file(const std::string& file_path, ggml_type type

auto tensor_type_rules = parse_tensor_type_rules(tensor_type_rules_str);

std::mutex mux_conversion;

auto on_new_tensor_cb = [&](const TensorStorage& tensor_storage, ggml_tensor** dst_tensor) -> bool {

std::lock_guard<std::mutex> lock(mux_conversion);

const std::string& name = tensor_storage.name;
ggml_type tensor_type = tensor_storage.type;
ggml_type dst_type = type;
Expand Down
Loading