conda create -n transformers_env python=3.10
conda activate transformers_env
pip install transformers
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install -U ipywidgets
安装好这些依赖,然后去 https://huggingface.co/models?pipeline_tag=text-generation&sort=trending
找到你看上的模型,按照模型介绍页面搞个模型的运行脚本,基本上就能跑起来了。