|
Entropic 2.9.4
Local-first agentic inference engine
|
Abstract Sampler seam for backend testability (v2.3.10). More...


Go to the source code of this file.
Classes | |
| class | entropic::Sampler |
| Pure-virtual per-generation sampler used by the decode loop. More... | |
| class | entropic::SamplerFactory |
| Factory that materializes a Sampler from GenerationParams. More... | |
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Abstract Sampler seam for backend testability (v2.3.10).
Pre-v2.3.10 LlamaCppBackend built its llama_sampler_chain inline from GenerationParams and invoked llama_sampler_sample directly in the decode loop. Every line of chain construction was therefore unreachable under the CPU-only unit-test coverage gate (no real model, no real context). This abstract seam relocates chain construction behind a SamplerFactory and relocates per-token sampling behind a Sampler — both mockable. The production backend wires LlamaCppSamplerFactory (which builds the real llama.cpp chain); unit tests inject a mock factory + mock sampler and assert behavior without a loaded model.
Pairs structurally with the v2.3.10 Tokenizer seam (see tokenizer.h).
Definition in file sampler.h.