Skip to content

The past_key_value in MPLUG doesn't seem to work. #94

Description

@lizhou-cs

I change the code like this, and it didn't work.

        kv_cache = None
        prev_tokens = set()
        max_length = int(max_length)
        for step in range(max_length):
            dec_feat_seq = self.model(alive_seq,
                                         encoder_hidden_states = src_features,
                                         encoder_attention_mask = attention_mask,
                                         past_key_values = None,
                                         use_cache = False,
                                         return_dict = True,
                                         reduction = 'none')
            kv_cache = dec_feat_seq.past_key_values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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