sampling : add debug log when backend sampler selects token
This commit adds a debug log statement in the llama_sampler_sample to indicate when a backend sampler has selected a token for a given index. The modification helps in tracing the sampling process and understanding the flow of control when backend samplers are used.
This commit is contained in:
parent
8eb9b4769d
commit
25f33806d3
|
|
@ -446,6 +446,7 @@ llama_token llama_sampler_sample(struct llama_sampler * smpl, struct llama_conte
|
|||
|
||||
// If a backend sampler has already sampled a token, return it.
|
||||
if (sampled_token != LLAMA_TOKEN_NULL) {
|
||||
LLAMA_LOG_DEBUG("%s: Backend sampler selected token for idx %d. Skipping CPU samplers\n", __func__, idx);
|
||||
return sampled_token;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue