tell DS R1 not to overthink (weather test)
This commit is contained in:
parent
ae9d5812a7
commit
19bea4ecc3
1 changed files with 5 additions and 2 deletions
|
@ -251,6 +251,7 @@ def test_completion_without_tool_call_slow(template_name: str, n_predict: int, t
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
@pytest.mark.parametrize("hf_repo,template_override", [
|
@pytest.mark.parametrize("hf_repo,template_override", [
|
||||||
|
("bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF:Q4_K_M", None),
|
||||||
("bartowski/c4ai-command-r7b-12-2024-GGUF:Q4_K_M", ("CohereForAI/c4ai-command-r7b-12-2024", "tool_use")),
|
("bartowski/c4ai-command-r7b-12-2024-GGUF:Q4_K_M", ("CohereForAI/c4ai-command-r7b-12-2024", "tool_use")),
|
||||||
("bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M", None),
|
("bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M", None),
|
||||||
("bartowski/gemma-2-2b-it-GGUF:Q4_K_M", None),
|
("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
|
||||||
])
|
])
|
||||||
def test_weather(hf_repo: str, template_override: Tuple[str, str | None] | None):
|
def test_weather(hf_repo: str, template_override: Tuple[str, str | None] | None):
|
||||||
global server
|
global server
|
||||||
|
n_predict = 512
|
||||||
server.n_slots = 1
|
server.n_slots = 1
|
||||||
server.jinja = True
|
server.jinja = True
|
||||||
server.n_ctx = 8192
|
server.n_ctx = 8192
|
||||||
server.n_predict = 512
|
server.n_predict = n_predict
|
||||||
server.model_hf_repo = hf_repo
|
server.model_hf_repo = hf_repo
|
||||||
server.model_hf_file = None
|
server.model_hf_file = None
|
||||||
if template_override:
|
if template_override:
|
||||||
|
@ -278,8 +280,9 @@ def test_weather(hf_repo: str, template_override: Tuple[str, str | None] | None)
|
||||||
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."
|
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."
|
||||||
server.start(timeout_seconds=TIMEOUT_SERVER_START)
|
server.start(timeout_seconds=TIMEOUT_SERVER_START)
|
||||||
res = server.make_request("POST", "/chat/completions", data={
|
res = server.make_request("POST", "/chat/completions", data={
|
||||||
"max_tokens": 256,
|
"max_tokens": n_predict,
|
||||||
"messages": [
|
"messages": [
|
||||||
|
{"role": "system", "content": "You are a chatbot that uses tools/functions. Dont overthink things."},
|
||||||
{"role": "user", "content": "What is the weather in Istanbul?"},
|
{"role": "user", "content": "What is the weather in Istanbul?"},
|
||||||
],
|
],
|
||||||
"tools": [WEATHER_TOOL],
|
"tools": [WEATHER_TOOL],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue