llama : correct platform-independent loading of BOOL metadata (#21428)
* model-loader : fix GGUF bool array conversion * model-loader : fix remaining GGUF bool pointer uses
This commit is contained in:
parent
af76639f72
commit
58190cc84d
3 changed files with 5 additions and 4 deletions
|
|
@ -522,7 +522,7 @@ static std::string gguf_data_to_str(enum gguf_type type, const void * data, int
|
|||
case GGUF_TYPE_INT64: return std::to_string(((const int64_t *)data)[i]);
|
||||
case GGUF_TYPE_FLOAT32: return std::to_string(((const float *)data)[i]);
|
||||
case GGUF_TYPE_FLOAT64: return std::to_string(((const double *)data)[i]);
|
||||
case GGUF_TYPE_BOOL: return ((const bool *)data)[i] ? "true" : "false";
|
||||
case GGUF_TYPE_BOOL: return ((const int8_t *)data)[i] != 0 ? "true" : "false";
|
||||
default: return string_format("unknown type %d", type);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue