| 8131 | // |
| 8132 | |
| 8133 | void llama_set_rng_seed(struct llama_context * ctx, uint32_t seed) { |
| 8134 | if (seed == LLAMA_DEFAULT_SEED) { |
| 8135 | seed = time(NULL); |
| 8136 | } |
| 8137 | ctx->rng.seed(seed); |
| 8138 | } |
| 8139 | |
| 8140 | void llama_sample_softmax(struct llama_context * ctx, llama_token_data_array * candidates) { |
| 8141 | GGML_ASSERT(candidates->size > 0); |