vlf-silkie / VLFeedback

66 stars 2 forks source link

How could I specify the GPU index for the DPO training? #7

Closed linhaojia13 closed 6 months ago

linhaojia13 commented 6 months ago

How could I specify the GPU index for the DPO training? I have tried using CUDA_VISIBLE_DEVICES=2,3,4,5 as well as appending localhost: 2,3,4,5 in the command, but none of these methods seem to work.

linhaojia13 commented 6 months ago

I figure out it. The CUDA_VISIBLE_DEVICES should be set in the begin of file run_dpo.py, just like:

import os
os.environ["CUDA_VISIBLE_DEVICES"] = "2,3,4,5"
import json
import logging