usage: ./quantize [--allow-requantize] [--leave-output-tensor] [--pure] models/llama/ggml-model.gguf [models/llama/ggml-model-quant.gguf] type [nthreads]
| 70 | // ./quantize [--allow-requantize] [--leave-output-tensor] [--pure] models/llama/ggml-model.gguf [models/llama/ggml-model-quant.gguf] type [nthreads] |
| 71 | // |
| 72 | [[noreturn]] |
| 73 | static void usage(const char * executable) { |
| 74 | printf("usage: %s [--help] [--allow-requantize] [--leave-output-tensor] [--pure] model-f32.gguf [model-quant.gguf] type [nthreads]\n\n", executable); |
| 75 | printf(" --allow-requantize: Allows requantizing tensors that have already been quantized. Warning: This can severely reduce quality compared to quantizing from 16bit or 32bit\n"); |
| 76 | printf(" --leave-output-tensor: Will leave output.weight un(re)quantized. Increases model size but may also increase quality, especially when requantizing\n"); |
| 77 | printf(" --pure: Disable k-quant mixtures and quantize all tensors to the same type\n"); |
| 78 | printf("\nAllowed quantization types:\n"); |
| 79 | for (auto & it : QUANT_OPTIONS) { |
| 80 | if (it.name != "COPY") { |
| 81 | printf(" %2d or ", it.ftype); |
| 82 | } else { |
| 83 | printf(" "); |
| 84 | } |
| 85 | printf("%-6s : %s\n", it.name.c_str(), it.desc.c_str()); |
| 86 | } |
| 87 | exit(1); |
| 88 | } |
| 89 | |
| 90 | int main(int argc, char ** argv) { |
| 91 | if (argc < 3) { |