remove second normalization

- fix windows build
- remove normalization since std::discrete_distribution does not require it
This commit is contained in:
Ivan Stepanov 2023-04-06 18:03:37 +03:00 committed by GitHub
parent 9f0c7cdb8f
commit 2ceeccf8dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1236,7 +1236,7 @@ static llama_vocab::id llama_sample_top_p_top_k(
}
}
sample_top_k(logits_id, top_k > 0 ? std::min(top_k, n_logits) : n_logits);
sample_top_k(logits_id, top_k > 0 ? Min(top_k, n_logits) : n_logits);
// compute probs for the top k tokens
std::vector<float> probs;
@ -1265,10 +1265,6 @@ static llama_vocab::id llama_sample_top_p_top_k(
break;
}
}
for (int i = 0; i < (int) probs.size(); i++) {
probs[i] /= cumsum;
}
}
//printf("\n");