|
Entropic 2.9.4
Local-first agentic inference engine
|
Factory that materializes a Sampler from GenerationParams. More...
#include <entropic/inference/sampler.h>

Public Member Functions | |
| virtual std::unique_ptr< Sampler > | create (const GenerationParams ¶ms)=0 |
| Build a configured Sampler for one generation. | |
Factory that materializes a Sampler from GenerationParams.
Held by LlamaCppBackend for the duration of its ACTIVE state. The decode loop calls create() once per generation. The concrete production impl (LlamaCppSamplerFactory) snapshots the active llama_context* and llama_vocab* at construction; the backend's do_deactivate destroys the factory BEFORE freeing those resources so no dangling-pointer window exists.
|
pure virtual |
Build a configured Sampler for one generation.
Ownership transfers to the caller. Implementations must honor the entropic chain ordering / gating contract (see LlamaCppSamplerFactory::create for the canonical production rules — grammar → penalties → temperature → top-k → top-p → min-p → dist).
| params | Generation parameters (sampler knobs + seed). |
Implemented in entropic::LlamaCppSamplerFactory.