@@ -1471,14 +1471,14 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
14711471 [](common_params & params) {
14721472 params.ctx_shift = false ;
14731473 }
1474- ).set_examples ({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_IMATRIX, LLAMA_EXAMPLE_PERPLEXITY}).set_env (" LLAMA_ARG_NO_CONTEXT_SHIFT" ));
1474+ ).set_examples ({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_IMATRIX, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }).set_env (" LLAMA_ARG_NO_CONTEXT_SHIFT" ));
14751475 add_opt (common_arg (
14761476 {" --chunks" }, " N" ,
14771477 string_format (" max number of chunks to process (default: %d, -1 = all)" , params.n_chunks ),
14781478 [](common_params & params, int value) {
14791479 params.n_chunks = value;
14801480 }
1481- ).set_examples ({LLAMA_EXAMPLE_IMATRIX, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_RETRIEVAL}));
1481+ ).set_examples ({LLAMA_EXAMPLE_IMATRIX, LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE, LLAMA_EXAMPLE_RETRIEVAL}));
14821482 add_opt (common_arg (
14831483 {" -fa" , " --flash-attn" },
14841484 string_format (" enable Flash Attention (default: %s)" , params.flash_attn ? " enabled" : " disabled" ),
@@ -2116,70 +2116,70 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
21162116 [](common_params & params) {
21172117 params.hellaswag = true ;
21182118 }
2119- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2119+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21202120 add_opt (common_arg (
21212121 {" --hellaswag-tasks" }, " N" ,
21222122 string_format (" number of tasks to use when computing the HellaSwag score (default: %zu)" , params.hellaswag_tasks ),
21232123 [](common_params & params, int value) {
21242124 params.hellaswag_tasks = value;
21252125 }
2126- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2126+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21272127 add_opt (common_arg (
21282128 {" --winogrande" },
21292129 " compute Winogrande score over random tasks from datafile supplied with -f" ,
21302130 [](common_params & params) {
21312131 params.winogrande = true ;
21322132 }
2133- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2133+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21342134 add_opt (common_arg (
21352135 {" --winogrande-tasks" }, " N" ,
21362136 string_format (" number of tasks to use when computing the Winogrande score (default: %zu)" , params.winogrande_tasks ),
21372137 [](common_params & params, int value) {
21382138 params.winogrande_tasks = value;
21392139 }
2140- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2140+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21412141 add_opt (common_arg (
21422142 {" --multiple-choice" },
21432143 " compute multiple choice score over random tasks from datafile supplied with -f" ,
21442144 [](common_params & params) {
21452145 params.multiple_choice = true ;
21462146 }
2147- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2147+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21482148 add_opt (common_arg (
21492149 {" --multiple-choice-tasks" }, " N" ,
21502150 string_format (" number of tasks to use when computing the multiple choice score (default: %zu)" , params.multiple_choice_tasks ),
21512151 [](common_params & params, int value) {
21522152 params.multiple_choice_tasks = value;
21532153 }
2154- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2154+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21552155 add_opt (common_arg (
21562156 {" --kl-divergence" },
21572157 " computes KL-divergence to logits provided via --kl-divergence-base" ,
21582158 [](common_params & params) {
21592159 params.kl_divergence = true ;
21602160 }
2161- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2161+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21622162 add_opt (common_arg (
21632163 {" --save-all-logits" , " --kl-divergence-base" }, " FNAME" ,
21642164 " set logits file" ,
21652165 [](common_params & params, const std::string & value) {
21662166 params.logits_file = value;
21672167 }
2168- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2168+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21692169 add_opt (common_arg (
21702170 {" --ppl-stride" }, " N" ,
21712171 string_format (" stride for perplexity calculation (default: %d)" , params.ppl_stride ),
21722172 [](common_params & params, int value) {
21732173 params.ppl_stride = value;
21742174 }
2175- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2175+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21762176 add_opt (common_arg (
21772177 {" --ppl-output-type" }, " <0|1>" ,
21782178 string_format (" output type for perplexity calculation (default: %d)" , params.ppl_output_type ),
21792179 [](common_params & params, int value) {
21802180 params.ppl_output_type = value;
21812181 }
2182- ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY}));
2182+ ).set_examples ({LLAMA_EXAMPLE_PERPLEXITY, LLAMA_EXAMPLE_FINETUNE }));
21832183 add_opt (common_arg (
21842184 {" -dt" , " --defrag-thold" }, " N" ,
21852185 string_format (" KV cache defragmentation threshold (default: %.1f, < 0 - disabled)" , (double )params.defrag_thold ),
@@ -3470,5 +3470,30 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
34703470 })
34713471 .set_examples ({ LLAMA_EXAMPLE_FINETUNE }));
34723472
3473+ #ifdef LLAMA_PARQUET
3474+ add_opt (common_arg (
3475+ {" --dataset-format" }, " text" ,
3476+ string_format (" Dataset format: text or parquet (requires LLAMA_PARQUET)" ),
3477+ [](common_params & params, const std::string & format) {
3478+ params.dataset_format = format; // or parquet//TODO ENUM CLASS
3479+ }
3480+ ).set_examples ({LLAMA_EXAMPLE_FINETUNE}));
3481+
3482+ add_opt (common_arg (
3483+ {" --parquet-path" }, " parquet.parquet" ,
3484+ string_format (" Parquet path" ),
3485+ [](common_params & params, const std::string & filepath) {// TODO -read dir
3486+ params.parquet_path = filepath;
3487+ }
3488+ ).set_examples ({LLAMA_EXAMPLE_FINETUNE}));
3489+
3490+ add_opt (common_arg (
3491+ {" --tokens-column" }, " tokens" ,
3492+ string_format (" Name of tokens column (list<int32>) in Parquet file" ),
3493+ [](common_params & params, const std::string & column) {
3494+ params.tokens_column = column;
3495+ }
3496+ ).set_examples ({LLAMA_EXAMPLE_FINETUNE}));
3497+ #endif
34733498 return ctx_arg;
34743499}
0 commit comments