Hanlp使用过程中报错:
RuntimeError: The MPS backend is supported on MacOS 12.3+.Current OS version can be queried using sw_vers
环境:
macOS :12.4
PyTorch : 1.12.0
Transformers : 4.20.1
原因应该是版本不兼容问题
解决方法:
PyTorch 1.12.0 -> 1.11.0
Transformers 4.20.1 -> 4.19.4
然后重启电脑刷新缓存