Update chain_setup.py
Browse files- chain_setup.py +9 -8
chain_setup.py
CHANGED
@@ -14,15 +14,16 @@ def load_llm():
|
|
14 |
local_dir_use_symlinks=False
|
15 |
)
|
16 |
|
|
|
17 |
llm = LlamaCpp(
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
)
|
25 |
-
|
26 |
return llm
|
27 |
|
28 |
def build_conversational_chain(vectorstore):
|
|
|
14 |
local_dir_use_symlinks=False
|
15 |
)
|
16 |
|
17 |
+
# Pass an empty grammar file to bypass Jinja template parsing.
|
18 |
llm = LlamaCpp(
|
19 |
+
model_path=model_file,
|
20 |
+
flash_attn=False,
|
21 |
+
n_ctx=2048,
|
22 |
+
n_batch=512,
|
23 |
+
chat_format="chatml",
|
24 |
+
grammar_path="empty.jinja" # ensure this file exists and is empty
|
25 |
+
)
|
26 |
+
|
27 |
return llm
|
28 |
|
29 |
def build_conversational_chain(vectorstore):
|