Poor Performance and High Resource Usage with Ollama Models in opencode #2770

Open
opened 2026-02-16 17:37:11 -05:00 by yindo · 2 comments
Owner

Originally created by @Siegurd01 on GitHub (Nov 10, 2025).

Description

Environment:

  • OS: Windows 10
  • GPU: NVIDIA GeForce RTX 3060 Mobile (6 GB)
  • Installation Method: Installed via choco install opencode
  • Model Used: hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M

Description:
When using Ollama models through opencode, the performance is significantly degraded compared to using the same model directly with Ollama. Specifically:

  • Token Generation Speed:

    • Ollama (direct): ~16 tokens/second
    • opencode: ~0.5 tokens/second or much slower
  • Resource Usage:

    • CPU and GPU usage are much higher than expected when running the same model via opencode, even though the performance is much worse.

OpenCode version

opencode v1.0.55

Steps to reproduce

  1. Install opencode via choco install opencode
  2. Run a large language model (hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M) using opencode
  3. Compare token generation speed and resource usage with direct Ollama usage
  4. Observe significantly lower performance and higher resource consumption

Screenshot and/or share link

Image

Even with the addition of a request from /opencode/src/session/prompt/qwen.txt, ollama gives 12 tokens per second, while opencode is around 0.5 or less.

Image

Is there a way to measure token speed in opencode?

Operating System

Windows 10

Terminal

PowerShell

Originally created by @Siegurd01 on GitHub (Nov 10, 2025). ### Description **Environment:** - **OS:** Windows 10 - **GPU:** NVIDIA GeForce RTX 3060 Mobile (6 GB) - **Installation Method:** Installed via `choco install opencode` - **Model Used:** hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M **Description:** When using Ollama models through opencode, the performance is significantly degraded compared to using the same model directly with Ollama. Specifically: - **Token Generation Speed:** - **Ollama (direct):** ~16 tokens/second - **opencode:** ~0.5 tokens/second or much slower - **Resource Usage:** - CPU and GPU usage are much higher than expected when running the same model via opencode, even though the performance is much worse. ### OpenCode version opencode v1.0.55 ### Steps to reproduce 1. Install opencode via `choco install opencode` 2. Run a large language model (hf.co/unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_M) using opencode 3. Compare token generation speed and resource usage with direct Ollama usage 4. Observe significantly lower performance and higher resource consumption ### Screenshot and/or share link <img width="788" height="603" alt="Image" src="https://github.com/user-attachments/assets/c13d38da-fe18-4c34-a628-59cac657a32a" /> Even with the addition of a request from /opencode/src/session/prompt/qwen.txt, ollama gives 12 tokens per second, while opencode is around 0.5 or less. <img width="1900" height="714" alt="Image" src="https://github.com/user-attachments/assets/819b5d0f-041d-418f-9f60-da7e500e1de9" /> Is there a way to measure token speed in opencode? ### Operating System Windows 10 ### Terminal PowerShell
yindo added the bug label 2026-02-16 17:37:11 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 10, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #811: Reports very slow text rendering and high CPU usage (25-30% idle, 200-300% when active) - similar resource usage concerns
  • #679: Reports 30-50% CPU usage per process that slows LLM responses to a crawl - directly matches your performance degradation symptoms
  • #805: Reports high CPU usage (~20%) compared to other implementations - similar resource efficiency concerns
  • #3189: Reports halting/freezing behavior specifically with qwen3-coder models - matches your Qwen model usage

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 10, 2025): This issue might be a duplicate of existing issues. Please check: - #811: Reports very slow text rendering and high CPU usage (25-30% idle, 200-300% when active) - similar resource usage concerns - #679: Reports 30-50% CPU usage per process that slows LLM responses to a crawl - directly matches your performance degradation symptoms - #805: Reports high CPU usage (~20%) compared to other implementations - similar resource efficiency concerns - #3189: Reports halting/freezing behavior specifically with qwen3-coder models - matches your Qwen model usage Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 11, 2025):

Idk how opencode could be affecting your token speed, maybe if you are doing openai compatible endpoint it buffers? Idk

@rekram1-node commented on GitHub (Nov 11, 2025): Idk how opencode could be affecting your token speed, maybe if you are doing openai compatible endpoint it buffers? Idk
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2770