[Bug] AttributeError: module ‘torch’ has no attribute ‘frombuffer’ 这类问题一般出现在load pretrained model 的时候,即.from_pretrained()函数。 已知‘frombuffer’属性只有在torch2.0之后才有。如何在不改变当前环境的torcch版本的情况下修正bug,以下是亲测的通用解法: