remove second normalization
- fix windows build - remove normalization since std::discrete_distribution does not require it
This commit is contained in:
parent
9f0c7cdb8f
commit
2ceeccf8dc
1 changed files with 1 additions and 5 deletions
|
@ -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
|
// compute probs for the top k tokens
|
||||||
std::vector<float> probs;
|
std::vector<float> probs;
|
||||||
|
@ -1265,10 +1265,6 @@ static llama_vocab::id llama_sample_top_p_top_k(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < (int) probs.size(); i++) {
|
|
||||||
probs[i] /= cumsum;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("\n");
|
//printf("\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue