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

Hugging Face Model for Embedding #54

Closed
dmolina2 opened this issue Mar 15, 2021 · 2 comments
Closed

Hugging Face Model for Embedding #54

dmolina2 opened this issue Mar 15, 2021 · 2 comments

Comments

@dmolina2
Copy link

  • Contextualized Topic Models version: 1.8.2
  • Python version: 3.6
  • Operating System: Windows 10

Description

Hey guys... I'm trying to use CTM's for Topic Modeling answers of a survey. This texts are in spanish so I want to use a spanish pre trained HuggingFace Model as it says in the repository: "In general, our package should be able to support all the models described in the sentence transformer package and in HuggingFace."

Could you give an example how to export and use for embedding an HugginFace model like, for example:

https://huggingface.co/dccuchile/bert-base-spanish-wwm-uncased

It'd incredible if I can export this model, since it works very good in other NLP tasks.

Thanks!

@vinid
Copy link
Contributor

vinid commented Mar 16, 2021

Hello @dmolina2! :)

Yes, you can! and you can have this in both CombinedTM and ZeroShotTM.

The only thing you need to do is to use the Spanish model when you create the embeddings:

qt = TopicModelDataPreparation("dccuchile/bert-base-spanish-wwm-uncased")

You can refer to this link to check how these embeddings are created!

@vinid vinid closed this as completed Mar 17, 2021
@dmolina2
Copy link
Author

dmolina2 commented Apr 8, 2021

Thanks! Very clear!

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

No branches or pull requests

2 participants