Missing Pooling Layer (sentence transformer) Definitions

#2
by jannikmi - opened

First of all, thank you for releasing this model!

When I load the model with:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('T-Systems-onsite/cross-en-de-roberta-sentence-transformer')

I get this warning:

No sentence-transformers model found with name /Users/<>/.cache/torch/sentence_transformers/T-Systems-onsite_cross-en-de-roberta-sentence-transformer. Creating a new one with MEAN pooling.

Looking at the sentence-transformer library, this happens because the modules.json file and the configurations for the Pooling layers are missing.
I guess including the same files from the "parent model" https://huggingface.co/sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1/tree/main would fix this problem unless some other configuration has been used.

T-Systems on site services GmbH org
edited Nov 14, 2022

You can just ignore this warning.
It adds a mean pooling layer.
Since this layer only does mean pooling and has no weights or biases it is ok.
The model was trained with mean pooling. It is ok...

Thanks for the fast response.
Thanks for clarifying that "mean pooling" has been used.
I believe it would help include the pooling configuration:

  • making pooling configuration explicit
  • removing the warning
  • ensuring backward compatibility in case the default behaviour of the sentence-transformer library changes
T-Systems on site services GmbH org

I agree.

Sign up or log in to comment