`truncate_dim` on `BertModel`
I have a pipeline to finetune an instance ofBertModel, on atext-classificationtask.I would like to usethis new embedding modelas my base embedding now.As can be seen in the example they provide, they are able to pass different values formatryoshka_diminto theSentenceTransformerinstance through thetruncate_dimargument.However, I was not able to do this on theBertModelin the following code snippet that I have in my code:self.bert_backbone = BertModel.from_pretrained(
            pretrained_model_name_or_path=self.config.embedding_model_file.model_name,
            cache_dir=Path(self.config.embedding_model_file.cache_dir),
        ).to(self.device)And I do not want to use aSentenceTransformerinstance either as in my training loop I would like to be able to get:bert_outputs: BaseModelOutputWithPoolingAndCrossAttentions = (
                    self.bert_backbone(
                        input_ids=input_ids, attention_mask=attention_mask
                    )
                )
  bert_logits: Tensor = bert_outputs.last_hidden_state[
      :, 0, :
  ]  # Take the [CLS] token outputand I am not sure if this code would work also with a simple swap toSentenceTransformer. In any case, I think that this is a potential parameter thatBertModelshould support, and maybe it does but I am just missing it.Thanks in advance!