Skip to content

Conversation

alvarobartt
Copy link
Member

What does this PR do?

This PR fixes the missing Dense module handling for local models, that was preventing from running text-embeddings-inference with a local copy of a model as e.g. google/embeddinggemma-300m, given that it was only handled when the provided --model-id was a Hugging Face Hub model ID, hence the artifacts where downloaded on runtime.

Note

This is just a tentative solution to patch the aforementioned issue, but the handling of the modules.json as well as other modules as Normalize, Pooling, Transformers or StaticEmbedding should be handled in an unified way.

Fixes #732

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the documentation guidelines.
  • Did you write any new necessary tests? If applicable, did you include or update the insta snapshots?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

As that might imply that the user originally provided a local path
rather than a Hugging Face Hub ID, meaning that the `dense_paths`
variable won't be filled, meaning that we need to read those from
`modules.json`

Note that this is just a premature quick solution, ideally this should
be handled within `backends/src/lib.rs` rather than directly within the
`CandleBackend` as otherwise we end up duplicating a lot of unnecessary
code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TEI with local models don't load Dense layers

1 participant