gguf : better type names
This commit is contained in:
parent
758ff1bbb5
commit
d72a23e2f1
2 changed files with 11 additions and 10 deletions
19
ggml.c
19
ggml.c
|
@ -18584,17 +18584,18 @@ static const size_t GGUF_TYPE_SIZE[GGUF_TYPE_COUNT] = {
|
||||||
static_assert(GGUF_TYPE_COUNT == 10, "GGUF_TYPE_COUNT != 10");
|
static_assert(GGUF_TYPE_COUNT == 10, "GGUF_TYPE_COUNT != 10");
|
||||||
|
|
||||||
static const char * GGUF_TYPE_NAME[GGUF_TYPE_COUNT] = {
|
static const char * GGUF_TYPE_NAME[GGUF_TYPE_COUNT] = {
|
||||||
[GGUF_TYPE_UINT8] = "uint8",
|
[GGUF_TYPE_UINT8] = "u8",
|
||||||
[GGUF_TYPE_INT8] = "int8",
|
[GGUF_TYPE_INT8] = "i8",
|
||||||
[GGUF_TYPE_UINT16] = "uint16",
|
[GGUF_TYPE_UINT16] = "u16",
|
||||||
[GGUF_TYPE_INT16] = "int16",
|
[GGUF_TYPE_INT16] = "i16",
|
||||||
[GGUF_TYPE_UINT32] = "uint32",
|
[GGUF_TYPE_UINT32] = "u32",
|
||||||
[GGUF_TYPE_INT32] = "int32",
|
[GGUF_TYPE_INT32] = "i32",
|
||||||
[GGUF_TYPE_FLOAT32] = "float32",
|
[GGUF_TYPE_FLOAT32] = "f32",
|
||||||
[GGUF_TYPE_BOOL] = "bool",
|
[GGUF_TYPE_BOOL] = "bool",
|
||||||
[GGUF_TYPE_STRING] = "string",
|
[GGUF_TYPE_STRING] = "str",
|
||||||
[GGUF_TYPE_ARRAY] = "array",
|
[GGUF_TYPE_ARRAY] = "arr",
|
||||||
};
|
};
|
||||||
|
static_assert(GGUF_TYPE_COUNT == 10, "GGUF_TYPE_COUNT != 10");
|
||||||
|
|
||||||
union gguf_value {
|
union gguf_value {
|
||||||
uint8_t uint8;
|
uint8_t uint8;
|
||||||
|
|
|
@ -1047,7 +1047,7 @@ struct llama_model_loader {
|
||||||
const char * name = gguf_get_tensor_name(ctx_gguf, i);
|
const char * name = gguf_get_tensor_name(ctx_gguf, i);
|
||||||
struct ggml_tensor * meta = ggml_get_tensor(ctx_meta, name);
|
struct ggml_tensor * meta = ggml_get_tensor(ctx_meta, name);
|
||||||
|
|
||||||
LLAMA_LOG_INFO("%s: - tensor %3d: %32s %-8s [ %s ]\n", __func__, i, name, ggml_type_name(meta->type), llama_format_tensor_shape(meta).c_str());
|
LLAMA_LOG_INFO("%s: - tensor %4d: %32s %-8s [ %s ]\n", __func__, i, name, ggml_type_name(meta->type), llama_format_tensor_shape(meta).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < n_kv; i++) {
|
for (int i = 0; i < n_kv; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue