72 void reset()
override;
91 llama_sampler* chain_ =
nullptr;
92 llama_context* ctx_ =
nullptr;
129 std::unique_ptr<Sampler>
create(
133 llama_context* ctx_ =
nullptr;
134 const llama_vocab* vocab_ =
nullptr;
Factory that builds entropic's canonical llama_sampler chain.
std::unique_ptr< Sampler > create(const GenerationParams ¶ms) override
Build the v2.3.10 sampler chain from GenerationParams.
Sampler adapter that wraps a llama_sampler* chain.
~LlamaCppSampler() override
Free the underlying llama.cpp sampler chain.
llama_sampler * native_chain() const
Expose the underlying chain for legacy call sites that have not yet been ported to the Sampler API.
int32_t sample() override
Sample one token from the current logits via the wrapped chain.
void reset() override
Reset llama_sampler internal state.
Factory that materializes a Sampler from GenerationParams.
Pure-virtual per-generation sampler used by the decode loop.
Activate model on GPU (WARM → ACTIVE).
Abstract Sampler seam for backend testability (v2.3.10).
Generation parameters for a single inference call.