Closed Mararesliu closed 5 months ago
CUDA_VISIBLE_DEVICES=4 python demo_textmonkey.py -c model_path
Maybe you can add "CUDA_VISIBLE_DEVICES=4".
device_map="cuda:4" input_ids=input_ids.to("cuda:4"), attention_mask=attention_mask.to("cuda:4"),
Alternatively, you can modify the code here.
The first way not change too. The second way demo can no start ,rasie error
Is your GPU functioning properly? Can you run other models on "cuda:4"? I don't think this is an issue with our code.
It works, many thinks.
I use os.environ["CUDA_VISIBLE_DEVICES"] = "4" or env to run demo.py, always default use 0, How can i use other gpu card, Is there any i can manully set it?