Update 'Supportgpt/supportgpt_mistral.py'

This commit is contained in:
2024-01-08 05:03:41 +00:00
rodzic c8a9508c3d
commit 3a484ac222
+2 -2
Wyświetl plik
@@ -60,12 +60,12 @@ def load_llm():
# max_new_tokens = 512, # max_new_tokens = 512,
# temperature = 0.5 # temperature = 0.5
# ) # )
llm = CTransformers(model=r"D:\Aiproject\models\mistral-7b-instruct-v0.1.Q4_K_M.gguf",gpu_layers=100,config={'max_new_tokens': 128, 'temperature': 0.01}) llm = CTransformers(model=r"TheBloke/Mistral-7B-Instruct-v0.1-GGUF",gpu_layers=100,config={'max_new_tokens': 128, 'temperature': 0.01})
return llm return llm
#QA Model Function #QA Model Function
def qa_bot(): def qa_bot():
embeddings = HuggingFaceEmbeddings(model_name=r"D:\Aiproject\models\sentence_tranformer\all-MiniLM-L6-v2", embeddings = HuggingFaceEmbeddings(model_name=r"sentence-transformers/all-MiniLM-L6-v2",
model_kwargs={'device': 'cpu'}) model_kwargs={'device': 'cpu'})
db = FAISS.load_local(DB_FAISS_PATH, embeddings) db = FAISS.load_local(DB_FAISS_PATH, embeddings)
llm = load_llm() llm = load_llm()