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

Add huggingface dedicated provider support #1157

Merged
merged 12 commits into from
Jun 12, 2024
Merged

Conversation

Yuqi-Du
Copy link
Contributor

@Yuqi-Du Yuqi-Du commented Jun 10, 2024

since provider huggingfaceDedicated does not require model, modelName field in createCollectionCommand will be changed as allow null. Other providers still need model specified, so validations move down to createCollectionCommandResolver.

For huggingFace dedicated, the endpoint we use is:

We do not require modelName, but dimension is still needed, and will error out is not provided.
Also, parameters: endpointName, regionName, cloudName are needed to compute the url.

Fixes #1145

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@Yuqi-Du Yuqi-Du requested a review from a team as a code owner June 10, 2024 20:42
Copy link
Contributor

@tatu-at-datastax tatu-at-datastax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I was wondering if the 2 new checks (for not requiring model name; for requiring dimensions) could be based only on embedding provider configuration and not require hard-coded checks for newly added provider.

Copy link
Contributor

@tatu-at-datastax tatu-at-datastax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added minor comments.

@Yuqi-Du Yuqi-Du merged commit 0a66145 into main Jun 12, 2024
4 checks passed
@Yuqi-Du Yuqi-Du deleted the yuqi/huggingface-dedicated branch June 12, 2024 00:30
@a-effort
Copy link

a-effort commented Jun 12, 2024

@Yuqi-Du , here is content for the form fields for Hugging Face — Dedicated create collection:

Label: User access token
Placeholder: Select user access token

Label: Embedding model
Placeholder: Select embedding model
Helper text under form field: Model to use to generate embeddings

Label: Endpoint name
Placeholder: Add endpoint name
Helper text under form field: Add the first part of the dedicated endpoint URL

Label: Region name
Placeholder: Add region name
Helper text under form field: Add the second part of the dedicated endpoint URL

Label: Cloud provider the dedicated endpoint is deployed to
Placeholder: Add cloud name
Helper text under form field: Add the third part of the dedicated endpoint URL

Label: Dimensions
Placeholder: Add a number between 2 and 3072
Helper text under form field: Vector length in your dataset (between 2 and 3072)

HuggingFace - dedicated

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.

Hugging Face Serverless arbitrary model choice
4 participants