Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not download more files at runtime
Due to a design choice in Transformers, remote-code embedded in a model on HF is downloaded at runtime and this cannot be disabled, despite our attempts to download it at build time. A practical result of this is that the built Docker container image needs networking access to download the remote code, which is not ideal. This fix is a workaround to download the remote code at build time, and embed it into the model by updating the `config.json` file appropriately. This should only be needed for Nomic-style models, apparently, since they are some of the only embedding models that use remote code. Many thanks to Tom Aarsen for providing me with the steps to fix this. Relevant issue: UKPLab/sentence-transformers#2613 (comment)
- Loading branch information