Entropic 2.9.4
Local-first agentic inference engine
Loading...
Searching...
No Matches
llama_cpp_sampler.h File Reference

Concrete llama.cpp Sampler + SamplerFactory (v2.3.10 seam impl). More...

Include dependency graph for llama_cpp_sampler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  entropic::LlamaCppSampler
 Sampler adapter that wraps a llama_sampler* chain. More...
 
class  entropic::LlamaCppSamplerFactory
 Factory that builds entropic's canonical llama_sampler chain. More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Detailed Description

Concrete llama.cpp Sampler + SamplerFactory (v2.3.10 seam impl).

Implements the abstract Sampler / SamplerFactory interfaces against llama.cpp's llama_sampler chain primitive. Construction transfers the chain-building logic verbatim from the legacy LlamaCppBackend::create_sampler — chain order, gates, and the v2.3.10 min_p block (gh#23) are preserved bit-for-bit so production output is unchanged.

Lifetime contract:

  • The factory borrows llama_context* and const llama_vocab* pointers; LlamaCppBackend::do_deactivate must destroy the factory before freeing those resources.
  • Each Sampler returned by create() owns its llama_sampler* and frees it in the destructor.

Definition in file llama_cpp_sampler.h.