Skip to content

Commit

Permalink
gguf-split: remove --upload not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
phymbert committed Mar 19, 2024
1 parent 7f0e73b commit 2dc6830
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions examples/gguf-split/gguf-split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
enum split_operation : uint8_t {
SPLIT_OP_SPLIT,
SPLIT_OP_MERGE,
SPLIT_OP_UPLOAD,
};

static const char * const LLM_KV_GENERAL_SPLIT_I_SPLIT = "general.split";
Expand Down Expand Up @@ -50,7 +49,6 @@ static void split_print_usage(const char * executable) {
printf(" --split split GGUF to multiple GGUF (default)\n");
printf(" --split-max-tensors max tensors in each split: default(%d)\n", default_params.n_split_tensors);
printf(" --merge merge multiple GGUF to a single GGUF\n");
printf(" --upload upload GGUF to an URL\n");
printf("\n");
}

Expand Down Expand Up @@ -93,10 +91,6 @@ static bool split_params_parse_ex(int argc, const char ** argv, split_params & p
arg_found = true;
params.n_split_tensors = atoi(argv[arg_idx]);
}
if (arg == "--upload") {
arg_found = true;
params.operation = SPLIT_OP_UPLOAD;
}

if (!arg_found) {
throw std::invalid_argument("error: unknown argument: " + arg);
Expand Down Expand Up @@ -476,14 +470,6 @@ static void gguf_merge(const split_params & split_params) {
__func__, split_params.output.c_str(), n_split, total_tensors);
}

static void gguf_upload(const split_params & /*params*/) {
#ifdef LLAMA_USE_CURL
fprintf(stderr, "%s: NOT IMPLEMENTED\n", __func__);
#else
fprintf(stderr, "%s: operation upload not supported, please build with -DLLAMA_CURL\n", __func__);
#endif // LLAMA_USE_CURL
}

int main(int argc, const char ** argv) {
if (argc < 3) {
split_print_usage(argv[0]);
Expand All @@ -497,8 +483,6 @@ int main(int argc, const char ** argv) {
break;
case SPLIT_OP_MERGE: gguf_merge(params);
break;
case SPLIT_OP_UPLOAD: gguf_upload(params);
break;
default:split_print_usage(argv[0]);
exit(1);
}
Expand Down

0 comments on commit 2dc6830

Please sign in to comment.