linux系统运行chatglm2-6b的model = AutoModel.from_pretrained("ChatGLM2-6B", trust_remote_code=True).to('mps')时,报错modulenotfounderror:no module named ‘transformers.generation’
问题点: transformers版本问题,推荐版本4.28.1
同时代码改成:
model = AutoModel.from_pretrained("THUDM\ChatGLM-6B", trust_remote_code=True).float()