#!/bin/bash
# Frozen candidate: long-context acceptance must be consulted before promotion.
set -euo pipefail
export CUDA_VISIBLE_DEVICES=GPU-f4a988cb-c310-b618-5a9c-4462d4d33add
export CUDA_DEVICE_ORDER=PCI_BUS_ID OMP_NUM_THREADS=8 TOKENIZERS_PARALLELISM=false
export HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1
unset SGLANG_FORCE_FP8_MARLIN SGLANG_FP8_IGNORED_LAYERS
exec /home/lab/venvs/sglang/bin/python -m sglang.launch_server \
  --model-path /home/lab/models/ornith-modular/full-int8-text \
  --tokenizer-path /home/lab/models/Ornith-1.5-9B-original \
  --served-model-name ornith-sglang --host 127.0.0.1 --port "${ORNITH_PORT:-8130}" \
  --quantization compressed-tensors --dtype bfloat16 --kv-cache-dtype fp8_e5m2 \
  --context-length 262144 --max-total-tokens 786432 --mem-fraction-static 0.98 \
  --max-running-requests 3 --max-mamba-cache-size 15 --chunked-prefill-size 2048 \
  --attention-backend triton --mamba-backend triton \
  --tool-call-parser qwen3_coder --reasoning-parser qwen3 \
  --cuda-graph-max-bs-decode 3 --cuda-graph-backend-prefill disabled
