Mac使用MPS加速,第二轮对话时程序会报错退出。

#2
by eyaeya - opened

环境

电脑环境:MacBook Pro M3 Max 64GB统一内存
所用模型:rwkv_v5.2_7B_role_play_16k.pth
所用后端:RWKV-Runner(macOS版本)

复现步骤

1、在Runner中配置模型,选择Strategy为MPS并启动。(成功)

1.png

2、载入模型。(成功)

2.png

3、测试对话(第一轮)(成功)

3.png

4、测试对话(第二轮),程序报错退出。(失败)

4.png

报错退出前,终端提示:

/AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:126: failed assertion [MPSNDArrayDescriptor sliceDimension:withSubrange:] error: the range subRange.start + subRange.length does not fit in dimension[2] (256)'
[1] 2862 abort /opt/homebrew/Cellar/[email protected]/3.10.13_1/bin/python3.10 --port 8000 --host

补充:
在Github上的讨论链接
https://github.com/josStorer/RWKV-Runner/issues/250

Sign up or log in to comment