BHARGAV REDDY commited on
Upload Evaluation/setup_and_run.sh with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768#!/usr/bin/env bash# =============================================================================# LUNA β Benchmark Runner (One Command)# Uses EleutherAI lm-evaluation-harness for standard LLM benchmarks.## USAGE:# bash Evaluation/setup_and_run.sh /path/to/model_dir# bash Evaluation/setup_and_run.sh /path/to/model_dir /path/to/tokenizer# bash Evaluation/setup_and_run.sh /path/to/model_dir /path/to/tokenizer "hellaswag,arc_easy"## EXAMPLES:# # Benchmark LUNA-100M# bash Evaluation/setup_and_run.sh out/pretrain/luna-100m/final## # Benchmark LUNA-300M# bash Evaluation/setup_and_run.sh out/pretrain/luna-300m/final## # Run specific tasks only# bash Evaluation/setup_and_run.sh out/pretrain/luna-300m/final Base/checkpoints/EleutherAI/pythia-160m "hellaswag,piqa,lambada_openai"## BENCHMARKS:# hellaswag, arc_easy, arc_challenge, piqa, winogrande,# openbookqa, boolq, lambada_openai# =============================================================================
set -e
MODEL_PATH="${1:?Usage: bash Evaluation/setup_and_run.sh /path/to/model_dir [tokenizer_path] [tasks]}"TOKENIZER="${2:-Base/checkpoints/EleutherAI/pythia-160m}"TASKS="${3:-hellaswag,arc_easy,arc_challenge,piqa,winogrande,openbookqa,boolq,lambada_openai}"
echo "=========================================="echo " LUNA β Benchmark Runner"echo " Model : $MODEL_PATH"echo " Tokenizer : $TOKENIZER"echo " Tasks : $TASKS"echo "=========================================="
# ββ 1. Install dependencies βββββββββββββββββββββββββββββββββββββββββββββββββββecho ""echo "[1/2] Installing lm-evaluation-harness..."
pip install -q --upgrade pippip install -q \ "lm-eval>=0.4.0" \ torch \ transformers \ accelerate \ psutil 2>/dev/null || true
echo " Done."
# ββ 2. Run benchmarks ββββββββββββββββββββββββββββββββββββββββββββββββββββββββecho ""echo "[2/2] Running benchmarks..."echo ""
python Evaluation/run_benchmarks.py \ --model_path "$MODEL_PATH" \ --tokenizer_path "$TOKENIZER" \ --tasks "$TASKS" \ --batch_size 16
echo ""echo "=========================================="echo " Benchmarks complete!"echo " Results saved in Evaluation/ directory"echo "=========================================="Evaluation/setup_and_run.shAdded+68