Closed estherche113 closed 6 months ago
Does anyone know whether the random Seed must be changed every time or can be fixed at a value?
可以固定,关于你描述的重复100次,是什么意思呢
可以固定,关于你描述的重复100次,是什么意思呢
模型会开始重复一条句子八百余次直到突然结束,耗时超过40分钟。并没有发现报错信息 以下是模型的生成内容(中间重复部分省略):
2023施政报告主要涉及以下几个方面:
1. 维护“一国两制”原则和保障国家安全:报告提出要推进《基本法》第23条立法工作,以维护国家主权、安全和发展利益。
2. 设立国家安全展览馆:报告提出在2024年设立国家安全展览馆,以增强国家安全意识,提高民众的国家安全意识。
3. 加强爱国教育:报告提出在2024年设立香港战争抵抗和海岸防御博物馆,以及中国文化交流办公室,以推广爱国教育。
4. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
5. 提升网络安全保护:报告提出在2024年将网络安全立法引入立法会,以保护关键基础设施的网络安全。
6. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
7. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
……
862. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
863. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
864. 提升政府效能:报告强调要推进结果导向文化,建立以行动和结果为导向的政府,并加强部门间的合作和团队精神。
865. 提升政府效能:报告强调要推进结果导向
哦,那你尝试尝试在repetition_penalty调到1.2( 在composite demo中可以实现 ),如果你要在其他demo,你需要按照这个demo中的方式修改代码
哦,那你尝试尝试在repetition_penalty调到1.2( 在composite demo中可以实现 ),如果你要在其他demo,你需要按照这个demo中的方式修改代码
设置repetition_penalty=1.2之后生成结果正常了,十分感谢!比max_new_tokens直接截断效果更自然
哦,那你尝试尝试在repetition_penalty调到1.2( 在composite demo中可以实现 ),如果你要在其他demo,你需要按照这个demo中的方式修改代码
Will any Error or Status code be returned if the repetitive replies are stopped by this "repetition_penalty"? Then we can know and retry to generate the texts again with another random seed.
System Info / 系統信息
transformers 4.37.2 Cuda 11.8 Using two NVIDIA GeForce RTX3090 24GB GPUs
Who can help? / 谁可以帮助到您?
No response
Information / 问题信息
Reproduction / 复现过程
The LLM takes more than 30 minutes to generate a long text stream which repeats some contents hundreds of times. The LLM looked unstable. Does anyone know how to fix this bug?
Detail to repeat the problem: We loaded model on 2 GPUs, and called the model twice using a certain system prompt + query sequence. The above issue occurs at the second model.chat() call. Following is the code triggering this error -
=================================================================
========================================================================
Expected behavior / 期待表现
We expect it to produce an answer within a minute, but the LLM looked unstable. Does anyone know how to fix this bug?
Sometimes, changing the seed, temperature or modifying the characters of the input may bypass this bug but do not know when it will come out again!