Skip to content

Commit

Permalink
top_p/check_hybrid (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
corradodebari authored Nov 15, 2024
1 parent 162f087 commit a86b4d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
14 changes: 7 additions & 7 deletions app/src/modules/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def ll_models():
"openai_compat": False,
"context_length": 127072,
"temperature": [0.3, 0.3, 0.0, 2.0],
"top_p": [0.75, 0.75, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [100, 100, 1, 4096],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -108,7 +108,7 @@ def ll_models():
"openai_compat": True,
"context_length": 4191,
"temperature": [1.0, 1.0, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 4096],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -121,7 +121,7 @@ def ll_models():
"openai_compat": True,
"context_length": 127072,
"temperature": [1.0, 1.0, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 4096],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -134,7 +134,7 @@ def ll_models():
"openai_compat": True,
"context_length": 127072,
"temperature": [1.0, 1.0, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 8191],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -147,7 +147,7 @@ def ll_models():
"openai_compat": True,
"context_length": 127072,
"temperature": [1.0, 1.0, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 4095],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -160,7 +160,7 @@ def ll_models():
"openai_compat": False,
"context_length": 127072,
"temperature": [0.2, 0.2, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 28000],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand All @@ -173,7 +173,7 @@ def ll_models():
"openai_compat": False,
"context_length": 127072,
"temperature": [0.2, 0.2, 0.0, 2.0],
"top_p": [0.9, 0.9, 0.0, 1.0],
"top_p": [1.0, 1.0, 0.0, 1.0],
"max_tokens": [256, 256, 1, 28000],
"frequency_penalty": [0.0, 0.0, -1.0, 1.0],
"presence_penalty": [0.0, 0.0, -2.0, 2.0],
Expand Down
8 changes: 3 additions & 5 deletions app/src/modules/st_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,9 @@ def create_zip(state_dict_filt, provider):
# Check if the conf is full ollama or openai, currently supported for springai export
def check_hybrid_conf(session_state_json):

embedding_models = meta.embedding_models()
chat_models = meta.ll_models()

embModel = embedding_models.get(session_state_json["rag_params"].get("model"))
chatModel = chat_models.get(session_state_json["ll_model"])
chatModel = state.ll_model_config.get(session_state_json["ll_model"])
embModel = state.embed_model_config.get(state.rag_params["model"])

logger.info("Model: %s",session_state_json["ll_model"])
logger.info("Embedding Model embModel: %s",embModel)
logger.info("Chat Model: %s",chatModel)
Expand Down

0 comments on commit a86b4d3

Please sign in to comment.