From 352d006176dcd4278f0661325ddcc7b8bffa0756 Mon Sep 17 00:00:00 2001 From: thammuio Date: Thu, 4 Jan 2024 16:13:28 -0500 Subject: [PATCH] fix: constant variables --- app/utils/constants.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/app/utils/constants.py b/app/utils/constants.py index 7c5a846..a4441eb 100644 --- a/app/utils/constants.py +++ b/app/utils/constants.py @@ -1,26 +1,5 @@ -# Define Model flow based on Selection +GEN_AI_MODEL_REPO = "TheBloke/Llama-2-13B-chat-GGUF" +GEN_AI_MODEL_FILENAME = "llama-2-13b-chat.Q5_0.gguf" +ENGINE_NAME = "llama-2-13b-chat" -def get_model_variables(model_name): - if model_name == "llama-2-13b-chat": - ENGINE_NAME = "llama-2-13b-chat" - GEN_AI_MODEL_REPO = "TheBloke/Llama-2-13B-chat-GGUF" - GEN_AI_MODEL_FILENAME = "llama-2-13b-chat.Q5_0.gguf" - EMBEDDING_MODEL_REPO = "sentence-transformers/all-mpnet-base-v2" - elif model_name == "llama-2-70b-chat": - # Set the variables for the llama-2-70b-chat model - ENGINE_NAME = "llama-2-70b-chat" - GEN_AI_MODEL_REPO = "TheBloke/Llama-2-70B-chat-GGUF" # Replace with actual repo - GEN_AI_MODEL_FILENAME = "llama-2-70b-chat.Q5_0.gguf" # Replace with actual filename - EMBEDDING_MODEL_REPO = "sentence-transformers/all-mpnet-base-v2" # Replace with actual repo - elif model_name == "llama-2-7b-chat": - # Set the variables for the llama-2-7b-chat model - ENGINE_NAME = "llama-2-7b-chat" - GEN_AI_MODEL_REPO = "TheBloke/Llama-2-7B-chat-GGUF" # Replace with actual repo - GEN_AI_MODEL_FILENAME = "llama-2-7b-chat.Q5_0.gguf" # Replace with actual filename - EMBEDDING_MODEL_REPO = "sentence-transformers/all-mpnet-base-v2" # Replace with actual repo - else: - raise ValueError(f"Unsupported model: {model_name}") - - return ENGINE_NAME, GEN_AI_MODEL_REPO, GEN_AI_MODEL_FILENAME, EMBEDDING_MODEL_REPO -# Usage -ENGINE_NAME, GEN_AI_MODEL_REPO, GEN_AI_MODEL_FILENAME, EMBEDDING_MODEL_REPO = get_model_variables("llama-2-13b-chat") \ No newline at end of file +EMBEDDING_MODEL_REPO = "sentence-transformers/all-mpnet-base-v2" \ No newline at end of file