Skip to content

Regarding prompt length in cfg #7

Description

@Green-Kedia

Here - https://github.com/ML-GSAI/SMDM/blob/583aa4716d17728dbb825aec6c24a121164d616a/eval/gen_model_answer.py#L88C17-L88C48

In this snippet:

if cfg_scale > 0.:
    un_x = x.clone()
    un_x[:, :prompt.shape[1]] = dim

Should we rely on prompt.shape[1] to determine the prompt length, given that prompts can be of variable length? Or would it be better to use a different way to compute the prompt length?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions