mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Fix failed import of ST RoBERTa models (#637)
Fixes an error uploading the sentence-transformers/all-distilroberta-v1 model which failed with "missing 2 required positional arguments: 'token_type_ids' and 'position_ids'". The cause was that the tokenizer type was not recognised due to a typo
This commit is contained in:
parent
af26897313
commit
081250cdec
@ -311,7 +311,7 @@ class _SentenceTransformerWrapperModule(nn.Module): # type: ignore
|
||||
(
|
||||
transformers.BartTokenizer,
|
||||
transformers.MPNetTokenizer,
|
||||
transformers.RobertaConfig,
|
||||
transformers.RobertaTokenizer,
|
||||
transformers.XLMRobertaTokenizer,
|
||||
),
|
||||
):
|
||||
|
@ -77,6 +77,14 @@ pytestmark = [
|
||||
# have been imported
|
||||
if HAS_PYTORCH and HAS_SKLEARN and HAS_TRANSFORMERS:
|
||||
MODEL_CONFIGURATIONS = [
|
||||
(
|
||||
"sentence-transformers/all-distilroberta-v1",
|
||||
"text_embedding",
|
||||
TextEmbeddingInferenceOptions,
|
||||
NlpRobertaTokenizationConfig,
|
||||
512,
|
||||
768,
|
||||
),
|
||||
(
|
||||
"intfloat/multilingual-e5-small",
|
||||
"text_embedding",
|
||||
|
Loading…
x
Reference in New Issue
Block a user