Skip to content

Commit 3b6101d

Browse files
committed
Removed redundant reasoning tag stripping from litellm model
1 parent 086bd3e commit 3b6101d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/lighteval/models/endpoints/litellm_model.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# SOFTWARE.
2222

2323
import logging
24-
import re
2524
import time
2625
from concurrent.futures import ThreadPoolExecutor
2726
from json import JSONDecodeError
@@ -233,12 +232,6 @@ def __call_api(self, prompt, return_logits, max_new_tokens, num_samples, stop_se
233232
response = litellm.completion(**kwargs)
234233
content = response.choices[0].message.content
235234

236-
if content and "<think>" in content:
237-
logger.debug(f"Removing <think> tags from response: {content}")
238-
response.choices[0].message.content = re.sub(
239-
r"<think>.*?</think>", "", content, flags=re.DOTALL
240-
).strip()
241-
242235
return response
243236
except litellm.BadRequestError as e:
244237
if "message" in e.__dict__:

0 commit comments

Comments
 (0)