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

ValueError when using NLLB model #41

Open
jcuenod opened this issue Jul 7, 2023 · 2 comments
Open

ValueError when using NLLB model #41

jcuenod opened this issue Jul 7, 2023 · 2 comments

Comments

@jcuenod
Copy link

jcuenod commented Jul 7, 2023

I tried using Meta's facebook/nllb-200-distilled-600M model, but it seems that hidden_states is not being set on the self.emb_model output (line 65). I'm getting:

ValueError: You have to specify either decoder_input_ids or decoder_inputs_embeds

Any suggestions for how to use NLLB?

@pdufter
Copy link
Member

pdufter commented Jul 9, 2023

Hi @jcuenod simalign mainly supports encoder-only models (like mBERT, XLM-R). Seems that for this model you would need to specify e.g., decoder_input_ids. A quick solution could be to feed sentence A to the encoder and sentence B to the decoder and then apply simalign to the similarity matrix. Feel free to create a PR to add this capability.

@jcuenod
Copy link
Author

jcuenod commented Jul 10, 2023

Thanks, I'll take a look at submitting a 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

No branches or pull requests

2 participants