Skip to content

Commit

Permalink
Hacks to the max
Browse files Browse the repository at this point in the history
  • Loading branch information
lewtun committed Feb 21, 2025
1 parent 345a8dc commit 3abd1e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ To install `uv`, follow the [UV Installation Guide](https://docs.astral.sh/uv/ge
uv venv openr1 --python 3.11 && source openr1/bin/activate && uv pip install --upgrade pip
```

> [!TIP]
> For Hugging Face cluster users, add `export UV_LINK_MODE=copy` to your `.bashrc` to suppress cache warnings from `uv`
Next, install vLLM and FlashAttention:

```shell
Expand Down
10 changes: 8 additions & 2 deletions slurm/evaluate.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ NUM_GPUS=$(nvidia-smi -L | wc -l)
if [ "$TENSOR_PARALLEL" = "True" ]; then
# use TP to shard model across NUM_GPUS
export VLLM_WORKER_MULTIPROC_METHOD=spawn
MODEL_ARGS="pretrained=$MODEL_ID,revision=$MODEL_REVISION,trust_remote_code=$TRUST_REMOTE_CODE,dtype=bfloat16,tensor_parallel_size=$NUM_GPUS,max_model_length=32768,gpu_memory_utilization=0.8,generation_parameters={max_new_tokens: 32768,temperature: 0}"
# FIXME: lighteval is broken on `main`so we need to manually pass the generation params
MODEL_ARGS="pretrained=$MODEL_ID,revision=$MODEL_REVISION,trust_remote_code=$TRUST_REMOTE_CODE,dtype=bfloat16,tensor_parallel_size=$NUM_GPUS,max_model_length=32768,gpu_memory_utilization=0.8,generation_parameters={max_new_tokens:32768,temperature:0.0}"
else
MODEL_ARGS="pretrained=$MODEL_ID,revision=$MODEL_REVISION,trust_remote_code=$TRUST_REMOTE_CODE,dtype=bfloat16,data_parallel_size=$NUM_GPUS,max_model_length=32768,gpu_memory_utilization=0.8,generation_parameters={max_new_tokens: 32768,temperature: 0}"
MODEL_ARGS="pretrained=$MODEL_ID,revision=$MODEL_REVISION,trust_remote_code=$TRUST_REMOTE_CODE,dtype=bfloat16,data_parallel_size=$NUM_GPUS,max_model_length=32768,gpu_memory_utilization=0.8,generation_parameters={max_new_tokens:32768,temperature:0.0}"
fi

# FIXME: enable sampling for pass@1 (remove once this is fixed on lighteval side)
if [ "$TASK_NAME" = "lcb" ]; then
MODEL_ARGS="${MODEL_ARGS/temperature:0.0/temperature:0.7}"
fi

LM_EVAL_REPO_ID="open-r1/open-r1-eval-leaderboard"
Expand Down

0 comments on commit 3abd1e5

Please sign in to comment.