Rename gguf_init/end to more obvious names.

This commit is contained in:
antirez
2024-01-09 16:35:40 +01:00
parent 6eb4aeb2fb
commit 26e3a59233
3 changed files with 12 additions and 12 deletions

View File

@@ -141,7 +141,7 @@ int strmatch(const char *pattern, int patternLen,
/* ========================== 'show' subcommand ============================= */
void gguf_tools_show(const char *filename) {
gguf_ctx *ctx = gguf_init(filename);
gguf_ctx *ctx = gguf_open(filename);
if (ctx == NULL) {
perror("Opening GGUF file");
exit(1);
@@ -190,7 +190,7 @@ void gguf_tools_show(const char *filename) {
* on the weights of the experts with IDs in the array of 'experts_id'.
* The array must contain 32 integers, one for each layer. */
void gguf_tools_split_mixtral(int *experts_id, const char *mixtral_filename, const char *output_filename) {
gguf_ctx *mixtral = gguf_init(mixtral_filename);
gguf_ctx *mixtral = gguf_open(mixtral_filename);
if (mixtral == NULL) {
perror("Opening Mixtral file");
exit(1);
@@ -331,7 +331,7 @@ void gguf_tools_split_mixtral(int *experts_id, const char *mixtral_filename, con
/* ====================== 'inspect-weights' subcommand ====================== */
void gguf_tools_inspect_weights(const char *filename, const char *tname, uint64_t count) {
gguf_ctx *ctx = gguf_init(filename);
gguf_ctx *ctx = gguf_open(filename);
if (ctx == NULL) {
perror("Opening GGUF file");
exit(1);
@@ -453,8 +453,8 @@ int tensors_avg_diff(gguf_tensor *t1, gguf_tensor *t2, double *diff) {
}
void gguf_tools_compare(const char *file1, const char *file2) {
gguf_ctx *ctx1 = gguf_init(file1);
gguf_ctx *ctx2 = gguf_init(file2);
gguf_ctx *ctx1 = gguf_open(file1);
gguf_ctx *ctx2 = gguf_open(file2);
if (ctx1 == NULL || ctx2 == NULL) {
perror("Opening GGUF files");
exit(1);