server : do not init sampler if not needed
This commit is contained in:
parent
ffa0d15e86
commit
be9e6ef2c0
|
|
@ -196,10 +196,14 @@ struct server_slot {
|
|||
}
|
||||
|
||||
void init_sampler() const {
|
||||
const int64_t t_start = ggml_time_us();
|
||||
|
||||
common_sampler_reset(smpl.get());
|
||||
|
||||
if (!task->need_sampling()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const int64_t t_start = ggml_time_us();
|
||||
|
||||
int n_text = 0;
|
||||
|
||||
for (int i = 0; i < (int) prompt.tokens.size(); i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue