Commit 209c176b authored by williamzhangNU's avatar williamzhangNU
Browse files

minor update

parent 5eb55ad5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -339,8 +339,8 @@ class QwenVLRolloutManger():
        prompt_with_chat_template = self.tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=False)
        # switch box_end and im_end so that the model can learn to generate <|im_end|>
        prompt_with_chat_template = prompt_with_chat_template.replace(
            f'{self.config.special_token_for_loss_mask[1]}{self.config.end_turn_token}',
            f'{self.config.end_turn_token}{self.config.special_token_for_loss_mask[1]}')
            f'{self.config.special_token_for_loss_mask[1]}{self.tokenizer.eos_token}',
            f'{self.tokenizer.eos_token}{self.config.special_token_for_loss_mask[1]}')
        return {
            "prompt": prompt_with_chat_template,
            "image_data": image_data,
+0 −1
Original line number Diff line number Diff line
@@ -198,5 +198,4 @@ rollout_manager:
  use_multi_turn_reward: True # for ablation study
  use_loss_mask: True # for ablation study
  special_token_for_loss_mask: ['<|box_start|>', '<|box_end|>']
  end_turn_token: '<|im_end|>'
  truncation: ${data.truncation}
 No newline at end of file