MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / llama_sampler_init_mirostat_v2

Function llama_sampler_init_mirostat_v2

smallthinker/src/llama-sampling.cpp:1400–1413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1398};
1399
1400struct llama_sampler * llama_sampler_init_mirostat_v2(uint32_t seed, float tau, float eta) {
1401 auto seed_cur = get_rng_seed(seed);
1402 return llama_sampler_init(
1403 /* .iface = */ &llama_sampler_mirostat_v2_i,
1404 /* .ctx = */ new llama_sampler_mirostat_v2 {
1405 /* .seed = */ seed,
1406 /* .seed_cur = */ seed_cur,
1407 /* .tau = */ tau,
1408 /* .eta = */ eta,
1409 /* .mu = */ 2.0f*tau,
1410 /* .rng = */ std::mt19937(seed_cur),
1411 }
1412 );
1413}
1414
1415// grammar
1416

Callers 2

common_sampler_initFunction · 0.85

Calls 2

get_rng_seedFunction · 0.85
llama_sampler_initFunction · 0.85

Tested by

no test coverage detected