Skip to content

Conversation

@jonathanpv
Copy link
Contributor

@jonathanpv jonathanpv commented Apr 10, 2024

This PR addressed the below issue, using the examples from @xenova.

  • Closes [feat] Add binary & scalar embedding quantization support to Transformers.js #681

  • Let me know if you'd like any changes to this, perhaps we can make another options object in javascript like a QuantizationOptions so it's obvious which parameters are grouped together logically

  • I also added a texts === undefined check since I ran into an issue earlier where I was accidentally not passing in any texts and was met with an unfriendly error.

For some reason though I don't get the same similarity numbers as Xenova did on his example but the numbers are at least similar

It may also be beneficial to bring in https://github.com/ashvardanian/SimSIMD for this but haven't ran any benchmarks within browser context yet

Copy link
Collaborator

@xenova xenova left a comment

Choose a reason for hiding this comment

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

Thanks so much!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@xenova xenova left a comment

Choose a reason for hiding this comment

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

nits

@xenova xenova merged commit f71ee32 into huggingface:main Apr 10, 2024
@xenova
Copy link
Collaborator

xenova commented Apr 10, 2024

Great job! Thanks for the PR! 🔥

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.

[feat] Add binary & scalar embedding quantization support to Transformers.js

3 participants