jupyterjazz commited on
Commit
fd34c40
1 Parent(s): 3f72891

fix: var name

Browse files

Signed-off-by: jupyterjazz <saba.sturua@jina.ai>

Files changed (1) hide show
  1. modeling_xlm_roberta.py +2 -2
modeling_xlm_roberta.py CHANGED
@@ -583,11 +583,11 @@ class XLMRobertaModel(XLMRobertaPreTrainedModel):
583
  logger.warning(
584
  'Matryoshka embeddings are not supported, so dimension truncation will not be performed.'
585
  )
586
- elif truncate_dim in self.config.matryoshka_dimension:
587
  all_embeddings = [tensor[:truncate_dim] for tensor in all_embeddings]
588
  else:
589
  raise ValueError(f'The provided `truncate_dim` value of {truncate_dim} is not supported. '
590
- f'Supported dimensions are {self.config.matryoshka_dimension}.')
591
 
592
  if convert_to_tensor:
593
  all_embeddings = torch.stack(all_embeddings)
 
583
  logger.warning(
584
  'Matryoshka embeddings are not supported, so dimension truncation will not be performed.'
585
  )
586
+ elif truncate_dim in self.config.matryoshka_dimensions:
587
  all_embeddings = [tensor[:truncate_dim] for tensor in all_embeddings]
588
  else:
589
  raise ValueError(f'The provided `truncate_dim` value of {truncate_dim} is not supported. '
590
+ f'Supported dimensions are {self.config.matryoshka_dimensions}.')
591
 
592
  if convert_to_tensor:
593
  all_embeddings = torch.stack(all_embeddings)