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

+5 -2
View File
@@ -124,8 +124,11 @@ int Engine::run_kld() {
r->ignore_eos = true;
r->sp.temp = 0.0f;
r->score = true;
r->lora_slot = lora_slot;
r->lora_uid = lora_uid;
/* --kld-lora-sources: the other documents run as the base, in the same steps. */
const bool via = cfg_.kld_lora_sources.empty() ||
kld_->source(d).rfind(cfg_.kld_lora_sources, 0) == 0;
r->lora_slot = via ? lora_slot : -1;
r->lora_uid = via ? lora_uid : 0;
r->sink = sinks[d].get();
sinks[d]->id = r->id;
reqs[d] = std::move(r);