1717from transformers import AutoModelForCausalLM , AutoModelForSeq2SeqLM , AutoTokenizer
1818
1919from trl import CPOConfig , CPOTrainer
20- from trl .trainer .utils import SIMPLE_CHAT_TEMPLATE
2120
2221from .testing_utils import TrlTestCase , require_peft
2322
@@ -33,15 +32,13 @@ def setup_method(self):
3332 model_id = "trl-internal-testing/tiny-T5ForConditionalGeneration"
3433 self .t5_model = AutoModelForSeq2SeqLM .from_pretrained (model_id )
3534 self .t5_tokenizer = AutoTokenizer .from_pretrained (model_id )
36- self .t5_tokenizer .chat_template = SIMPLE_CHAT_TEMPLATE
3735
3836 @pytest .mark .parametrize (
3937 "name, loss_type, config_name" ,
4038 [
4139 ("qwen" , "sigmoid" , "standard_preference" ),
4240 ("t5" , "hinge" , "standard_implicit_prompt_preference" ),
4341 ("qwen" , "ipo" , "conversational_preference" ),
44- ("t5" , "ipo" , "conversational_implicit_prompt_preference" ),
4542 ("qwen" , "simpo" , "standard_preference" ),
4643 ("t5" , "simpo" , "standard_implicit_prompt_preference" ),
4744 ("qwen" , "hinge" , "conversational_preference" ),
0 commit comments