Download scripts/run_lm_eval.sh from sambit9238/Inkling-2-Mini-NVFP4-M2: direct link, hf CLI and curl.
- Browser
- Download file 1.87 kB
-
https://huggingface.co/sambit9238/Inkling-2-Mini-NVFP4-M2/resolve/main/scripts/run_lm_eval.sh
- Command line
-
hf download hf://sambit9238/Inkling-2-Mini-NVFP4-M2/scripts/run_lm_eval.sh
-
curl -L -o run_lm_eval.sh https://huggingface.co/sambit9238/Inkling-2-Mini-NVFP4-M2/resolve/main/scripts/run_lm_eval.sh
1.87 kB
| # IFEval, GSM8K (cot), MMLU-Pro subset via lm-eval local-chat-completions against the running vLLM server. | |
| # env: TAG (results label), SERVED_NAME, PORT, NUM_CONCURRENT, MAX_GEN_TOKS (default 32768; the old 8192 cap left | |
| # answers empty), REASONING_EFFORT (default low, sent as chat_template_kwargs), MMLU_LIMIT, TASKS, SKIP_LM_EVAL, LM_EVAL_PY | |
| # Seeds: lm-eval defaults (0,1234,1234,1234), temperature=0, as in the SenseNova runs; override with SEED="0,1234,1234,1234". | |
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| if [[ "${SKIP_LM_EVAL:-0}" == "1" || -f "$ROOT/results/.skip_lm_eval" ]]; then | |
| echo "skipping lm-eval" | |
| exit 0 | |
| fi | |
| TAG="${TAG:-official}" | |
| PY="${LM_EVAL_PY:-$ROOT/.venv-eval/bin/python}" | |
| OUT="$ROOT/results/lm_eval/$TAG" | |
| NUM_CONCURRENT="${NUM_CONCURRENT:-8}" | |
| MAX_GEN_TOKS="${MAX_GEN_TOKS:-32768}" | |
| export REASONING_EFFORT="${REASONING_EFFORT:-low}" | |
| mkdir -p "$OUT" | |
| export HF_HUB_DISABLE_IMPLICIT_TOKEN=1 | |
| run_tasks() { | |
| local tasks="$1" | |
| echo "lm-eval tag=$TAG concurrent=$NUM_CONCURRENT max_gen_toks=$MAX_GEN_TOKS effort=$REASONING_EFFORT tasks=$tasks" | |
| "$PY" "$ROOT/scripts/lm_eval_pinned.py" run --model local-chat-completions \ | |
| --model_args "model=${SERVED_NAME:-inkling},base_url=http://localhost:${PORT:-8000}/v1/chat/completions,num_concurrent=${NUM_CONCURRENT},max_retries=8,tokenized_requests=False,timeout=3600" \ | |
| --apply_chat_template \ | |
| --tasks "$tasks" \ | |
| --gen_kwargs "temperature=0,max_gen_toks=${MAX_GEN_TOKS}" \ | |
| ${SEED:+--seed "$SEED"} \ | |
| --limit "$( [[ $tasks == mmlu_pro ]] && echo "${MMLU_LIMIT:-25}" || echo 300 )" \ | |
| --log_samples \ | |
| --output_path "$OUT" | |
| } | |
| # One harness invocation per task so a later crash still keeps GSM8K/IFEval JSON. | |
| for task in ${TASKS:-gsm8k_cot ifeval mmlu_pro}; do | |
| run_tasks "$task" || echo "lm-eval task=$task failed; continuing" | |
| done | |