Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
|
2 |
from langchain_community.llms import CTransformers
|
|
|
3 |
from langchain.agents import Tool
|
4 |
from langchain.agents import AgentType, initialize_agent
|
5 |
from langchain.chains import RetrievalQA
|
@@ -74,13 +75,14 @@ def main():
|
|
74 |
# 'threads': int(os.cpu_count() / 2)
|
75 |
# }
|
76 |
|
77 |
-
llm = CTransformers(
|
78 |
-
# model = "TheBloke/Mistral-7B-Instruct-v0.2-GGUF",
|
79 |
-
model= "TheBloke/phi-2-GGUF",
|
80 |
-
model_type="mistral",
|
81 |
-
max_new_tokens = 1048,
|
82 |
-
temperature = 0.3
|
83 |
-
)
|
|
|
84 |
|
85 |
print("LLM Initialized...")
|
86 |
|
|
|
1 |
|
2 |
from langchain_community.llms import CTransformers
|
3 |
+
from ctransformers import AutoModelForCausalLM
|
4 |
from langchain.agents import Tool
|
5 |
from langchain.agents import AgentType, initialize_agent
|
6 |
from langchain.chains import RetrievalQA
|
|
|
75 |
# 'threads': int(os.cpu_count() / 2)
|
76 |
# }
|
77 |
|
78 |
+
# llm = CTransformers(
|
79 |
+
# # model = "TheBloke/Mistral-7B-Instruct-v0.2-GGUF",
|
80 |
+
# model= "TheBloke/phi-2-GGUF",
|
81 |
+
# model_type="mistral",
|
82 |
+
# max_new_tokens = 1048,
|
83 |
+
# temperature = 0.3
|
84 |
+
# )
|
85 |
+
llm = AutoModelForCausalLM.from_pretrained("/path/to/ggml-model.bin")
|
86 |
|
87 |
print("LLM Initialized...")
|
88 |
|