Updates after testing

This commit is contained in:
2025-04-01 11:49:21 +00:00
parent 6f3d414d17
commit 130afbdd92
4 changed files with 28 additions and 11 deletions

View File

@@ -1,20 +1,36 @@
#!/bin/bash #!/bin/bash
add_to_environment() {
local path="$1"
# Check if the path is already in the environment file
if ! grep -q "$path" /etc/environment; then
# Get current PATH from environment file
current_path=$(grep "^PATH=" /etc/environment | cut -d'"' -f2)
if [ -z "$current_path" ]; then
# If PATH doesn't exist in the file, create it
echo "PATH=\"\$PATH:$path\"" >> /etc/environment
else
# Replace existing PATH line with updated one
sed -i "s|^PATH=.*|PATH=\"$path:$current_path\"|" /etc/environment
fi
fi
}
echo "Installing ITB tool..." echo "Installing ITB tool..."
python3 -m venv "/root/venvs/itb" python3 -m venv "/root/venvs/itb"
/root/venvs/itb/bin/pip install -e /root/sia/tools/itb/ /root/venvs/itb/bin/pip install -e /root/sia/tools/itb/
echo "PATH=\"/root/venvs/itb/bin/:\$PATH\"" > "/etc/profile.d/venv_itb.sh" add_to_environment "/root/venvs/itb/bin"
source "/etc/profile.d/venv_itb.sh"
echo "Installing Train tool..." echo "Installing Train tool..."
python3 -m venv "/root/venvs/train" python3 -m venv "/root/venvs/train"
/root/venvs/train/bin/pip install -e /root/sia/tools/train/ /root/venvs/train/bin/pip install -e /root/sia/tools/train/
/root/venvs/train/bin/ipython kernel install --name=train /root/venvs/train/bin/ipython kernel install --name=train
echo "PATH=\"/root/venvs/train/bin/:\$PATH\"" > "/etc/profile.d/venv_train.sh" add_to_environment "/root/venvs/train/bin"
source "/etc/profile.d/venv_train.sh"
echo "Installing SIA core..." echo "Installing SIA core..."
python3 -m venv "/root/venvs/sia" python3 -m venv "/root/venvs/sia"
/root/venvs/sia/bin/pip install -e /root/sia/ /root/venvs/sia/bin/pip install -e /root/sia/
echo "PATH=\"/root/venvs/sia/bin/:\$PATH\"" > "/etc/profile.d/venv_sia.sh" add_to_environment "/root/venvs/sia/bin"
source "/etc/profile.d/venv_sia.sh"
source "/etc/environment

View File

@@ -9,10 +9,11 @@ setup(
'aiohttp>=3.8.0', 'aiohttp>=3.8.0',
'bitsandbytes>=0.41.0', 'bitsandbytes>=0.41.0',
'dotenv-python>=0.0.1', 'dotenv-python>=0.0.1',
'flash-attn>=2.0.0',
'huggingface_hub>=0.16.0', 'huggingface_hub>=0.16.0',
'lxml>=4.9.0', 'lxml>=4.9.0',
'mistralai>=0.0.7',
'mistral-common>=1.0.0', 'mistral-common>=1.0.0',
'mistralai>=0.0.7',
'openai>=1.0.0', 'openai>=1.0.0',
'psutil>=5.9.0', 'psutil>=5.9.0',
'python-dotenv>=1.0.0', 'python-dotenv>=1.0.0',

View File

@@ -188,7 +188,7 @@ class Config:
parser.add_argument( parser.add_argument(
'--qwq-enable', '--qwq-enable',
action='store_true', action='store_true',
default=self._parse_bool_env('SIA_QWQ_ENABLED', True), # Enable by default default=self._parse_bool_env('SIA_QWQ_ENABLED', True),
help='Enable QwQ LLM engine (env: SIA_QWQ_ENABLED)' help='Enable QwQ LLM engine (env: SIA_QWQ_ENABLED)'
) )
parser.add_argument( parser.add_argument(
@@ -200,13 +200,13 @@ class Config:
parser.add_argument( parser.add_argument(
'--qwq-temperature', '--qwq-temperature',
type=float, type=float,
default=float(os.getenv('SIA_QWQ_TEMPERATURE', '0.1')), default=float(os.getenv('SIA_QWQ_TEMPERATURE', '0.6')),
help='QwQ temperature (default: 0.1, env: SIA_QWQ_TEMPERATURE)' help='QwQ temperature (default: 0.1, env: SIA_QWQ_TEMPERATURE)'
) )
parser.add_argument( parser.add_argument(
'--qwq-token-limit', '--qwq-token-limit',
type=int, type=int,
default=int(os.getenv('SIA_QWQ_TOKEN_LIMIT', '0')), default=int(os.getenv('SIA_QWQ_TOKEN_LIMIT', '4096')),
help='QwQ token limit (0 for model default, env: SIA_QWQ_TOKEN_LIMIT)' help='QwQ token limit (0 for model default, env: SIA_QWQ_TOKEN_LIMIT)'
) )

View File

@@ -10,7 +10,7 @@ setup(
install_requires=[ install_requires=[
'accelerate>=0.25.0', 'accelerate>=0.25.0',
'bitsandbytes>=0.41.1', 'bitsandbytes>=0.45.0',
'black>=22.0.0', 'black>=22.0.0',
'datasets>=2.14.6', 'datasets>=2.14.6',
'einops>=0.7.0', 'einops>=0.7.0',