optimum icon indicating copy to clipboard operation
optimum copied to clipboard

Fix incorrect names for usage blenderbot for causallm

Open eaidova opened this issue 1 year ago • 3 comments

What does this PR do?

in general case, number of encoder and decoder layers in seq2seq models like blenderbot, m2m, bart can be different from encoder. As example blenderbot-3b - https://huggingface.co/facebook/blenderbot-3B/blob/main/config.json If we use these models for causal lm case, where used only decoder, output names can be incorrect due to unequal number of layers in decoder and encoder (that is used for preparing inputs if model has past_key_values).

This PR fixes this issue

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ ] Did you make sure to update the documentation with your changes?
  • [ ] Did you write any new necessary tests?

Who can review?

@fxmarty, @echarlaix, @JingyaHuang, @michaelbenayoun

eaidova avatar Jun 03 '24 14:06 eaidova

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.

Can you run make style and push please. It is necessary to format the code.

michaelbenayoun avatar Jun 06 '24 08:06 michaelbenayoun

@fxmarty @michaelbenayoun @echarlaix is it possible to merge these changes? We are blocked to convert and optimize this model on openvino side, thanks!

eaidova avatar Jun 25 '24 07:06 eaidova

@eaidova Done thank you, apology for the delay!

fxmarty avatar Jul 01 '24 09:07 fxmarty