comment / warn about preserved tokens not being single tokens

This commit is contained in:
ochafik 2025-02-02 09:00:46 +00:00
parent 5fd28b3aca
commit 3a37ae4006

View file

@ -383,6 +383,9 @@ struct server_task {
if (ids.size() == 1) {
LOG_DBG("Preserved token: %d\n", ids[0]);
params.sampling.preserved_tokens.insert(ids[0]);
} else {
// This may happen when using a tool call style meant for a model with special tokens to preserve on a model without said tokens.
LOG_DBG("Not preserved because more than 1 token: %s\n", t.get<std::string>().c_str());
}
}
}