Compute tensor size in bytes.

This commit is contained in:
antirez
2023-12-24 23:44:24 +01:00
parent d54409bc9c
commit b3092d3860
3 changed files with 98 additions and 58 deletions

View File

@@ -30,12 +30,13 @@ int main(int argc, char **argv) {
gguf_tensor tensor;
while (gguf_get_tensor(ctx,&tensor)) {
printf("%s tensor %.*s @%llu, %llu weights\n",
printf("%s tensor %.*s @%llu, %llu weights, %llu bytes\n",
gguf_get_tensor_type_name(tensor.type),
(int)tensor.namelen,
tensor.name,
tensor.offset,
tensor.num_weights);
tensor.num_weights,
tensor.bsize);
}
return 0;
}