# MNLP_M3_document_encoder_old This repository hosts a document encoder model intended for the MNLP M3 project. ## Important Update Regarding Model Compatibility **Reason for the recent repository update:** Initially, this repository contained a model that was pushed as a standard Hugging Face `transformers` model. When attempting to load this model using the `sentence-transformers` library, I encountered an error indicating that it was not recognized as a `sentence-transformers` compatible model. This issue arose because the `sentence-transformers` library expects specific configuration files (such as `modules.json` and `sentence_bert_config.json`) within the model's directory. These files are crucial for defining the model's specific architecture, including how its token embeddings are converted into a single sentence or document embedding (e.g., via mean pooling, CLS token pooling, etc.). Without these configurations, `sentence-transformers` cannot properly interpret the model's structure. **The intended model for this repository has always been the pre-trained `sentence-transformers/all-MiniLM-L12-v2` model.** The previous upload method inadvertently created a `transformers` model structure that lacked the necessary `sentence-transformers`-specific configurations for direct loading. **What has been changed:** To rectify this, I have re-uploaded the **original `sentence-transformers/all-MiniLM-L12-v2` model** directly to a new `MNLP_M3_document_encoder` repository. This was done using the `sentence-transformers` library's `save_to_hub` function, which ensures that all the correct and required `sentence-transformers` configuration files are present. **Impact of the change:** Please note that the underlying model weights and architecture **have not changed** from the originally intended `sentence-transformers/all-MiniLM-L12-v2` model. The update purely addresses the repository's internal file structure to ensure proper loading and seamless compatibility with the `sentence-transformers` library. You can verify the previous model content by checking the commit history of this repository. I sincerely apologize for this initial oversight and any confusion it may have caused.