[求助帖]LLM-多模态理论+案例讲解-24.10.23-林希老师,做MINIGPT实验报错,如图。请老师帮助解决 #354

Open
opened 2024-11-06 10:52:56 +08:00 by cygaoni · 2 comments
No description provided.
  1. cuda和pytorch的版本不一致,需要重新配置cuda和pytorch。

Cuda 11.8
pytorch==2.0.0

  1. 检查pytorch是否可以调用GPU
import torch

# 检查是否有可用的 CUDA 设备
if torch.cuda.is_available():
   print("CUDA is available. PyTorch can use GPU.")
   print("Number of GPUs available: ", torch.cuda.device_count())
   print("Name of the CUDA device: ", torch.cuda.get_device_name(0))
else:
   print("CUDA is not available. PyTorch can only use CPU.")
1. cuda和pytorch的版本不一致,需要重新配置cuda和pytorch。 Cuda 11.8 pytorch==2.0.0 2. 检查pytorch是否可以调用GPU ``` import torch # 检查是否有可用的 CUDA 设备 if torch.cuda.is_available(): print("CUDA is available. PyTorch can use GPU.") print("Number of GPUs available: ", torch.cuda.device_count()) print("Name of the CUDA device: ", torch.cuda.get_device_name(0)) else: print("CUDA is not available. PyTorch can only use CPU.") ```

代码显示PyTorch不包含CUDA支持的版本;建议更换PyPorch。

也可以尝试使用pip或conda命令安装,确保选择正确的CUDA版本。

image

代码显示PyTorch不包含CUDA支持的版本;建议更换PyPorch。 也可以尝试使用pip或conda命令安装,确保选择正确的CUDA版本。 ![image](/attachments/74d6ef2d-d3a0-437a-ad11-2050df761d44)
519 KiB
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#354
No description provided.