Skip to content

Commit

Permalink
chore: improve the format of ubatch fields added to config.json
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss committed Feb 7, 2025
1 parent 16e05e4 commit e666c63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,28 +387,28 @@ if [ "$upgrade" -eq 1 ]; then
if ! grep -q '"chat_batch_size":' $gaianet_base_dir/config.json; then
# Prepend the field to the beginning of the JSON object
sed_in_place '2i\
"chat_batch_size": "16",
"chat_batch_size": "16",
' "$gaianet_base_dir/config.json"
fi

if ! grep -q '"chat_ubatch_size":' $gaianet_base_dir/config.json; then
# Prepend the field to the beginning of the JSON object
sed_in_place '2i\
"chat_ubatch_size": "16",
"chat_ubatch_size": "16",
' "$gaianet_base_dir/config.json"
fi

if ! grep -q '"embedding_batch_size":' $gaianet_base_dir/config.json; then
# Prepend the field to the beginning of the JSON object
sed_in_place '2i\
"embedding_batch_size": "512",
"embedding_batch_size": "512",
' "$gaianet_base_dir/config.json"
fi

if ! grep -q '"embedding_ubatch_size":' $gaianet_base_dir/config.json; then
# Prepend the field to the beginning of the JSON object
sed_in_place '2i\
"embedding_ubatch_size": "512",
"embedding_ubatch_size": "512",
' "$gaianet_base_dir/config.json"
fi

Expand Down

0 comments on commit e666c63

Please sign in to comment.