chatglm.cpp icon indicating copy to clipboard operation
chatglm.cpp copied to clipboard

编译后的模型和原始模型输出结果不一致

Open qianlir opened this issue 1 year ago • 2 comments

编译后和原版的chatglm2-6b,输出不一致。是因为q4_0参数导致的吗?请问具体怎么理解这个参数 python3 chatglm_cpp/convert.py -i THUDM/chatglm2-6b -t q4_0 -o chatglm2-ggml.bin

qianlir avatar Oct 25 '23 02:10 qianlir

个人理解,仅供参考。

大模型量化,是将大模型精简压缩了,相当于图片压缩。量化(压缩)后,内存(显存)占用少了,响应速度快了,但是回答精度就有所牺牲了。

chatglm_cpp/convert.py 的 q参数的数字越小,越精简。

jonsen avatar Oct 27 '23 23:10 jonsen

另外默认是开启采样的,会引入随机性,即使权重相同运行两次也会输出不一样的答案。

li-plus avatar Oct 29 '23 13:10 li-plus