Skip to content

💡 [REQUEST] - 请问可以支持中国电信大模型Telechat吗?流程可以跑通,但是回复content会被截断 #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Song345381185 opened this issue Aug 2, 2024 · 9 comments
Labels
question Further information is requested

Comments

@Song345381185
Copy link

起始日期 | Start Date

8/2/2024

实现PR | Implementation PR

整体流程可以跑通,正常读取模型,启动服务,调用API

相关Issues | Reference Issues

回复内容上出现截断

摘要 | Summary

让Telechat可以完美适配

基本示例 | Basic Example

content:“XXXXX,XXXX。XXXXX ¥%*&(某些字符,每次不一样,然后就断了)”,role:assistant

缺陷 | Drawbacks

回复内容上出现截断,初步判定是Templates里没有相关配置,导致回复内容stop

未解决问题 | Unresolved questions

附上Telechat开源模型链接https://github.com/Tele-AI/Telechat/tree/master/models/12B-V2

@Song345381185 Song345381185 added the question Further information is requested label Aug 2, 2024
@xusenlinzy
Copy link
Owner

xusenlinzy commented Aug 2, 2024

image

刚刚添加了Telechat模型的chat模板,更新代码之后试试启动的时候指定PROMPT_NAME=telechat

@Song345381185
Copy link
Author

非常感谢老师!我现在试试

@Song345381185
Copy link
Author

image

刚刚添加了Telechat模型的chat模板,更新代码之后试试启动的时候指定PROMPT_NAME=telechat

不好意思老师,因为运行之后,结果还是处于截断状态,如下:
Q = "给我写一个笑话,100字"
A = ChatCompletion(id='chatcmpl-3697c25b-a5eb-4933-9b8c-64ee5051ad7e', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='好吧!我有一个幽默的短故事: <_', role='assistant', function_call=None, tool_calls=None))], created=1722592243, model='telechat', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=18, prompt_tokens=35, total_tokens=53))

Q = "红楼梦主要讲了什么呢?给我写一篇读后感不少于200字"
A = ChatCompletion(id='chatcmpl-b8d9ff13-09ea-48ca-b2df-0bf000d95f6c', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='这部小说以贾、史、王薛四大家族的兴衰为背景,描绘了贾宝玉与林黛玉等人的爱情故事。通过揭示封建家庭内部的矛盾和虚伪道德观对人性的摧残及对社会黑暗腐败的抨击,《红楼梦》展现了一个宏大的社会画卷。<|/im_end|>', role='assistant', function_call=None, tool_calls=None))], created=1722592437, model='telechat', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=58, prompt_tokens=41, total_tokens=99))

@xusenlinzy
Copy link
Owner

这个看起来是使用了默认的模板,启动模型的时候指定了PROMPT_NAME=telechat吗

@Song345381185
Copy link
Author

这个看起来是使用了默认的模板,启动模型的时候指定了PROMPT_NAME=telechat吗
老师,我指定了模型,PROMPT_NAME也是telechat
微信图片_20240805093145
微信图片_20240805093246

@xusenlinzy
Copy link
Owner

项目代码更新过了吗

@xusenlinzy
Copy link
Owner

image

刚刚添加了Telechat模型的chat模板,更新代码之后试试启动的时候指定PROMPT_NAME=telechat

看看这个加上去了没有

@Song345381185
Copy link
Author

image
刚刚添加了Telechat模型的chat模板,更新代码之后试试启动的时候指定PROMPT_NAME=telechat

看看这个加上去了没有
有加上去的老师
微信截图_20240805093838

@Song345381185
Copy link
Author

image
刚刚添加了Telechat模型的chat模板,更新代码之后试试启动的时候指定PROMPT_NAME=telechat

看看这个加上去了没有

老师,可以再帮忙看一下吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants