[GH-ISSUE #4453] Ollama + sentence-transformers with torch cuda #64819

Open
opened 2026-05-03 18:53:35 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @qsdhj on GitHub (May 15, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4453

What is the issue?

Hi,

I use ollama together with the intfloat/multilingual-e5-base sentence-transformer in langchain and llamaIndex in python.

If I use the torch version without CUDA everything works as expected, just my embeddings are created slow.
With the torch cuda version installed this way:
grafik

As soon as I loaded the sentence-transformer in my python script the weird behaviour starts.
The first prompt to a model in ollama is working normal (takes a few seconds). From the second prompt onwards my GPU is on 100% load for a few minutes, than I get the response from the llm.

This happens with the llamaindex / langchain API in python and with the cli.
If I terminate my python script and restart ollama its working normal again.

I use a Laptop with Windows 11
11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz 2.50 GHz,
32GB Ram
NVIDIA RTX A3000 6GB

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.1.37

Originally created by @qsdhj on GitHub (May 15, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4453 ### What is the issue? Hi, I use ollama together with the `intfloat/multilingual-e5-base` sentence-transformer in langchain and llamaIndex in python. If I use the torch version without CUDA everything works as expected, just my embeddings are created slow. With the torch cuda version installed this way: ![grafik](https://github.com/ollama/ollama/assets/166700412/206aa478-64bf-4b23-8876-f2fbe44c61f5) As soon as I loaded the sentence-transformer in my python script the weird behaviour starts. The first prompt to a model in ollama is working normal (takes a few seconds). From the second prompt onwards my GPU is on 100% load for a few minutes, than I get the response from the llm. This happens with the llamaindex / langchain API in python and with the cli. If I terminate my python script and restart ollama its working normal again. I use a Laptop with Windows 11 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz 2.50 GHz, 32GB Ram NVIDIA RTX A3000 6GB ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.37
GiteaMirror added the bugapi labels 2026-05-03 18:53:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#64819