@@ -71,7 +71,7 @@ def __init__(
7171 config : Optional [MTBenchConfig ] = None ,
7272 debug : bool = False ,
7373 annotator_model : str = "gpt-4o-mini-2024-07-18" ,
74- max_tokens : Optional [int ] = 1024
74+ max_tokens : Optional [int ] = 1024 ,
7575 logger : Optional [logging .Logger ] = None ,
7676 system_instruction : Optional [str ] = None ,
7777 ):
@@ -87,13 +87,13 @@ def __init__(
8787 """
8888 super ().__init__ (logger = logger , system_instruction = system_instruction )
8989 self .base_path = Path (base_path )
90+ if getattr (self , "config" , None ) is None :
91+ self .config = MTBenchConfig (
92+ judge_model = annotator_model ,
93+ )
94+ else :
95+ self .config = config
9096 self .config .max_new_token = max_tokens if max_tokens is not None else 1024
91- if annotator_model == "auto" :
92- annotator_model = "gpt-4"
93- if config :
94- print (f"Warning: Overwriting config.judge_model = { annotator_model } " )
95- config .judge_model = annotator_model
96- self .config = config or MTBenchConfig (judge_model = annotator_model )
9797 self .debug = debug
9898
9999 # Setup paths
@@ -116,7 +116,6 @@ def get_model_answers(self, model: LM, model_id: str, questions: List[Dict[str,
116116 max_turns = max (len (q ["turns" ]) for q in questions )
117117 answer_file = self .answer_dir / f"{ model_id } .jsonl"
118118
119- self .config .max_new_token = self .max_new_token
120119 # Process each turn
121120 for turn_num in range (max_turns ):
122121 self .logger .info (f"Processing Turn { turn_num + 1 } " )
0 commit comments