from transformers import AutoTokenizer, AutoModelForSeq2SeqLM import torch model_id = 'charent/ChatLM-mini-Chinese' device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # 如果无法连接huggingface,打开