Skip to content

Commit

Permalink
chore: improve chat_batch_size and embedding_batch_size in CLI tool
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <[email protected]>
  • Loading branch information
apepkuss committed Jul 30, 2024
1 parent f084ce8 commit 1f5eb49
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions gaianet
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,6 @@ start() {
chat_ctx_size=$(awk -F'"' '/"chat_ctx_size":/ {print $4}' config.json)
# parse batch size for chat model
chat_batch_size=$(awk -F'"' '/"chat_batch_size":/ {print $4}' config.json)
if [ -z "$chat_batch_size" ]; then
chat_batch_size=$chat_ctx_size
fi
# parse prompt type for chat model
prompt_type=$(awk -F'"' '/"prompt_template":/ {print $4}' config.json)
# parse system prompt for chat model
Expand Down Expand Up @@ -703,9 +700,6 @@ start() {
embedding_ctx_size=$(awk -F'"' '/"embedding_ctx_size":/ {print $4}' config.json)
# parse batch size for embedding model
embedding_batch_size=$(awk -F'"' '/"embedding_batch_size":/ {print $4}' config.json)
if [ -z "$embedding_batch_size" ]; then
embedding_batch_size=$embedding_ctx_size
fi
# parse port for LlamaEdge API Server
llamaedge_port=$(awk -F'"' '/"llamaedge_port":/ {print $4}' config.json)
# parse qdrant limit
Expand Down Expand Up @@ -995,9 +989,6 @@ start() {
chat_ctx_size=$(awk -F'"' '/"chat_ctx_size":/ {print $4}' config.json)
# parse batch size for chat model
chat_batch_size=$(awk -F'"' '/"chat_batch_size":/ {print $4}' config.json)
if [ -z "$chat_batch_size" ]; then
chat_batch_size=$chat_ctx_size
fi
# parse prompt type for chat model
prompt_type=$(awk -F'"' '/"prompt_template":/ {print $4}' config.json)
# parse reverse prompt for chat model
Expand All @@ -1023,9 +1014,6 @@ start() {
embedding_ctx_size=$(awk -F'"' '/"embedding_ctx_size":/ {print $4}' config.json)
# parse batch size for embedding model
embedding_batch_size=$(awk -F'"' '/"embedding_batch_size":/ {print $4}' config.json)
if [ -z "$embedding_batch_size" ]; then
embedding_batch_size=$embedding_ctx_size
fi
# parse port for LlamaEdge API Server
llamaedge_port=$(awk -F'"' '/"llamaedge_port":/ {print $4}' config.json)
# check port
Expand Down

0 comments on commit 1f5eb49

Please sign in to comment.