mindspore-lab / mindnlp

Easy-to-use and high-performance NLP and LLM framework based on MindSpore, compatible with models and datasets of 🤗Huggingface.
https://mindnlp.cqu.ai/
Apache License 2.0
675 stars 180 forks source link

fix cross_entropy bug when logits has inf #1633

Closed lvyufeng closed 1 month ago

lvyufeng commented 1 month ago

nn.functional.cross_entropy will output nan when inputs has inf, becasue the compute of smoth_labeling

lvyufeng commented 1 month ago

ops.unique lack some arguments on CPU