Skip to content

OUTPUT_POSTFIX in preprocess function can cause infinitively generation. #87

Description

@binhmed2lab

if role.upper() == "ASSISTANT": input_messages.append(msg+ OUTPUT_POSTFIX)

should be

if role.upper() == "ASSISTANT": input_messages.append(msg + " " + OUTPUT_POSTFIX)
For example, 3</s> is completely different from 3 </s>. The former string doesn't return the end of sequence token. It's mean the EOS token never appears in training process, so leading to infinitively generation in inference.

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