|
@@ -2346,7 +2346,8 @@ llama_context * llama_init_from_model(
|
|
|
return nullptr;
|
|
return nullptr;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (params.pooling_type != model->hparams.pooling_type) {
|
|
|
|
|
|
|
+ if (params.pooling_type != LLAMA_POOLING_TYPE_UNSPECIFIED &&
|
|
|
|
|
+ params.pooling_type != model->hparams.pooling_type) {
|
|
|
//user-specified pooling-type is different from the model default
|
|
//user-specified pooling-type is different from the model default
|
|
|
LLAMA_LOG_WARN("%s: model default pooling_type is [%d], but [%d] was specified\n", __func__,
|
|
LLAMA_LOG_WARN("%s: model default pooling_type is [%d], but [%d] was specified\n", __func__,
|
|
|
model->hparams.pooling_type, params.pooling_type);
|
|
model->hparams.pooling_type, params.pooling_type);
|