Skip to content

Commit 19bea4e

Browse files
author
ochafik
committed
tell DS R1 not to overthink (weather test)
1 parent ae9d581 commit 19bea4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/server/tests/unit/test_tool_call.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def test_completion_without_tool_call_slow(template_name: str, n_predict: int, t
251251

252252
@pytest.mark.slow
253253
@pytest.mark.parametrize("hf_repo,template_override", [
254+
("bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF:Q4_K_M", None),
254255
("bartowski/c4ai-command-r7b-12-2024-GGUF:Q4_K_M", ("CohereForAI/c4ai-command-r7b-12-2024", "tool_use")),
255256
("bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M", None),
256257
("bartowski/gemma-2-2b-it-GGUF:Q4_K_M", None),
@@ -266,10 +267,11 @@ def test_completion_without_tool_call_slow(template_name: str, n_predict: int, t
266267
])
267268
def test_weather(hf_repo: str, template_override: Tuple[str, str | None] | None):
268269
global server
270+
n_predict = 512
269271
server.n_slots = 1
270272
server.jinja = True
271273
server.n_ctx = 8192
272-
server.n_predict = 512
274+
server.n_predict = n_predict
273275
server.model_hf_repo = hf_repo
274276
server.model_hf_file = None
275277
if template_override:
@@ -278,8 +280,9 @@ def test_weather(hf_repo: str, template_override: Tuple[str, str | None] | None)
278280
assert os.path.exists(server.chat_template_file), f"Template file {server.chat_template_file} does not exist. Run `python scripts/get_chat_template.py {template_hf_repo} {template_variant} > {server.chat_template_file}` to download the template."
279281
server.start(timeout_seconds=TIMEOUT_SERVER_START)
280282
res = server.make_request("POST", "/chat/completions", data={
281-
"max_tokens": 256,
283+
"max_tokens": n_predict,
282284
"messages": [
285+
{"role": "system", "content": "You are a chatbot that uses tools/functions. Dont overthink things."},
283286
{"role": "user", "content": "What is the weather in Istanbul?"},
284287
],
285288
"tools": [WEATHER_TOOL],

0 commit comments

Comments
 (0)