There was an error while loading. Please reload this page.
1 parent 67ba285 commit edb58bbCopy full SHA for edb58bb
1 file changed
qwen3_embed/text/gguf_embedding.py
@@ -114,7 +114,9 @@ def __init__(
114
115
from llama_cpp import Llama
116
117
- n_gpu = -1 if (cuda is True or cuda == Device.CUDA) else 0
+ # AUTO/-1: offload all layers to GPU if available, fallback to CPU
118
+ # CPU/False/0: force CPU only
119
+ n_gpu = 0 if (cuda is False or cuda == Device.CPU) else -1
120
self._llm = Llama(
121
model_path=str(model_path),
122
embedding=True,
0 commit comments