jedisct1's picture
Add model card and configuration
2b5444a verified
Raw
History Blame Contribute Delete
889 Bytes
#!/bin/zsh
set -euo pipefail
support_root=${0:A:h}
model_root=${support_root:h}
models_root=${model_root:h}
base_path=${OMLX_BASE_PATH:-$model_root/.omlx}
cache_dir=${OMLX_CACHE_DIR:-$base_path/cache}
api_key=${OMLX_API_KEY:-omlx}
port=${OMLX_PORT:-8766}
mkdir -p "$cache_dir"
if [[ ! -f "$base_path/model_settings.json" ]]; then
cp "$support_root/model_settings.json" "$base_path/model_settings.json"
fi
export OMLX_QWEN4_PLE_MODE=mmap
export OMLX_QWEN4_PLE_MODEL_PATH="$model_root"
exec /bin/zsh "$support_root/with-omlx-python" -m omlx.cli serve \
--model-dir "$models_root" \
--host 127.0.0.1 \
--port "$port" \
--max-concurrent-requests 1 \
--memory-guard balanced \
--paged-ssd-cache-dir "$cache_dir" \
--paged-ssd-cache-max-size 128GB \
--hot-cache-max-size 0 \
--initial-cache-blocks 1 \
--no-hf-cache \
--base-path "$base_path" \
--api-key "$api_key"