THUDM / CodeGeeX2

CodeGeeX2: A More Powerful Multilingual Code Generation Model
https://codegeex.cn
Apache License 2.0
7.62k stars 533 forks source link

不知道为什么无法生成代码 #21

Open fanwuyu-web opened 1 year ago

fanwuyu-web commented 1 year ago

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results. Setting pad_token_id to eos_token_id:2 for open-end generation.

Stanislas0 commented 1 year ago

这个warining并不影响生成。无法生成代码可能是精度问题导致,看下显卡是否支持bf16,不支持的话需要使用fp16,在模型调用时加上.half(),参考https://github.com/THUDM/CodeGeeX2/blob/main/docs/zh/inference_zh.md#%E5%A4%9A%E7%B2%BE%E5%BA%A6%E9%87%8F%E5%8C%96%E6%8E%A8%E7%90%86

fanwuyu-web commented 1 year ago

好的,我试试,谢啦

xd-Nanan commented 10 months ago

好的,我试试,谢啦

您好,请问修改精度后可以了嘛?我现在单卡推理没有问题,但多卡推理就不输出结果,精度修改也没有作用。。