Add review fixes

This commit is contained in:
Michael Klimenko 2024-01-28 10:32:27 +01:00
parent 6ba560d4ce
commit c35004b90d
2 changed files with 5 additions and 5 deletions

View file

@ -197,7 +197,7 @@ static llama_token llama_sampling_sample_impl(
} }
// apply params.logit_bias map // apply params.logit_bias map
for (auto logit_bia : params.logit_bias) { for (const auto & logit_bia : params.logit_bias) {
logits[logit_bia.first] += logit_bia.second; logits[logit_bia.first] += logit_bia.second;
} }

View file

@ -56,11 +56,11 @@ struct random_uniform_distribution * init_random_uniform_distribution(int seed,
} }
void free_random_normal_distribution (struct random_normal_distribution * rnd) { void free_random_normal_distribution (struct random_normal_distribution * rnd) {
free(rnd); delete rnd;
} }
void free_random_uniform_distribution(struct random_uniform_distribution * rnd) { void free_random_uniform_distribution(struct random_uniform_distribution * rnd) {
free(rnd); delete rnd;
} }
struct ggml_tensor * randomize_tensor_normal(struct ggml_tensor * tensor, struct random_normal_distribution * rnd) { struct ggml_tensor * randomize_tensor_normal(struct ggml_tensor * tensor, struct random_normal_distribution * rnd) {