sampling : introduce sampling_info struct

This commit introduces a sampling_info struct to encapsulate all
backend sampling related data within the llama_context class.

It also updates to use more descriptive names for sampled tokens and
candidates in the backend sampler ggml data structure.
This commit is contained in:
Daniel Bevenius
2025-11-20 14:31:37 +01:00
parent ed4345bdd9
commit 0d28b16bdc
6 changed files with 91 additions and 85 deletions
+2 -2
View File
@@ -213,8 +213,8 @@ extern "C" {
struct llama_sampler_ggml_data {
struct ggml_tensor * logits;
struct ggml_tensor * probs;
struct ggml_tensor * sampled_token;
struct ggml_tensor * filtered_ids;
struct ggml_tensor * sampled;
struct ggml_tensor * candidates;
};
typedef bool (*llama_progress_callback)(float progress, void * user_data);