-
Notifications
You must be signed in to change notification settings - Fork 138
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 text embedding API example doc #710
Conversation
Signed-off-by: Yaliang Wu <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 2.x #710 +/- ##
=========================================
Coverage 84.34% 84.34%
Complexity 1052 1052
=========================================
Files 99 99
Lines 3833 3833
Branches 352 352
=========================================
Hits 3233 3233
Misses 450 450
Partials 150 150
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
We can trace this example model [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) to torchscript with two options: | ||
|
||
## 1.1 trace sentence transformers model | ||
If you have [`sentence-transformers`](https://pypi.org/project/sentence-transformers/) installed. You can trace this model directly: `SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think model = SentenceTransformer('all-MiniLM-L6-v2')
will trace the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about:
If you have sentence-transformers
installed. You can save this model directly: SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
and then trace the model using torchScipt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, sounds good
Signed-off-by: Yaliang Wu <[email protected]>
* add text embedding API example doc Signed-off-by: Yaliang Wu <[email protected]> * address comment Signed-off-by: Yaliang Wu <[email protected]> Signed-off-by: Yaliang Wu <[email protected]>
* add text embedding API example doc Signed-off-by: Yaliang Wu <[email protected]> * address comment Signed-off-by: Yaliang Wu <[email protected]> Signed-off-by: Yaliang Wu <[email protected]>
* add text embedding API example doc Signed-off-by: Yaliang Wu <[email protected]> * address comment Signed-off-by: Yaliang Wu <[email protected]> Signed-off-by: Yaliang Wu <[email protected]>
* add text embedding API example doc Signed-off-by: Yaliang Wu <[email protected]> * address comment Signed-off-by: Yaliang Wu <[email protected]> Signed-off-by: Yaliang Wu <[email protected]>
* add text embedding API example doc Signed-off-by: Yaliang Wu <[email protected]> * address comment Signed-off-by: Yaliang Wu <[email protected]> Signed-off-by: Yaliang Wu <[email protected]>
Signed-off-by: Yaliang Wu [email protected]
Description
Add text embedding API example doc
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.