Files
trinity-rl/serving/judge/serve.sh
T
carsten 84d7fe4166 Trinity-Mini RL: envs, production recipe, and run scripts
Migrated from the rl-toolkit snapshot deployed for the 2026-09-15 production
run (toolkit e191cf1 plus uncommitted changes). PRIME-RL is now a submodule on
dphn/prime-rl@trinity; the v0 envs, parity tests, OPD experiment, and old
configs are not carried over.
2026-10-14 12:39:23 +00:00

23 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# One BF16 Gemma judge replica on a single GPU, listening on localhost:8100+GPU.
# Usage: serve.sh GPU_INDEX (VLLM_API_KEY must be set)
set -euo pipefail
export PATH=/opt/trinity-judge-venv/bin:$PATH
export CUDA_VISIBLE_DEVICES=${1:?GPU index required}
: "${VLLM_API_KEY:?}"
export VLLM_WORKER_MULTIPROC_METHOD=spawn
export VLLM_USE_FLASHINFER_SAMPLER=0
export OMP_NUM_THREADS=4
ulimit -n 65535
export TRITON_CACHE_DIR=/tmp/trinity-judge-triton-$CUDA_VISIBLE_DEVICES
export TORCHINDUCTOR_CACHE_DIR=/tmp/trinity-judge-inductor-$CUDA_VISIBLE_DEVICES
exec vllm serve google/gemma-4-26B-A4B-it \
--revision 4d7ae4984b7db7de8f8457170b3f1a419ee76d52 \
--served-model-name google/gemma-4-26B-A4B-it \
--host 127.0.0.1 --port "$((8100 + CUDA_VISIBLE_DEVICES))" \
--tensor-parallel-size 1 --dtype bfloat16 --max-model-len 32768 \
--gpu-memory-utilization 0.92 --max-num-seqs 256 \
--max-num-batched-tokens 16384 --async-scheduling \
--enable-prefix-caching --enable-chunked-prefill --language-model-only \
--reasoning-parser gemma4 --tool-call-parser gemma4 --enable-auto-tool-choice