liblloyal 1.0.0
Composable primitives for llama.cpp inference
Loading...
Searching...
No Matches
lloyal::SamplingParamsLike Concept Reference

C++20 concept: Any type with sampling parameter fields. More...

#include <sampler.hpp>

Concept definition

template<class P>
concept lloyal::SamplingParamsLike = requires(const P &p) {
p.temperature;
p.top_k;
p.top_p;
p.typical_p;
p.min_p;
p.penalty_repeat;
p.penalty_freq;
p.penalty_present;
p.penalty_last_n;
p.seed;
}
C++20 concept: Any type with sampling parameter fields.
Definition sampler.hpp:73

Detailed Description

C++20 concept: Any type with sampling parameter fields.

Allows template to accept any binding's generated SamplingParams type without coupling to specific implementations.

Fields can be either T or std::optional<T>

Definition at line 73 of file sampler.hpp.