Skip to content

Regarding prompt length in cfg #7

@Green-Kedia

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?

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