Spaces:
Runtime error
Runtime error
Update src/core/cognitive_engine.py
Browse files
src/core/cognitive_engine.py
CHANGED
@@ -4,14 +4,14 @@ import json
|
|
4 |
|
5 |
class CognitiveEngine:
|
6 |
def __init__(self):
|
7 |
-
# Use
|
8 |
self.model = AutoModelForCausalLM.from_pretrained(
|
9 |
"TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF",
|
10 |
model_file="tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf",
|
11 |
model_type="llama",
|
12 |
-
gpu_layers=
|
13 |
context_length=2048,
|
14 |
-
threads=
|
15 |
)
|
16 |
self.knowledge_file = "knowledge/state.json"
|
17 |
self.load_knowledge()
|
|
|
4 |
|
5 |
class CognitiveEngine:
|
6 |
def __init__(self):
|
7 |
+
# Use CPU-only inference for compatibility
|
8 |
self.model = AutoModelForCausalLM.from_pretrained(
|
9 |
"TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF",
|
10 |
model_file="tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf",
|
11 |
model_type="llama",
|
12 |
+
gpu_layers=0, # CPU-only mode
|
13 |
context_length=2048,
|
14 |
+
threads=4
|
15 |
)
|
16 |
self.knowledge_file = "knowledge/state.json"
|
17 |
self.load_knowledge()
|