[GH-ISSUE #5991] Tool calls not allowing other quantized mode except default #3748

Closed
opened 2026-04-12 14:33:29 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @cxfcxf on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5991

What is the issue?

so the default llama3.1 works but llama3.1:8b-instruct-q8_0 does not

Error: 400, {"error":"llama3.1:8b-instruct-q8_0 does not support tools"}

OS

WSL2

GPU

Nvidia

CPU

AMD

Ollama version

0.3.0

Originally created by @cxfcxf on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5991 ### What is the issue? so the default llama3.1 works but `llama3.1:8b-instruct-q8_0` does not ```bash Error: 400, {"error":"llama3.1:8b-instruct-q8_0 does not support tools"} ``` ### OS WSL2 ### GPU Nvidia ### CPU AMD ### Ollama version 0.3.0
GiteaMirror added the bug label 2026-04-12 14:33:29 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

The initial release of the llama3.1 models was with a template that didn't support tools. That's been updated, if you re-pull the model it should work.

$ curl -s localhost:11434/v1/chat/completions -d '{"model": "llama3.1:8b-instruct-q8_0","tools":[{"type":"function","function": {}}], "messages": [{"role":"user","content":"weather in zurich"}], "stream": false}' | jq
{
  "id": "chatcmpl-210",
  "object": "chat.completion",
  "created": 1722026608,
  "model": "llama3.1:8b-instruct-q8_0",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "tool_calls": [
          {
            "id": "call_txrhyqmw",
            "type": "function",
            "function": {
              "name": "get_weather",
              "arguments": "{\"city\":\"Zurich\"}"
            }
          }
        ]
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 127,
    "completion_tokens": 19,
    "total_tokens": 146
  }
}
<!-- gh-comment-id:2253481614 --> @rick-github commented on GitHub (Jul 26, 2024): The initial release of the llama3.1 models was with a template that didn't support tools. That's been updated, if you re-pull the model it should work. ``` $ curl -s localhost:11434/v1/chat/completions -d '{"model": "llama3.1:8b-instruct-q8_0","tools":[{"type":"function","function": {}}], "messages": [{"role":"user","content":"weather in zurich"}], "stream": false}' | jq { "id": "chatcmpl-210", "object": "chat.completion", "created": 1722026608, "model": "llama3.1:8b-instruct-q8_0", "system_fingerprint": "fp_ollama", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_txrhyqmw", "type": "function", "function": { "name": "get_weather", "arguments": "{\"city\":\"Zurich\"}" } } ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 127, "completion_tokens": 19, "total_tokens": 146 } } ```
Author
Owner

@cxfcxf commented on GitHub (Jul 26, 2024):

The initial release of the llama3.1 models was with a template that didn't support tools. That's been updated, if you re-pull the model it should work.

$ curl -s localhost:11434/v1/chat/completions -d '{"model": "llama3.1:8b-instruct-q8_0","tools":[{"type":"function","function": {}}], "messages": [{"role":"user","content":"weather in zurich"}], "stream": false}' | jq
{
  "id": "chatcmpl-210",
  "object": "chat.completion",
  "created": 1722026608,
  "model": "llama3.1:8b-instruct-q8_0",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "tool_calls": [
          {
            "id": "call_txrhyqmw",
            "type": "function",
            "function": {
              "name": "get_weather",
              "arguments": "{\"city\":\"Zurich\"}"
            }
          }
        ]
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 127,
    "completion_tokens": 19,
    "total_tokens": 146
  }
}

that worked, thanks!

<!-- gh-comment-id:2253490271 --> @cxfcxf commented on GitHub (Jul 26, 2024): > The initial release of the llama3.1 models was with a template that didn't support tools. That's been updated, if you re-pull the model it should work. > > ``` > $ curl -s localhost:11434/v1/chat/completions -d '{"model": "llama3.1:8b-instruct-q8_0","tools":[{"type":"function","function": {}}], "messages": [{"role":"user","content":"weather in zurich"}], "stream": false}' | jq > { > "id": "chatcmpl-210", > "object": "chat.completion", > "created": 1722026608, > "model": "llama3.1:8b-instruct-q8_0", > "system_fingerprint": "fp_ollama", > "choices": [ > { > "index": 0, > "message": { > "role": "assistant", > "content": "", > "tool_calls": [ > { > "id": "call_txrhyqmw", > "type": "function", > "function": { > "name": "get_weather", > "arguments": "{\"city\":\"Zurich\"}" > } > } > ] > }, > "finish_reason": "stop" > } > ], > "usage": { > "prompt_tokens": 127, > "completion_tokens": 19, > "total_tokens": 146 > } > } > ``` that worked, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3748