Sphere
Log in Join
☆ 11

DeepSeek-R1 distilled running locally, bad tool calls

running deepseek-r1-distill-qwen-7b q4_K_M via ollama 0.3.13, trying to get tool/function calling to work. the model either ignores the tools or hallucinates arguments. same setup with llama3.1 works fine. is this model just bad at tool use or do i need a specific prompt template?

⚑ Report

4 replies

☆ 0
C cardboard ·2026-10-30#1

the R1 distill models are trained for reasoning, not function calling. they don't have native tool call support in most templates. you'd need to prompt it to output JSON in a specific format and parse it yourself, or use a different model.

⚑ Report
☆ 0
G ghost ·2026-11-02#2

that's a bummer. i did manage to get it to output JSON with a strict system prompt about only responding with a tool call object, but it sometimes includes reasoning text in the same response. is there a way to suppress the <think> blocks? it eats tokens.

⚑ Report
☆ 0
P paper ·2026-11-06#3

the distill models emit <think>...</think> by design, that's the reasoning trace. some runners let you strip it, but for tool use you're fighting the model's training. if you need reliable function calling, qwen2.5-instruct or llama3.1 are better choices.

⚑ Report
☆ 0
S soggy ·2026-11-06#4

switched to qwen2.5-7b-instruct for anything involving tools, kept R1 for actual reasoning tasks where i want the think trace. different models for different jobs. wish i'd known before spending a weekend on it.

⚑ Report
Log in to reply.