Skip to content

**kwargs not passed through methods of RoFormer models #46143

@ir2718

Description

@ir2718

Hi,

when working with RoFormer models, I've noticed the **kwargs option is not handled correctly. Most classes take in **kwargs but do not pass them further into the model. For example:

encoder_outputs = self.encoder(
embedding_output,
attention_mask=attention_mask,
encoder_hidden_states=encoder_hidden_states,
encoder_attention_mask=encoder_attention_mask,
past_key_values=past_key_values,
use_cache=use_cache,
output_attentions=output_attentions,
output_hidden_states=output_hidden_states,
return_dict=return_dict,
)
This is very annoying since I want to implement a custom attention and send needed inputs through **kwargs.

The fix is trivial and I would be happy to make a PR for this if the members agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions