MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / Sampler

Method Sampler

src/sampler.cpp:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <cstdlib>
6
7Sampler::Sampler(const std::shared_ptr<Config> config, uint64_t seed) {
8 vocab_size = config->vocab_size;
9 std::srand(seed); // TODO: use random_device
10}
11
12float Sampler::sample_prob(int index, const InferenceState& s) {
13 const float* logits = s.logits();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected