VLMEvalKit
VLMEvalKit copied to clipboard
cogvlm2-llama3-chat-19B设置device_map="auto"报错
如题,推理时单卡放不下整个模型,但是为vlmeval/vlm/cogvlm.py中的model = AutoModelForCausalLM.from_pretrained添加device_map="auto"报错
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto").eval()
提示不在同一个device RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:5 and cuda:6!