[问题/Issue] 章节3.3:torch 默认下载cpu版本
Author: Vocal-mapCreated Sep 6, 2026Updated Sep 9, 2026
Labelsdocumentation
1. 遇到问题的章节 / Affected Chapter
chapter3.3
2. 问题类型 / Issue Type
依赖问题 / Dependency Issue
3. 具体问题描述 / Problem Description
pip install transformers torch 所安装的 torch 为 cpu 版本;与下方# 设置设备,优先使用GPU 不符
4. 问题重现材料 / Reproduction Materials
无
5. 补充信息 / Additional Information
应参考pytorch官网,使用
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu132
安装cuda版本的torch
确认事项 / Verification
- 我已阅读过相关章节的文档 / I have read the relevant chapter documentation
- 我已搜索过现有的Issues,确认此问题未被报告 / I have searched existing Issues and confirmed this hasn't been reported
- 我已尝试过基本的故障排除(如重启、重新安装依赖等) / I have tried basic troubleshooting (restart, reinstall dependencies, etc.)
Source: datawhalechina/hello-agents