[GH-ISSUE #7033] Using smaller context size shows CUDA error: CUBLAS_STATUS_NOT_INITIALIZED #30220

Closed
opened 2026-04-22 09:44:52 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @aamsur-933 on GitHub (Sep 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7033

What is the issue?

Helo, i have PC with NVIDIA 10GB Vram, i have installed ollama and deepseek-coder-v2:16b model on it, i will use continue.dev in my vscode to communicate with ollama.

i have problem when i set ctx size in the plugin to 4K like so "contextLength": 4096, with deepseek-coder-v2:16b i got CUDA error: CUBLAS_STATUS_NOT_INITIALIZED in ollama logs.
here is the logs from ollama:
ctx-4k.log

but, when i set bigger ctx size to 32K in the plugin like so "contextLength": 32768, the model will running without any error.
Screenshot from 2024-09-29 17-11-30
here is the logs:
ctx-32k.log

Is there any problem with my env?

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.3.12

Originally created by @aamsur-933 on GitHub (Sep 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7033 ### What is the issue? Helo, i have PC with NVIDIA 10GB Vram, i have installed ollama and **deepseek-coder-v2:16b** model on it, i will use continue.dev in my vscode to communicate with ollama. i have problem when i set ctx size in the plugin to 4K like so `"contextLength": 4096, ` with deepseek-coder-v2:16b i got `CUDA error: CUBLAS_STATUS_NOT_INITIALIZED` in ollama logs. here is the logs from ollama: [ctx-4k.log](https://github.com/user-attachments/files/17178823/ctx-4k.log) but, when i set bigger ctx size to 32K in the plugin like so `"contextLength": 32768, ` the model will running without any error. ![Screenshot from 2024-09-29 17-11-30](https://github.com/user-attachments/assets/c3f2cbef-a2c8-4443-93e0-62d3db467847) here is the logs: [ctx-32k.log](https://github.com/user-attachments/files/17178843/ctx-32k.log) Is there any problem with my env? ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.12
GiteaMirror added the bug label 2026-04-22 09:44:52 -05:00
Author
Owner

@rick-github commented on GitHub (Sep 29, 2024):

https://github.com/ollama/ollama/issues/6715#issuecomment-2339278048

<!-- gh-comment-id:2381303205 --> @rick-github commented on GitHub (Sep 29, 2024): https://github.com/ollama/ollama/issues/6715#issuecomment-2339278048
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#30220