Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding API endpoint to the TextEncoder? #1204

Open
Vincent-Maladiere opened this issue Dec 17, 2024 · 0 comments
Open

Adding API endpoint to the TextEncoder? #1204

Vincent-Maladiere opened this issue Dec 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Vincent-Maladiere
Copy link
Member

Problem Description

A lot of people are using embedding models behind API, like OpenAI. I think enabling this through the TextEncoder makes sense.

Advantages

  • Access to more powerful and diverse embedding models
  • No need to install pytorch, download a heavy model and run it locally
  • This results in a faster fit, notwithstanding the IO overhead.
  • We already have a token mechanism to stay consistent with HuggingFace Hub, so we don't need extra engineering for this.

Limitations

  • Having a token becomes mandatory
  • Storing embedding results is important to be cost-efficient. This could trigger us to think about caching results with e.g. joblib, even for the current version of the TextEncoder.

WDYT?

Feature Description

We could detect that the passed path is an API URL –or introduce a new parameter, but I guess checking for an API existence is fairly straightforward.

Alternative Solutions

No response

Additional Context

No response

@Vincent-Maladiere Vincent-Maladiere added the enhancement New feature or request label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant