Skip to content

RuntimeError: The size of tensor a (812) must match the size of tensor b (6300) at non-singleton dimension 0 #33

Description

@zapqqqwe

generated_ids = model.generate(**inputs, max_new_tokens=32,)为什么推理的时候报错,但是添加use_cache=False就可以不报错呢,,下面的报错

        outputs_cd = self(
            **model_inputs_cd,
            return_dict=True,
            output_attentions=output_attentions_wo_img,
            output_hidden_states=output_hidden_states_wo_img,
        )

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