More shape type (#1705)

* more shape type

* fix
This commit is contained in:
Awni Hannun
2024-12-19 08:08:20 -08:00
committed by GitHub
parent f17536af9c
commit e03f0372b1
38 changed files with 260 additions and 258 deletions

View File

@@ -109,7 +109,7 @@ void gguf_load_quantized(
std::string name(tensor.name, tensor.namelen);
std::vector<int> shape = get_shape(tensor);
auto shape = get_shape(tensor);
const uint64_t weights_per_block = 32;
if (shape[shape.size() - 1] % weights_per_block != 0) {
std::ostringstream msg;
@@ -118,7 +118,7 @@ void gguf_load_quantized(
throw std::runtime_error(msg.str());
}
std::vector<int> weights_shape = shape;
auto weights_shape = shape;
weights_shape.back() /= (weights_per_byte * 4);
auto w_nbytes = uint32.size() *
std::accumulate(weights_shape.begin(),