llama, mtmd: (chatterbox) add use_classifier_free_guidance as gguf metadata (#31698)

* llama, mtmd: add use_cfg as gguf metadata

* use_classifier_free_guidance
This commit is contained in:
Xuan-Son Nguyen authored and GitHub committed 2026-11-05 20:09:33 +01:00
1 parent e8df20d238
commit b1c902f026
11 files changed
+27 -7

No files matched your search

+6
View File
@@ -1313,6 +1313,12 @@ common_init_result::common_init_result(common_params & params, bool model_only)
LOG_INF("%s", "decision model reads the embeddings output, enabling embedding mode\n");
}
if (llama_model_classifier_free_guidance(model)) {
params.kv_unified = true;
cparams.kv_unified = true;
cparams.n_seq_max *= 2;
}
// embeddings need the whole batch in one ubatch, so n_batch must not be larger than n_ubatch
// (server.cpp does this check for --embedding, but before the model is loaded)
if (cparams.embeddings && cparams.n_batch > cparams.n_ubatch) {