|
Entropic 2.9.4
Local-first agentic inference engine
|
Factory that builds entropic's canonical llama_sampler chain. More...
#include </home/runner/work/entropic/entropic/src/inference/llama_cpp_sampler.h>


Public Member Functions | |
| LlamaCppSamplerFactory (llama_context *ctx, const llama_vocab *vocab) | |
| Construct with borrowed context + vocab pointers. | |
| std::unique_ptr< Sampler > | create (const GenerationParams ¶ms) override |
| Build the v2.3.10 sampler chain from GenerationParams. | |
Factory that builds entropic's canonical llama_sampler chain.
Chain order (must remain stable for output reproducibility): grammar → penalties → temperature → top-k → top-p → min-p → dist
Gating semantics:
params.grammar is non-empty (and llama_sampler_init_grammar returns non-null).params.repeat_penalty != 1.0f.params.temperature > 0.0f (temperature == 0 ⇒ greedy mode; the chain skips the temp sampler entirely).params.top_k > 0.params.top_p < 1.0f.params.min_p > 0.0f. Default 0.0f preserves pre-v2.3.10 chain shape.LLAMA_DEFAULT_SEED when params.seed < 0. (P2-14) Definition at line 118 of file llama_cpp_sampler.h.
| entropic::LlamaCppSamplerFactory::LlamaCppSamplerFactory | ( | llama_context * | ctx, |
| const llama_vocab * | vocab | ||
| ) |
Construct with borrowed context + vocab pointers.
Construct a factory bound to a llama_context + vocab.
| ctx | Active llama_context (must outlive this factory). |
| vocab | Vocab pointer (must outlive this factory). |
Definition at line 164 of file llama_cpp_sampler.cpp.
|
overridevirtual |
Build the v2.3.10 sampler chain from GenerationParams.
Chain order: grammar → penalties → temperature → top-k → top-p → min-p → dist. Each stage is gated by its parameter so the default chain stays bit-identical to pre-v2.3.10.
| params | Generation parameters driving each stage's gate. |
Implements entropic::SamplerFactory.
Definition at line 179 of file llama_cpp_sampler.cpp.