Download inference/run_rows.sh from FlyaiLab/FlyAI-Decision-27B: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/FlyaiLab/FlyAI-Decision-27B/resolve/main/inference/run_rows.sh
- Command line
-
hf download hf://FlyaiLab/FlyAI-Decision-27B/inference/run_rows.sh
-
curl -L -o run_rows.sh https://huggingface.co/FlyaiLab/FlyAI-Decision-27B/resolve/main/inference/run_rows.sh
1.37 kB
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| MODEL="${1:?usage: bash run_rows.sh MODEL ROWS_JSONL OUTPUT_DIR}" | |
| ROWS="${2:?rows path required}" | |
| OUTPUT="${3:?output directory required}" | |
| # Preserve the caller's interpretation of paths before entering the release. | |
| [[ "$MODEL" = /* ]] || MODEL="$PWD/$MODEL" | |
| [[ "$ROWS" = /* ]] || ROWS="$PWD/$ROWS" | |
| [[ "$OUTPUT" = /* ]] || OUTPUT="$PWD/$OUTPUT" | |
| cd "$ROOT" | |
| export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES-0}" | |
| [[ -d "$MODEL" ]] || { printf 'Model directory not found: %s\n' "$MODEL" >&2; exit 1; } | |
| [[ -f "$ROWS" ]] || { printf 'Rows file not found: %s\n' "$ROWS" >&2; exit 1; } | |
| unset PYTHONHOME PYTHONPATH LD_LIBRARY_PATH | |
| export VLLM_NO_USAGE_STATS=1 TOKENIZERS_PARALLELISM=false OMP_NUM_THREADS=4 | |
| if [[ -e "$OUTPUT/results.jsonl" ]]; then | |
| printf 'Use a fresh output directory; results.jsonl already exists.\n' >&2 | |
| exit 1 | |
| fi | |
| mkdir -p "$OUTPUT" | |
| source ./runtime_env.sh | |
| uv run --frozen --managed-python python selfcheck.py --output "$OUTPUT" | |
| uv run --frozen --managed-python python -m decision_index run \ | |
| --engine decision_vllm_engine:DecisionVllmEngine \ | |
| --option "model=$MODEL" --option "codebook=$ROOT/choice-codebook.json" \ | |
| --option max_model_len=32768 --option max_num_seqs=64 --option "audit_dir=$OUTPUT" \ | |
| --rows "$ROWS" --out "$OUTPUT" --edition 0.3 --compact | |