fix a couple bugs (#952)

This commit is contained in:
Awni Hannun
2024-04-02 12:07:41 -07:00
committed by GitHub
parent 1a87dc5ea8
commit 741eb28443
3 changed files with 9 additions and 5 deletions

View File

@@ -106,6 +106,7 @@ void gguf_load_quantized(
}
std::string name(tensor.name, tensor.namelen);
std::vector<int> shape = get_shape(tensor);
const uint64_t weights_per_block = 32;
if (shape[shape.size() - 1] % weights_per_block != 0) {
@@ -136,7 +137,7 @@ void gguf_load_quantized(
extract_q8_0_data(tensor, weights, scales, biases);
}
a.emplace(std::move(name), std::move(weights));
a.emplace(name, std::move(weights));
auto check_insert = [](const auto& inserted) {
if (!inserted.second) {