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 a FastText encoder #1047

Open
Vincent-Maladiere opened this issue Aug 30, 2024 · 4 comments
Open

Add a FastText encoder #1047

Vincent-Maladiere opened this issue Aug 30, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Vincent-Maladiere
Copy link
Member

Vincent-Maladiere commented Aug 30, 2024

Problem Description

When encoding long text on small datasets, https://arxiv.org/abs/2312.09634 has shown that embeddings improve prediction performance over string models like MinHashEncoder. More recently, CARTE performed well using FastText to initialize column names and category embeddings.

Feature Description

Create an encoder that downloads FastText weights, loads them during fit, and applies them during transform. Note that FastText dependencies are only ["pybind11>=2.2", "numpy"].

Alternative Solutions

Instead, we could create a transformer using SentenceTransformer, which would download weights from HuggingFace. The issue is that although these models provide more powerful embeddings than FastText, this solution would require installing torch, transformers, and finally sentence-transformers. Also, running these models is markedly slower than using FastText.

Additional Context

No response

@Vincent-Maladiere Vincent-Maladiere added the enhancement New feature or request label Aug 30, 2024
@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Aug 30, 2024 via email

@koaning
Copy link

koaning commented Sep 2, 2024

Isn't FastText archived at this point? This is why I dropped it in embetter.

https://github.com/facebookresearch/fastText

@Vincent-Maladiere
Copy link
Member Author

@koaning as long as there is no numpy 3, we should be fine 😉

More seriously, if we are fine with an optional torch dependency and its CI, I'm all for it.

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Sep 5, 2024 via email

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

3 participants