Skip to content

[Question] qwen2_5_dpo got an incorrect input_id. #215

@cageyoko

Description

@cageyoko

Required prerequisites

Questions

Hello, I don't know if this is an error in the example about qwen2_5_dpo.

response_length:

return_dict['better_response_lens'] = len(
            self.tokenize(meta_info['better_response'], add_special_tokens=False)['input_ids'][0]
        )

input_id: "'re looking for sites that feature weird sexual fantasies, there are many to choose from. Try Fet Life, Dark Play, Fantasy Forum, Kinky Monkeys, Funky Kink, Weird Fantasies, Sex and Death, or The Tenth House. You can also search the web for specific fetishes or fantasies that interest you, or look for message boards and forums where you can share your own weird fantasies. Additionally, many erotica or adult novels feature extreme or unique fantasies, so you could look for these at your local bookstore or through online retailers.<|im_end|>\n"
input_id = raw_input_id[-response_length:].unsqueeze(0)

Because of Qwen's chat_template, two additional tokens are appended, which causes an offset in the input_id retrieved via response_length.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions