kld: --kld-lora-sources PREFIX, an adapter for some documents and the base for the rest, in the same steps

This commit is contained in:
baKon committed 2026-10-16 20:52:09 -05:00
1 parent e419c1acc3
commit 63e6d01394
5 files changed
+13 -2

No files matched your search

+4
View File
@@ -236,6 +236,8 @@ static const Flag g_flags[] = {
{ "--kld-corpus", "FILE", "JSONL, one {\"prompt\", \"score_from\"?, \"source\"?} a line; --kld-record only" },
{ "--kld-out", "FILE", "the --kld-ref report as JSON, and every position's numbers in FILE.rows" },
{ "--kld-lora", "NAME", "run --kld-record / --kld-ref through the --lora adapter NAME" },
{ "--kld-lora-sources", "PREFIX", "--kld-lora only for documents whose source starts with PREFIX; the\n"
" rest run as the base, in the same steps (a mixed batch)" },
{ "--debug-graph", nullptr, "print the entire declared graph and exit-quality detail" },
{ "--debug-selection", nullptr, "print the selection table" },
@@ -782,6 +784,7 @@ int config_parse(int argc, char** argv, Config* c) {
else if (S("--kld-corpus")) { if (!(v = need(i))) return RAD_E_INVAL; c->kld_corpus = v; }
else if (S("--kld-out")) { if (!(v = need(i))) return RAD_E_INVAL; c->kld_out = v; }
else if (S("--kld-lora")) { if (!(v = need(i))) return RAD_E_INVAL; c->kld_lora = v; }
else if (S("--kld-lora-sources")) { if (!(v = need(i))) return RAD_E_INVAL; c->kld_lora_sources = v; }
else if (S("--debug-graph")) { c->debug_graph = true; c->debug_selection = true; }
else if (S("--debug-selection")) c->debug_selection = true;
else if (S("--debug-placement")) c->debug_placement = true;
@@ -1036,6 +1039,7 @@ const ShowRow kShow[] = {
{ "--kld-corpus", [](const Config& c) { return or_none(c.kld_corpus, "none"); } },
{ "--kld-out", [](const Config& c) { return or_none(c.kld_out, "none"); } },
{ "--kld-lora", [](const Config& c) { return or_none(c.kld_lora, "none (the base)"); } },
{ "--kld-lora-sources", [](const Config& c) { return or_none(c.kld_lora_sources, "every document"); } },
{ "--debug-graph", [](const Config& c) { return onoff(c.debug_graph); } },
{ "--debug-selection", [](const Config& c) { return onoff(c.debug_selection); } },
{ "--debug-placement", [](const Config& c) { return onoff(c.debug_placement); } },