MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / llama_split_path

Function llama_split_path

subprojects/llama.cpp/src/llama.cpp:1098–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1096//
1097
1098int32_t llama_split_path(
1099 char * split_path,
1100 size_t maxlen,
1101 const char * path_prefix,
1102 int32_t split_no,
1103 int32_t split_count) {
1104
1105 static const char * const SPLIT_PATH_FORMAT = "%s-%05d-of-%05d.gguf";
1106
1107 const int written = snprintf(
1108 split_path,
1109 maxlen,
1110 SPLIT_PATH_FORMAT,
1111 path_prefix,
1112 split_no + 1,
1113 split_count
1114 );
1115
1116 if (written < 0 || (size_t) written >= maxlen) {
1117 return 0;
1118 }
1119
1120 return (int32_t) written;
1121}
1122
1123int32_t llama_split_prefix(
1124 char * split_prefix,

Callers 5

writeMethod · 0.85
gguf_mergeFunction · 0.85
llama_get_list_splitsFunction · 0.85
common_download_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected